| <!-- |
| @license |
| Copyright (C) 2017 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. |
| --> |
| |
| <link rel="import" href="../../../bower_components/polymer/polymer.html"> |
| <link rel="import" href="../../../styles/shared-styles.html"> |
| <link rel="import" href="../../../styles/gr-form-styles.html"> |
| <link rel="import" href="../../admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.html"> |
| <link rel="import" href="../../shared/gr-button/gr-button.html"> |
| <link rel="import" href="../../shared/gr-overlay/gr-overlay.html"> |
| <link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html"> |
| |
| <dom-module id="gr-identities"> |
| <template> |
| <style include="shared-styles"></style> |
| <style include="gr-form-styles"> |
| td { |
| width: 5em; |
| } |
| .deleteButton { |
| float: right; |
| } |
| .deleteButton:not(.show) { |
| display: none; |
| } |
| .statusColumn { |
| white-space: nowrap; |
| } |
| </style> |
| <div class="gr-form-styles"> |
| <table id="identities"> |
| <thead> |
| <tr> |
| <th class="statusHeader">Status</th> |
| <th class="emailAddressHeader">Email Address</th> |
| <th class="identityHeader">Identity</th> |
| <th class="deleteHeader"></th> |
| </tr> |
| </thead> |
| <tbody> |
| <template is="dom-repeat" items="[[_identities]]" filter="filterIdentities"> |
| <tr> |
| <td class$="statusColumn"> |
| [[_computeIsTrusted(item.trusted)]] |
| </td> |
| <td>[[item.email_address]]</td> |
| <td>[[_computeIdentity(item.identity)]]</td> |
| <td> |
| <gr-button |
| link |
| class$="deleteButton [[_computeHideDeleteClass(item.can_delete)]]" |
| on-tap="_handleDeleteItem"> |
| Delete |
| </gr-button> |
| </td> |
| </tr> |
| </template> |
| </tbody> |
| </table> |
| </div> |
| <gr-overlay id="overlay" with-backdrop> |
| <gr-confirm-delete-item-dialog |
| class="confirmDialog" |
| on-confirm="_handleDeleteItemConfirm" |
| on-cancel="_handleConfirmDialogCancel" |
| item="[[_idName]]" |
| item-type="id"></gr-confirm-delete-item-dialog> |
| </gr-overlay> |
| <gr-rest-api-interface id="restAPI"></gr-rest-api-interface> |
| </template> |
| <script src="gr-identities.js"></script> |
| </dom-module> |