Merge "More improvements in the change info block UI" into stable-2.9
This commit is contained in:
@@ -69,4 +69,7 @@ public interface GerritResources extends ClientBundle {
|
||||
|
||||
@Source("warning.png")
|
||||
public ImageResource warning();
|
||||
|
||||
@Source("dashboard.png")
|
||||
public ImageResource dashboard();
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ public class ChangeScreen2 extends Screen {
|
||||
@UiField InlineHyperlink ownerLink;
|
||||
@UiField Element statusText;
|
||||
@UiField Image projectSettings;
|
||||
@UiField Image projectDashboard;
|
||||
@UiField InlineHyperlink projectLink;
|
||||
@UiField InlineHyperlink branchLink;
|
||||
@UiField Element strategy;
|
||||
@@ -356,6 +357,13 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
|
||||
private void initProjectLinks(final ChangeInfo info) {
|
||||
projectDashboard.addDomHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
Gerrit.display(
|
||||
PageLinks.toProjectDefaultDashboard(info.project_name_key()));
|
||||
}
|
||||
}, ClickEvent.getType());
|
||||
projectSettings.addDomHandler(new ClickHandler() {
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
@@ -365,7 +373,10 @@ public class ChangeScreen2 extends Screen {
|
||||
}, ClickEvent.getType());
|
||||
projectLink.setText(info.project());
|
||||
projectLink.setTargetHistoryToken(
|
||||
PageLinks.toProjectDefaultDashboard(info.project_name_key()));
|
||||
PageLinks.toChangeQuery(
|
||||
PageLinks.projectQuery(
|
||||
info.project_name_key(),
|
||||
info.status())));
|
||||
}
|
||||
|
||||
private void initBranchLink(ChangeInfo info) {
|
||||
|
||||
@@ -166,6 +166,11 @@ limitations under the License.
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.projectDashboard {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.infoColumn {
|
||||
width: 440px;
|
||||
padding-left: 17px;
|
||||
@@ -390,7 +395,14 @@ limitations under the License.
|
||||
ui:field='projectSettings'
|
||||
resource='{ico.gear}'
|
||||
styleName='{style.projectSettings}'
|
||||
title='Go to project'>
|
||||
title='Go to project settings'>
|
||||
<ui:attribute name='title'/>
|
||||
</g:Image>
|
||||
<g:Image
|
||||
ui:field='projectDashboard'
|
||||
resource='{ico.dashboard}'
|
||||
styleName='{style.projectDashboard}'
|
||||
title='Go to project dashboard'>
|
||||
<ui:attribute name='title'/>
|
||||
</g:Image>
|
||||
</td>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user