| /** |
| * @license |
| * Copyright (C) 2022 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| export const htmlTemplate = Polymer.html` |
| <style> |
| a { |
| color: var(--link-color); |
| } |
| .depends_on_block { |
| padding-bottom: var(--spacing-m); |
| } |
| .depends_on_info { |
| display: inline; |
| padding-right: 5px; |
| } |
| .value iron-icon { |
| color: inherit; |
| --iron-icon-height: 18px; |
| --iron-icon-width: 18px; |
| } |
| .title { |
| display: table-cell; |
| vertical-align: top; |
| max-width: 20em; |
| min-width: 7em; |
| padding-left: var(--metadata-horizontal-padding); |
| } |
| .value { |
| display: table-cell; |
| vertical-align: top; |
| white-space: normal; |
| max-width: 325px; |
| } |
| .error { |
| color: #FFA62F; |
| } |
| .elipses { |
| color: #0654ac; |
| cursor: pointer; |
| text-decoration: underline; |
| } |
| </style> |
| <div class="depends_on_block"> |
| <section> |
| <span class="title">Depends-on</span> |
| <span class="value"> |
| <span hidden$="[[!_isPending]]">loading...</span> |
| <span hidden$="[[_isPending]]"> |
| <span class="error" hidden$="[[!_hasError]]">Error loading</span> |
| <span hidden$="[[_hasError]]"> |
| <template id="dependsOns" is="dom-repeat" indexAs="index" as="dependsOn" |
| items="[[_dependsOns]]"> |
| <template is="dom-if" if="[[_canShow(_isExpanded, index)]]"> |
| <span class="depends_on_info"> |
| <a href=/#/q/change:[[dependsOn.name]],n,z>[[dependsOn.name]]</a> |
| </span> |
| </template> |
| </template> |
| <span class="elipses" hidden$="[[!_canShowElipses(_isExpanded, _dependsOns)]]" |
| on-click="_expand"> |
| ...([[_getRemainingDependsOnsCount(_dependsOns)]]) |
| </span> |
| <gr-depends-on-edit _change-number="[[_changeNumber]]" _revision="[[_revision]]" |
| _value="[[_getEditText(_dependsOns)]]" |
| _original-value="[[_getEditText(_dependsOns)]]" _plugin="[[plugin]]"/> |
| </span> |
| </span> |
| </span> |
| </section> |
| </div> |
| `; |