PolyGerrit: Add support for "Included In"

Bug: Issue 6112
Change-Id: I033e3f248a404813b5bc46eeef6bf25b7153bc1a
This commit is contained in:
Paladox none
2017-09-21 17:27:04 +00:00
parent 63489d858c
commit cae06e030e
9 changed files with 292 additions and 0 deletions

View File

@@ -80,6 +80,12 @@ limitations under the License.
.downloadContainer {
margin-right: 16px;
}
.includedInContainer {
margin-right: 16px;
}
.includedInContainer.hide {
display: none;
}
.rightControls {
align-self: flex-end;
margin: auto 0 auto auto;
@@ -209,6 +215,11 @@ limitations under the License.
class="download"
on-tap="_handleDownloadTap">Download</gr-button>
</span>
<span class$="includedInContainer [[_hideIncludedIn(change)]] desktop">
<gr-button link
class="includedIn"
on-tap="_handleIncludedInTap">Included In</gr-button>
</span>
<template is="dom-if"
if="[[_fileListActionsVisible(shownFileCount, _maxFilesForBulkActions)]]">
<gr-button

View File

@@ -179,6 +179,11 @@
this.fire('open-diff-prefs');
},
_handleIncludedInTap(e) {
e.preventDefault();
this.fire('open-included-in-dialog');
},
_handleDownloadTap(e) {
e.preventDefault();
this.fire('open-download-dialog');
@@ -199,5 +204,9 @@
_getRevisionInfo(change) {
return new Gerrit.RevisionInfo(change);
},
_hideIncludedIn(change) {
return change && change.status === 'MERGED' ? '' : 'hide';
},
});
})();