Merge "Add CHANGE_SCREEN_HISTORY_RIGHT_OF_BUTTONS extension point"

This commit is contained in:
ekempin
2016-09-21 08:46:04 +00:00
committed by Gerrit Code Review
4 changed files with 15 additions and 0 deletions

View File

@@ -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`:
+ +

View File

@@ -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,

View File

@@ -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,

View File

@@ -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'/>