Add CHANGE_SCREEN_BELOW_RELATED_INFO_BLOCK extension point

Add an extension point on Gerrit UI to allow users to insert
UI components under the related changes panel

Change-Id: I10fe9acf25ee67bc140618bcb59bb16fbdc7030f
This commit is contained in:
Khai Do
2016-04-19 10:13:16 -07:00
parent 4cc3ad061d
commit e74c246472
3 changed files with 10 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ public enum GerritUiExtensionPoint {
CHANGE_SCREEN_HEADER_RIGHT_OF_BUTTONS,
CHANGE_SCREEN_HEADER_RIGHT_OF_POP_DOWNS,
CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK,
CHANGE_SCREEN_BELOW_RELATED_INFO_BLOCK,
/* MyPasswordScreen */
PASSWORD_SCREEN_BOTTOM,

View File

@@ -189,6 +189,7 @@ public class ChangeScreen extends Screen {
@UiField Element actionText;
@UiField Element actionDate;
@UiField SimplePanel changeExtension;
@UiField SimplePanel relatedExtension;
@UiField Actions actions;
@UiField Labels labels;
@@ -333,6 +334,9 @@ public class ChangeScreen extends Screen {
addExtensionPoint(
GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK,
changeExtension, change, rev);
addExtensionPoint(
GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_RELATED_INFO_BLOCK,
relatedExtension, change, rev);
}
private void addExtensionPoint(GerritUiExtensionPoint extensionPoint,

View File

@@ -347,6 +347,10 @@ limitations under the License.
padding-top: 5px;
}
.relatedExtension {
padding-top: 5px;
}
.pushCertStatus {
padding-left: 5px;
}
@@ -520,6 +524,7 @@ limitations under the License.
</td>
<td class='{style.relatedColumn}'>
<c:RelatedChanges ui:field='related'/>
<g:SimplePanel ui:field='relatedExtension' styleName='{style.relatedExtension}'/>
</td>
</tr>
</table>