Merge "Fix 'Settings' anchor href in CurrentUserPopupPanel"

This commit is contained in:
Shawn Pearce
2012-12-19 17:53:28 -08:00
committed by Gerrit Code Review
2 changed files with 5 additions and 2 deletions

View File

@@ -14,6 +14,7 @@
package com.google.gerrit.client;
import com.google.gerrit.common.PageLinks;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
@@ -35,11 +36,14 @@ public class CurrentUserPopupPanel extends PluginSafePopupPanel {
Label userEmail;
@UiField
Anchor logout;
@UiField
Anchor settings;
public CurrentUserPopupPanel(Account account, boolean canLogOut) {
super(/* auto hide */true, /* modal */false);
setWidget(binder.createAndBindUi(this));
setStyleName(Gerrit.RESOURCES.css().userInfoPopup());
settings.setHref(Gerrit.selfRedirect(PageLinks.SETTINGS));
if (account.getFullName() != null) {
userName.setText(account.getFullName());
}

View File

@@ -18,7 +18,6 @@ limitations under the License.
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:with field='constants' type='com.google.gerrit.client.GerritConstants'/>
<ui:import field='com.google.gerrit.common.PageLinks.SETTINGS'/>
<ui:style>
.panel {
@@ -39,7 +38,7 @@ limitations under the License.
<g:FlowPanel styleName="{style.panel}">
<g:Label ui:field='userName' styleName="{style.userName}" />
<g:Label ui:field='userEmail' styleName="{style.email}" />
<g:Anchor href='{SETTINGS}'>
<g:Anchor ui:field='settings'>
<ui:text from='{constants.menuSettings}' />
</g:Anchor>
<g:Anchor ui:field='logout' styleName="{style.logout}">