Add CHANGE_SCREEN_HISTORY_RIGHT_OF_BUTTONS extension point
Add an extension point on Gerrit UI to allow users to insert UI components on the history panel to the right of the 'expand all' button. Change-Id: I6e160655ad3dca0aef437f9a74b571dc9525b222
This commit is contained in:
parent
66077df75c
commit
83940baa1e
@ -1112,6 +1112,10 @@ Panel will be shown below the change info block.
|
|||||||
+
|
+
|
||||||
Panel will be shown below the related info block.
|
Panel will be shown below the related info block.
|
||||||
|
|
||||||
|
** `GerritUiExtensionPoint.CHANGE_SCREEN_HISTORY_RIGHT_OF_BUTTONS`:
|
||||||
|
+
|
||||||
|
Panel will be shown in the history bar on the right side of the buttons.
|
||||||
|
|
||||||
** The following parameters are provided:
|
** The following parameters are provided:
|
||||||
*** `GerritUiExtensionPoint.Key.CHANGE_INFO`:
|
*** `GerritUiExtensionPoint.Key.CHANGE_INFO`:
|
||||||
+
|
+
|
||||||
|
@ -22,6 +22,7 @@ public enum GerritUiExtensionPoint {
|
|||||||
CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK,
|
CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK,
|
||||||
CHANGE_SCREEN_BELOW_RELATED_INFO_BLOCK,
|
CHANGE_SCREEN_BELOW_RELATED_INFO_BLOCK,
|
||||||
CHANGE_SCREEN_BELOW_COMMIT_INFO_BLOCK,
|
CHANGE_SCREEN_BELOW_COMMIT_INFO_BLOCK,
|
||||||
|
CHANGE_SCREEN_HISTORY_RIGHT_OF_BUTTONS,
|
||||||
|
|
||||||
/* MyPasswordScreen */
|
/* MyPasswordScreen */
|
||||||
PASSWORD_SCREEN_BOTTOM,
|
PASSWORD_SCREEN_BOTTOM,
|
||||||
|
@ -204,6 +204,7 @@ public class ChangeScreen extends Screen {
|
|||||||
@UiField FileTable files;
|
@UiField FileTable files;
|
||||||
@UiField ListBox diffBase;
|
@UiField ListBox diffBase;
|
||||||
@UiField History history;
|
@UiField History history;
|
||||||
|
@UiField SimplePanel historyExtensionRight;
|
||||||
|
|
||||||
@UiField Button includedIn;
|
@UiField Button includedIn;
|
||||||
@UiField Button patchSets;
|
@UiField Button patchSets;
|
||||||
@ -361,6 +362,9 @@ public class ChangeScreen extends Screen {
|
|||||||
addExtensionPoint(
|
addExtensionPoint(
|
||||||
GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_COMMIT_INFO_BLOCK,
|
GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_COMMIT_INFO_BLOCK,
|
||||||
commitExtension, change, rev);
|
commitExtension, change, rev);
|
||||||
|
addExtensionPoint(
|
||||||
|
GerritUiExtensionPoint.CHANGE_SCREEN_HISTORY_RIGHT_OF_BUTTONS,
|
||||||
|
historyExtensionRight, change, rev);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addExtensionPoint(GerritUiExtensionPoint extensionPoint,
|
private void addExtensionPoint(GerritUiExtensionPoint extensionPoint,
|
||||||
|
@ -355,6 +355,11 @@ limitations under the License.
|
|||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.historyExtension {
|
||||||
|
display: inline-block;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
.pushCertStatus {
|
.pushCertStatus {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
@ -601,6 +606,7 @@ limitations under the License.
|
|||||||
<ui:attribute name='title'/>
|
<ui:attribute name='title'/>
|
||||||
<div><ui:msg>Collapse All</ui:msg></div>
|
<div><ui:msg>Collapse All</ui:msg></div>
|
||||||
</g:Button>
|
</g:Button>
|
||||||
|
<g:SimplePanel ui:field='historyExtensionRight' styleName='{style.historyExtension}'/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<c:History ui:field='history'/>
|
<c:History ui:field='history'/>
|
||||||
|
Loading…
Reference in New Issue
Block a user