Display dashboard title in DashboardsTable
Change-Id: Ib395f4feab7d28e547df56197d110769618e0b35 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import com.google.gwt.i18n.client.Constants;
|
|||||||
|
|
||||||
public interface DashboardConstants extends Constants {
|
public interface DashboardConstants extends Constants {
|
||||||
String dashboardName();
|
String dashboardName();
|
||||||
|
String dashboardTitle();
|
||||||
String dashboardDescription();
|
String dashboardDescription();
|
||||||
String dashboardInherited();
|
String dashboardInherited();
|
||||||
String dashboardItem();
|
String dashboardItem();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
dashboardName = Dashboard Name
|
dashboardName = Dashboard Name
|
||||||
|
dashboardTitle = Dashboard Title
|
||||||
dashboardDescription = Dashboard Description
|
dashboardDescription = Dashboard Description
|
||||||
dashboardInherited = Inherited From
|
dashboardInherited = Inherited From
|
||||||
dashboardItem = dashboard
|
dashboardItem = dashboard
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.google.gwt.core.client.JavaScriptObject;
|
|||||||
|
|
||||||
public class DashboardInfo extends JavaScriptObject {
|
public class DashboardInfo extends JavaScriptObject {
|
||||||
public final native String id() /*-{ return this.id; }-*/;
|
public final native String id() /*-{ return this.id; }-*/;
|
||||||
|
public final native String title() /*-{ return this.title; }-*/;
|
||||||
public final native String project() /*-{ return this.project; }-*/;
|
public final native String project() /*-{ return this.project; }-*/;
|
||||||
public final native String definingProject() /*-{ return this.defining_project; }-*/;
|
public final native String definingProject() /*-{ return this.defining_project; }-*/;
|
||||||
public final native String ref() /*-{ return this.ref; }-*/;
|
public final native String ref() /*-{ return this.ref; }-*/;
|
||||||
|
|||||||
@@ -47,10 +47,12 @@ public class DashboardsTable extends NavigationTable<DashboardInfo> {
|
|||||||
fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().dataHeader());
|
||||||
fmt.addStyleName(0, 2, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(0, 2, Gerrit.RESOURCES.css().dataHeader());
|
||||||
fmt.addStyleName(0, 3, Gerrit.RESOURCES.css().dataHeader());
|
fmt.addStyleName(0, 3, Gerrit.RESOURCES.css().dataHeader());
|
||||||
|
fmt.addStyleName(0, 4, Gerrit.RESOURCES.css().dataHeader());
|
||||||
|
|
||||||
table.setText(0, 1, Util.C.dashboardName());
|
table.setText(0, 1, Util.C.dashboardName());
|
||||||
table.setText(0, 2, Util.C.dashboardDescription());
|
table.setText(0, 2, Util.C.dashboardTitle());
|
||||||
table.setText(0, 3, Util.C.dashboardInherited());
|
table.setText(0, 3, Util.C.dashboardDescription());
|
||||||
|
table.setText(0, 4, Util.C.dashboardInherited());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void display(DashboardList dashes) {
|
public void display(DashboardList dashes) {
|
||||||
@@ -99,7 +101,7 @@ public class DashboardsTable extends NavigationTable<DashboardInfo> {
|
|||||||
table.setText(row, 0, section);
|
table.setText(row, 0, section);
|
||||||
|
|
||||||
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
final FlexCellFormatter fmt = table.getFlexCellFormatter();
|
||||||
fmt.setColSpan(row, 0, 5);
|
fmt.setColSpan(row, 0, 6);
|
||||||
fmt.addStyleName(row, 0, Gerrit.RESOURCES.css().sectionHeader());
|
fmt.addStyleName(row, 0, Gerrit.RESOURCES.css().sectionHeader());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,6 +115,7 @@ public class DashboardsTable extends NavigationTable<DashboardInfo> {
|
|||||||
fmt.addStyleName(row, 2, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 2, Gerrit.RESOURCES.css().dataCell());
|
||||||
fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());
|
||||||
fmt.addStyleName(row, 4, Gerrit.RESOURCES.css().dataCell());
|
fmt.addStyleName(row, 4, Gerrit.RESOURCES.css().dataCell());
|
||||||
|
fmt.addStyleName(row, 5, Gerrit.RESOURCES.css().dataCell());
|
||||||
|
|
||||||
populate(row, k);
|
populate(row, k);
|
||||||
}
|
}
|
||||||
@@ -125,9 +128,10 @@ public class DashboardsTable extends NavigationTable<DashboardInfo> {
|
|||||||
}
|
}
|
||||||
table.setWidget(row, 2, new Anchor(k.path(), "#"
|
table.setWidget(row, 2, new Anchor(k.path(), "#"
|
||||||
+ PageLinks.toProjectDashboard(new Project.NameKey(k.project()), k.id())));
|
+ PageLinks.toProjectDashboard(new Project.NameKey(k.project()), k.id())));
|
||||||
table.setText(row, 3, k.description());
|
table.setText(row, 3, k.title() != null ? k.title() : k.path());
|
||||||
|
table.setText(row, 4, k.description());
|
||||||
if (k.definingProject() != null && !k.definingProject().equals(k.project())) {
|
if (k.definingProject() != null && !k.definingProject().equals(k.project())) {
|
||||||
table.setWidget(row, 4, new Anchor(k.definingProject(), "#"
|
table.setWidget(row, 5, new Anchor(k.definingProject(), "#"
|
||||||
+ PageLinks.toProjectDashboards(new Project.NameKey(k.definingProject()))));
|
+ PageLinks.toProjectDashboards(new Project.NameKey(k.definingProject()))));
|
||||||
}
|
}
|
||||||
setRowItem(row, k);
|
setRowItem(row, k);
|
||||||
|
|||||||
Reference in New Issue
Block a user