diff --git a/config/alfresco/templates/client/summary_panel.ftl b/config/alfresco/templates/client/node_summary_panel.ftl similarity index 70% rename from config/alfresco/templates/client/summary_panel.ftl rename to config/alfresco/templates/client/node_summary_panel.ftl index d613819b9d..65e650ef19 100644 --- a/config/alfresco/templates/client/summary_panel.ftl +++ b/config/alfresco/templates/client/node_summary_panel.ftl @@ -11,8 +11,8 @@ <#assign navurl="/navigate/showSpaceDetails/"> #if> <#assign navurl=navurl + node.nodeRef.storeRef.protocol + '/' + node.nodeRef.storeRef.identifier + '/' + node.nodeRef.id> -
- | ![]() |
+ ![]() |
|
![]() |
+ ![]() |
+
|
+ ||||||||||||||||
+
|
+
+ |
+
|
+|||||
+
+ <#assign weekms=1000*60*60*24*7>
+ <#list workflow.assignedTasks?sort_by('startDate') as t>
+ <#-- TODO: is it better to use a js script to pre-filter the list? -->
+ <#assign hasDue=t.properties["bpm:dueDate"]?exists>
+ <#if hasDue>
+ <#assign due=t.properties["bpm:dueDate"]>
+ #if>
+ <#if (filter=0) ||
+ (filter=3 && !hasDue) ||
+ (filter=1 && hasDue && (dateCompare(date?date, due?date, 0, "==") == 1)) ||
+ (filter=2 && hasDue && (dateCompare(due?date, date?date) == 1 && dateCompare(date?date, due?date, weekms) == 1)) ||
+ (filter=4 && hasDue && (dateCompare(date?date, due?date) == 1))>
+
+
+
+ #if>
+ #list>
+
+ <#if hasDue>
+ <#-- items due today? -->
+ <#if (filter=0 || filter=1) && (dateCompare(date?date, due?date, 0, "==") == 1)>
+ ![]()
+ <#-- items overdue? -->
+ <#elseif (filter=0 || filter=4) && (dateCompare(date?date, due?date) == 1)>
+ ![]()
+ <#else>
+
+ #if>
+ <#else>
+
+ #if>
+ ${t.description?html} [${t.name?html}]
+ <#if hasDue>
+ (Due: ${due?date})
+ #if>
+
+
+
+ ![]() |
+ * The result is the formatted HTML to show on the client.
+ */
+ public void sendTaskInfo() throws IOException
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResponseWriter out = context.getResponseWriter();
+
+ String taskId = (String)context.getExternalContext().getRequestParameterMap().get("taskId");
+ if (taskId == null || taskId.length() == 0)
+ {
+ throw new IllegalArgumentException("'taskId' parameter is missing");
+ }
+
+ WorkflowTask task = this.workflowService.getTaskById(taskId);
+ if (task != null)
+ {
+ Repository.getServiceRegistry(context).getTemplateService().processTemplate(
+ "/alfresco/templates/client/task_summary_panel.ftl", getModel(task), out);
+ }
+ else
+ {
+ out.write("Task could not be found.");
+ }
+ }
+
+
+ // ------------------------------------------------------------------------------
+ // Bean getters and setters
+
+ /**
+ * @param workflowService The WorkflowService to set.
+ */
+ public void setWorkflowService(WorkflowService workflowService)
+ {
+ this.workflowService = workflowService;
+ }
+
+
+ // ------------------------------------------------------------------------------
+ // Helper methods
+
+ private Map