Add the project name title to ProjectDashboards

If the ProjectDashboard screen is going to behave like
a ProjectScreen, give it the same "Project <name>" header
as other ProjectScreens.  This header is important because
it gives context to the Project Submenus.  It also helps
give context when viewing a dashboard name which is shared
by many projects via inheritance.

Change-Id: I8e9e39f4aa60500928824ab872fcf782c2074fa6
This commit is contained in:
Martin Fick
2012-11-25 23:10:45 -07:00
parent fa058b5f72
commit 959dea2713

View File

@@ -19,6 +19,7 @@ import com.google.gerrit.client.admin.ProjectScreen;
import com.google.gerrit.client.ui.InlineHyperlink;
import com.google.gerrit.common.PageLinks;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gwt.user.client.ui.FlowPanel;
public class ProjectDashboardScreen extends ProjectScreen implements ChangeListScreen {
private DashboardTable table;
@@ -39,13 +40,16 @@ public class ProjectDashboardScreen extends ProjectScreen implements ChangeListS
}
};
super.onInitUI();
String title = table.getTitle();
if (title != null) {
setTitle(new InlineHyperlink(title, PageLinks.toCustomDashboard(params)));
FlowPanel fp = new FlowPanel();
fp.setStyleName(Gerrit.RESOURCES.css().screenHeader());
fp.add(new InlineHyperlink(title, PageLinks.toCustomDashboard(params)));
add(fp);
}
super.onInitUI();
add(table);
}