Add CHANGE_SCREEN_BELOW_COMMIT_INFO_BLOCK extension point

Add an extension point on Gerrit UI to allow users to insert
UI components under the commit info panel

Change-Id: I23343d6c09fdd7d063087d8545c3dff6f3d9eaec
This commit is contained in:
Khai Do
2016-07-28 16:30:37 -07:00
parent 224da0bb97
commit 675afc0f21
4 changed files with 14 additions and 0 deletions

View File

@@ -190,6 +190,7 @@ public class ChangeScreen extends Screen {
@UiField Element actionDate;
@UiField SimplePanel changeExtension;
@UiField SimplePanel relatedExtension;
@UiField SimplePanel commitExtension;
@UiField Actions actions;
@UiField Labels labels;
@@ -337,6 +338,9 @@ public class ChangeScreen extends Screen {
addExtensionPoint(
GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_RELATED_INFO_BLOCK,
relatedExtension, change, rev);
addExtensionPoint(
GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_COMMIT_INFO_BLOCK,
commitExtension, change, rev);
}
private void addExtensionPoint(GerritUiExtensionPoint extensionPoint,

View File

@@ -351,6 +351,10 @@ limitations under the License.
padding-top: 5px;
}
.commitExtension {
padding-top: 5px;
}
.pushCertStatus {
padding-left: 5px;
}
@@ -434,6 +438,7 @@ limitations under the License.
<tr>
<td class='{style.commitColumn}'>
<c:CommitBox ui:field='commit'/>
<g:SimplePanel ui:field='commitExtension' styleName='{style.commitExtension}'/>
</td>
<td class='{style.infoColumn}'>
<table id='change_infoTable'>