diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 6dadc9a461..c7700ef148 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1349,6 +1349,7 @@ dashlet_btn_remove=Remove selected_dashlets=Selected Components dashboard_column=Column column_max_components=this column can display {0} components +single_column_max_components=This layout can display {0} components # My Alfresco Layouts messages layout_single_label=Single Column diff --git a/source/java/org/alfresco/web/bean/dashboard/DashboardWizard.java b/source/java/org/alfresco/web/bean/dashboard/DashboardWizard.java index 978beac8d1..ad924e397f 100644 --- a/source/java/org/alfresco/web/bean/dashboard/DashboardWizard.java +++ b/source/java/org/alfresco/web/bean/dashboard/DashboardWizard.java @@ -264,6 +264,9 @@ public class DashboardWizard extends BaseWizardBean FacesContext fc = FacesContext.getCurrentInstance(); Column column = this.editConfig.getCurrentPage().getColumns().get(this.column); + // trim the max number of dashlets for this column + LayoutDefinition layoutDef = this.editConfig.getCurrentPage().getLayoutDefinition(); + column.trimDashlets(layoutDef.ColumnLength); List dashlets = new ArrayList(column.getDashlets().size()); for (DashletDefinition dashletDef : column.getDashlets()) { @@ -276,7 +279,16 @@ public class DashboardWizard extends BaseWizardBean } return dashlets; } - + + /** + * @return the number of dashlets currently displayed in the selected column + */ + public int getColumnDashletCount() + { + Column column = this.editConfig.getCurrentPage().getColumns().get(this.column); + return column.getDashlets().size(); + } + /** * @return List of UIDescription objects for the available layouts */ diff --git a/source/java/org/alfresco/web/bean/dashboard/PageConfig.java b/source/java/org/alfresco/web/bean/dashboard/PageConfig.java index a416ae318a..a46b2e2164 100644 --- a/source/java/org/alfresco/web/bean/dashboard/PageConfig.java +++ b/source/java/org/alfresco/web/bean/dashboard/PageConfig.java @@ -403,4 +403,13 @@ final class Column { return this.dashlets; } + + public void trimDashlets(int max) + { + if (max >= 0) + { + int maxTrim = Math.min(this.dashlets.size(), max); + this.dashlets = this.dashlets.subList(0, maxTrim); + } + } } diff --git a/source/web/jsp/dashboards/wizard/columns.jsp b/source/web/jsp/dashboards/wizard/columns.jsp index db72885c65..f59940b932 100644 --- a/source/web/jsp/dashboards/wizard/columns.jsp +++ b/source/web/jsp/dashboards/wizard/columns.jsp @@ -53,6 +53,12 @@ + + + + + + @@ -62,8 +68,8 @@ - - + + @@ -73,12 +79,12 @@ - +
- +
- +
diff --git a/source/web/jsp/spaces/create-space-wizard/from-existing.jsp b/source/web/jsp/spaces/create-space-wizard/from-existing.jsp index b233b39661..8a257c32a9 100644 --- a/source/web/jsp/spaces/create-space-wizard/from-existing.jsp +++ b/source/web/jsp/spaces/create-space-wizard/from-existing.jsp @@ -28,6 +28,28 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + +