Tasks Todo dashlet is now part of the default config for all users (shown under the Getting Started dashlet by default)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3674 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-09-04 12:04:40 +00:00
parent 1b039ef97c
commit 927d6e96da
2 changed files with 20 additions and 9 deletions

View File

@@ -190,6 +190,11 @@
<dashlet id="getting-started" label-id="dashlet_gettingstarted_label"
description-id="dashlet_gettingstarted_desc"
jsp="/jsp/dashboards/dashlets/getting-started.jsp" allow-narrow="false" />
<!-- this dashlet 'tasks-todo' is also shown by default for all users -->
<dashlet id="tasks-todo" label-id="my_tasks_todo_title" description-id="my_tasks_todo_desc"
jsp="/jsp/workflow/tasks-todo-dashlet.jsp" allow-narrow="false" />
<dashlet id="tasks-completed" label-id="my_tasks_completed_title" description-id="my_tasks_completed_desc"
jsp="/jsp/workflow/tasks-completed-dashlet.jsp" allow-narrow="false" />
<dashlet id="my-docs-template" label-id="dashlet_mydocuments"
description-id="dashlet_mydocuments_desc"
jsp="/jsp/dashboards/dashlets/my-docs.jsp" allow-narrow="true" />
@@ -199,10 +204,6 @@
<dashlet id="my-images" label-id="dashlet_myimages"
description-id="dashlet_myimages_desc"
jsp="/jsp/dashboards/dashlets/my-images.jsp" allow-narrow="false" />
<dashlet id="tasks-todo" label-id="my_tasks_todo_title" description-id="my_tasks_todo_desc"
jsp="/jsp/workflow/tasks-todo-dashlet.jsp" allow-narrow="false" />
<dashlet id="tasks-completed" label-id="my_tasks_completed_title" description-id="my_tasks_completed_desc"
jsp="/jsp/workflow/tasks-completed-dashlet.jsp" allow-narrow="false" />
</dashlets>
<!-- set true allow the Guest user to configure the dashboard view - false by default -->
<allow-guest-config>false</allow-guest-config>

View File

@@ -42,8 +42,9 @@ public class DashboardManager
private static Log logger = LogFactory.getLog(DashboardManager.class);
private static final String PREF_DASHBOARD = "dashboard";
static final String LAYOUT_DEFAULT = "default";
static final String DASHLET_DEFAULT = "getting-started";
private static final String LAYOUT_DEFAULT = "default";
private static final String DASHLET_STARTEDDEFAULT = "getting-started";
private static final String DASHLET_TASKSDEFAULT = "tasks-todo";
private static final String JSP_DUMMY = "/jsp/dashboards/dummy.jsp";
@@ -150,15 +151,24 @@ public class DashboardManager
{
Page page = new Page("default", layout);
Column defaultColumn = new Column();
DashletDefinition dashlet = config.getDashletDefinition(DASHLET_DEFAULT);
// add the default dashlet(s) to the column
DashletDefinition dashlet = config.getDashletDefinition(DASHLET_STARTEDDEFAULT);
if (dashlet != null)
{
defaultColumn.addDashlet(dashlet);
}
dashlet = config.getDashletDefinition(DASHLET_TASKSDEFAULT);
if (dashlet != null)
{
defaultColumn.addDashlet(dashlet);
}
// add the column to the page and we are done
page.addColumn(defaultColumn);
pageConfig.addPage(page);
}
}
}
this.pageConfig = pageConfig;
}