
These tags are preserved by the Closure compiler and vulcanize in order to serve the license notices embedded in the outputs. In a standalone Gerrit server, these license are also covered in the LICENSES.txt served with the documentation. When serving PG assets from a CDN, it's less obvious what the corresponding LICENSES.txt file is, since the CDN is not directly linked to a running Gerrit server. Safer to embed the licenses in the assets themselves. Change-Id: Id1add1451fad1baa7916882a6bda02c326ccc988
192 lines
6.8 KiB
HTML
192 lines
6.8 KiB
HTML
<!--
|
|
@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="../../../behaviors/base-url-behavior/base-url-behavior.html">
|
|
<link rel="import" href="../../../behaviors/gr-url-encoding-behavior.html">
|
|
<link rel="import" href="../../../bower_components/polymer/polymer.html">
|
|
<link rel="import" href="../../../bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html">
|
|
<link rel="import" href="../../../bower_components/iron-input/iron-input.html">
|
|
<link rel="import" href="../../../styles/gr-form-styles.html">
|
|
<link rel="import" href="../../../styles/shared-styles.html">
|
|
<link rel="import" href="../../shared/gr-account-link/gr-account-link.html">
|
|
<link rel="import" href="../../shared/gr-autocomplete/gr-autocomplete.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">
|
|
<link rel="import" href="../gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.html">
|
|
|
|
<dom-module id="gr-group-members">
|
|
<template>
|
|
<style include="gr-form-styles"></style>
|
|
<style include="shared-styles">
|
|
main {
|
|
margin: 2em 1em;
|
|
}
|
|
.loading {
|
|
display: none;
|
|
}
|
|
#loading.loading {
|
|
display: block;
|
|
}
|
|
#loading:not(.loading) {
|
|
display: none;
|
|
}
|
|
.input {
|
|
width: 15em;
|
|
}
|
|
gr-autocomplete {
|
|
width: 20em;
|
|
--gr-autocomplete: {
|
|
font-size: var(--font-size-normal);
|
|
height: 2em;
|
|
width: 20em;
|
|
}
|
|
}
|
|
a {
|
|
color: var(--default-text-color);
|
|
text-decoration: none;
|
|
}
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
th {
|
|
border-bottom: 1px solid #eee;
|
|
font-family: var(--font-family-bold);
|
|
text-align: left;
|
|
}
|
|
.canModify #groupMemberSearchInput,
|
|
.canModify #saveGroupMember,
|
|
.canModify .deleteHeader,
|
|
.canModify .deleteColumn,
|
|
.canModify #includedGroupSearchInput,
|
|
.canModify #saveIncludedGroups,
|
|
.canModify .deleteIncludedHeader,
|
|
.canModify #saveIncludedGroups {
|
|
display: none;
|
|
}
|
|
</style>
|
|
<main class$="gr-form-styles [[_computeHideItemClass(_groupOwner, _isAdmin)]]">
|
|
<div id="loading" class$="[[_computeLoadingClass(_loading)]]">
|
|
Loading...
|
|
</div>
|
|
<div id="loadedContent" class$="[[_computeLoadingClass(_loading)]]">
|
|
<h1 id="Title">[[_groupName]]</h1>
|
|
<div id="form">
|
|
<h3 id="members">Members</h3>
|
|
<fieldset>
|
|
<span class="value">
|
|
<gr-autocomplete
|
|
id="groupMemberSearchInput"
|
|
text="{{_groupMemberSearchName}}"
|
|
value="{{_groupMemberSearchId}}"
|
|
query="[[_queryMembers]]"
|
|
placeholder="Name Or Email">
|
|
</gr-autocomplete>
|
|
</span>
|
|
<gr-button
|
|
id="saveGroupMember"
|
|
on-tap="_handleSavingGroupMember"
|
|
disabled="[[!_groupMemberSearchId]]">
|
|
Add
|
|
</gr-button>
|
|
<table id="groupMembers">
|
|
<tr class="headerRow">
|
|
<th class="nameHeader">Name</th>
|
|
<th class="emailAddressHeader">Email Address</th>
|
|
<th class="deleteHeader">Delete Member</th>
|
|
</tr>
|
|
<tbody>
|
|
<template is="dom-repeat" items="[[_groupMembers]]">
|
|
<tr>
|
|
<td class="nameColumn">
|
|
<gr-account-link account="[[item]]"></gr-account-link>
|
|
</td>
|
|
<td>[[item.email]]</td>
|
|
<td class="deleteColumn">
|
|
<gr-button
|
|
class="deleteButton"
|
|
on-tap="_handleDeleteMember">
|
|
Delete
|
|
</gr-button>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
<h3 id="includedGroups">Included Groups</h3>
|
|
<fieldset>
|
|
<span class="value">
|
|
<gr-autocomplete
|
|
id="includedGroupSearchInput"
|
|
text="{{_includedGroupSearch}}"
|
|
query="[[_queryIncludedGroup]]"
|
|
placeholder="Group Name">
|
|
</gr-autocomplete>
|
|
</span>
|
|
<gr-button
|
|
id="saveIncludedGroups"
|
|
on-tap="_handleSavingIncludedGroups"
|
|
disabled="[[!_includedGroupSearch]]">
|
|
Add
|
|
</gr-button>
|
|
<table id="includedGroups">
|
|
<tr class="headerRow">
|
|
<th class="groupNameHeader">Group Name</th>
|
|
<th class="descriptionHeader">Description</th>
|
|
<th class="deleteIncludedHeader">
|
|
Delete Group
|
|
</th>
|
|
</tr>
|
|
<tbody>
|
|
<template is="dom-repeat" items="[[_includedGroups]]">
|
|
<tr>
|
|
<td class="nameColumn">
|
|
<a href$="[[_computeGroupUrl(item.url)]]"
|
|
rel="noopener">
|
|
[[item.name]]
|
|
</a>
|
|
</td>
|
|
<td>[[item.description]]</td>
|
|
<td class="deleteColumn">
|
|
<gr-button
|
|
class="deleteIncludedGroupButton"
|
|
on-tap="_handleDeleteIncludedGroup">
|
|
Delete
|
|
</gr-button>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
<gr-overlay id="overlay" with-backdrop>
|
|
<gr-confirm-delete-item-dialog
|
|
class="confirmDialog"
|
|
on-confirm="_handleDeleteConfirm"
|
|
on-cancel="_handleConfirmDialogCancel"
|
|
item="[[_itemName]]"
|
|
item-type="[[_itemType]]"></gr-confirm-delete-item-dialog>
|
|
</gr-overlay>
|
|
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
|
|
</template>
|
|
<script src="gr-group-members.js"></script>
|
|
</dom-module>
|