mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Updated documents section of workflow email notification template to match Linton's styling and fixed task edit/details URLs
NOTE: You'll need to start with a clean database to see these changes. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29783 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<style type="text/css"><!--
|
<style type="text/css"><!--
|
||||||
body
|
body
|
||||||
@@ -51,58 +49,76 @@
|
|||||||
</table>
|
</table>
|
||||||
<div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
|
<div style="font-size: 14px; margin: 12px 0px 24px 0px; padding-top: 10px; border-top: 1px solid #aaaaaa;">
|
||||||
<p>Hi,</p>
|
<p>Hi,</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<#if args.workflowPooled == true>
|
<#if args.workflowPooled == true>
|
||||||
The following pooled task is available to be claimed:
|
The following pooled task is available to be claimed:
|
||||||
<#else>
|
<#else>
|
||||||
You have been assigned the following task:
|
You have been assigned the following task:
|
||||||
</#if>
|
</#if>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><b>"${args.workflowDescription}"</b></p>
|
<p><b>"${args.workflowTitle}"</b></p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<#if (args.workflowDueDate)??>Due: <b>${args.workflowDueDate?date?string.full}</b><br></#if>
|
<#if (args.workflowDueDate)??>Due: <b>${args.workflowDueDate?date?string.full}</b><br></#if>
|
||||||
<#if (args.workflowPriority)??>
|
<#if (args.workflowPriority)??>
|
||||||
Priority:
|
Priority:
|
||||||
<b>
|
<b>
|
||||||
<#if args.workflowPriority == 3>
|
<#if args.workflowPriority == 3>
|
||||||
Low
|
Low
|
||||||
<#elseif args.workflowPriority == 2>
|
<#elseif args.workflowPriority == 2>
|
||||||
Medium
|
Medium
|
||||||
<#else>
|
<#else>
|
||||||
High
|
High
|
||||||
</#if>
|
</#if>
|
||||||
</b>
|
</b>
|
||||||
</#if>
|
</#if>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<#if (args.workflowDocuments)??>
|
<#if (args.workflowDocuments)??>
|
||||||
<table cellpadding=0 callspacing=0 border=0>
|
<table cellpadding="0" callspacing="0" border="0" bgcolor="#eeeeee" style="padding:10px; border: 1px solid #aaaaaa;">
|
||||||
<#list args.workflowDocuments as doc>
|
<#list args.workflowDocuments as doc>
|
||||||
<tr><td><table cellpadding=0 cellspacing=0 border=0><tr>
|
<tr>
|
||||||
<td><img src="${shareUrl}/res/components/images/generic-file.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" /></td>
|
<td>
|
||||||
<td><table cellpadding=0 cellspacing=0 border=0>
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
<tr><td><b>${doc.name}</b></td></tr>
|
<tr>
|
||||||
<tr><td>Click on this link to download the document:</td></tr>
|
<td valign="top">
|
||||||
<tr><td>
|
<img src="${shareUrl}/res/components/images/generic-file.png" alt="" width="64" height="64" border="0" style="padding-right: 10px;" />
|
||||||
<a href="${shareUrl}/proxy/alfresco/api/node/content/workspace/SpacesStore/${doc.id}/${doc.name}?a=true">
|
</td>
|
||||||
${shareUrl}/proxy/alfresco/api/node/content/workspace/SpacesStore/${doc.id}/${doc.name}?a=true
|
<td>
|
||||||
</a>
|
<table cellpadding="2" cellspacing="0" border="0">
|
||||||
</td></tr>
|
<tr>
|
||||||
</table></td>
|
<td><b>${doc.name}</b></td>
|
||||||
</tr></table></td></tr>
|
</tr>
|
||||||
</#list>
|
<tr>
|
||||||
</table>
|
<td>Click on this link to download the document:</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="${shareUrl}/proxy/alfresco/api/node/content/workspace/SpacesStore/${doc.id}/${doc.name}?a=true">
|
||||||
|
${shareUrl}/proxy/alfresco/api/node/content/workspace/SpacesStore/${doc.id}/${doc.name}?a=true</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<#if doc_has_next>
|
||||||
|
<tr><td><div style="border-top: 1px solid #aaaaaa; margin:12px;"></div></td></tr>
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</table>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if args.workflowPooled == true>
|
<#if args.workflowPooled == true>
|
||||||
<p>Click this link to view the task:</p>
|
<p>Click this link to view the task:</p>
|
||||||
<p><a href="${shareUrl}/page/task-view?taskId=${args.workflowId}">${shareUrl}/page/task-view?taskId=${args.workflowId}</a>
|
<p><a href="${shareUrl}/page/task-details?taskId=${args.workflowId}">${shareUrl}/page/task-details?taskId=${args.workflowId}</a>
|
||||||
<#else>
|
<#else>
|
||||||
<p>Click this link to edit the task:</p>
|
<p>Click this link to edit the task:</p>
|
||||||
<p><a href="${shareUrl}/page/task-details?taskId=${args.workflowId}">${shareUrl}/page/task-edit?taskId=${args.workflowId}</a>
|
<p><a href="${shareUrl}/page/task-edit?taskId=${args.workflowId}">${shareUrl}/page/task-edit?taskId=${args.workflowId}</a>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<p>Sincerely,<br />
|
<p>Sincerely,<br />
|
||||||
|
@@ -15,25 +15,25 @@
|
|||||||
</view:properties>
|
</view:properties>
|
||||||
<view:associations>
|
<view:associations>
|
||||||
<cm:contains>
|
<cm:contains>
|
||||||
<cm:content view:childName="cm:invite-email.html.ftl">
|
<cm:content view:childName="cm:invite-email.html.ftl">
|
||||||
<view:aspects>
|
<view:aspects>
|
||||||
<cm:auditable></cm:auditable>
|
<cm:auditable></cm:auditable>
|
||||||
<sys:referenceable></sys:referenceable>
|
<sys:referenceable></sys:referenceable>
|
||||||
<app:inlineeditable></app:inlineeditable>
|
<app:inlineeditable></app:inlineeditable>
|
||||||
</view:aspects>
|
</view:aspects>
|
||||||
<view:acl></view:acl>
|
<view:acl></view:acl>
|
||||||
<view:properties>
|
<view:properties>
|
||||||
<app:editInline>true</app:editInline>
|
<app:editInline>true</app:editInline>
|
||||||
<sys:store-protocol>workspace</sys:store-protocol>
|
<sys:store-protocol>workspace</sys:store-protocol>
|
||||||
<sys:store-identifier>SpacesStore</sys:store-identifier>
|
<sys:store-identifier>SpacesStore</sys:store-identifier>
|
||||||
<sys:node-uuid>wf-email-html-ftl</sys:node-uuid>
|
<sys:node-uuid>wf-email-html-ftl</sys:node-uuid>
|
||||||
<cm:name>wf-email.html.ftl</cm:name>
|
<cm:name>wf-email.html.ftl</cm:name>
|
||||||
<cm:title>wf-email.html.ftl</cm:title>
|
<cm:title>wf-email.html.ftl</cm:title>
|
||||||
<cm:description>${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default}</cm:description>
|
<cm:description>${spaces.templates.email.generate_the_wf_notification_email.description} - ${version.default}</cm:description>
|
||||||
<cm:content>contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html.ftl|mimetype=text/plain|size=1455|encoding=UTF-8</cm:content>
|
<cm:content>contentUrl=classpath:alfresco\bootstrap\notification\wf-email.html.ftl|mimetype=text/plain|size=1455|encoding=UTF-8</cm:content>
|
||||||
</view:properties>
|
</view:properties>
|
||||||
</cm:content>
|
</cm:content>
|
||||||
</cm:contains>
|
</cm:contains>
|
||||||
</view:associations>
|
</view:associations>
|
||||||
</cm:folder>
|
</cm:folder>
|
||||||
</view:view>
|
</view:view>
|
||||||
|
@@ -1,5 +1,20 @@
|
|||||||
/**
|
/*
|
||||||
*
|
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This file is part of Alfresco
|
||||||
|
*
|
||||||
|
* Alfresco is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
package org.alfresco.repo.workflow;
|
package org.alfresco.repo.workflow;
|
||||||
|
|
||||||
@@ -22,8 +37,6 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
|||||||
/**
|
/**
|
||||||
* Utility class containing methods to help when sending workflow notifications.
|
* Utility class containing methods to help when sending workflow notifications.
|
||||||
*
|
*
|
||||||
* TODO? Move to workflow serivce??
|
|
||||||
*
|
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
public abstract class WorkflowNotificationUtils
|
public abstract class WorkflowNotificationUtils
|
||||||
@@ -88,7 +101,7 @@ public abstract class WorkflowNotificationUtils
|
|||||||
notificationContext.setBodyTemplate(WF_ASSIGNED_TEMPLATE);
|
notificationContext.setBodyTemplate(WF_ASSIGNED_TEMPLATE);
|
||||||
|
|
||||||
// Build the template args
|
// Build the template args
|
||||||
Map<String, Serializable>templateArgs = new HashMap<String, Serializable>(7);
|
Map<String, Serializable>templateArgs = new HashMap<String, Serializable>(7);
|
||||||
templateArgs.put(ARG_WF_ID, taskId);
|
templateArgs.put(ARG_WF_ID, taskId);
|
||||||
templateArgs.put(ARG_WF_TITLE, title);
|
templateArgs.put(ARG_WF_TITLE, title);
|
||||||
templateArgs.put(ARG_WF_DESCRIPTION, description);
|
templateArgs.put(ARG_WF_DESCRIPTION, description);
|
||||||
@@ -122,7 +135,7 @@ public abstract class WorkflowNotificationUtils
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the template args
|
// Set the template args
|
||||||
notificationContext.setTemplateArgs(templateArgs);
|
notificationContext.setTemplateArgs(templateArgs);
|
||||||
|
|
||||||
// Set the notification recipients
|
// Set the notification recipients
|
||||||
for (String assignedAuthority : assignedAuthorites)
|
for (String assignedAuthority : assignedAuthorites)
|
||||||
@@ -131,7 +144,7 @@ public abstract class WorkflowNotificationUtils
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send email notification
|
// Send email notification
|
||||||
services.getNotificationService().sendNotification(EMailNotificationProvider.NAME, notificationContext);
|
services.getNotificationService().sendNotification(EMailNotificationProvider.NAME, notificationContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -151,10 +164,10 @@ public abstract class WorkflowNotificationUtils
|
|||||||
WorkflowTask workflowTask = services.getWorkflowService().getTaskById(taskId);
|
WorkflowTask workflowTask = services.getWorkflowService().getTaskById(taskId);
|
||||||
|
|
||||||
// Get the workflow properties
|
// Get the workflow properties
|
||||||
Map<QName, Serializable> props = workflowTask.getProperties();
|
Map<QName, Serializable> props = workflowTask.getProperties();
|
||||||
|
|
||||||
// Get the title and description
|
// Get the title and description
|
||||||
String title = workflowTask.getTitle();
|
String title = workflowTask.getTitle();
|
||||||
String description = (String)props.get(WorkflowModel.PROP_DESCRIPTION);
|
String description = (String)props.get(WorkflowModel.PROP_DESCRIPTION);
|
||||||
if (description == null)
|
if (description == null)
|
||||||
{
|
{
|
||||||
@@ -162,8 +175,8 @@ public abstract class WorkflowNotificationUtils
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the duedate, priority and workflow package
|
// Get the duedate, priority and workflow package
|
||||||
Date dueDate = (Date)props.get(WorkflowModel.PROP_DUE_DATE);
|
Date dueDate = (Date)props.get(WorkflowModel.PROP_DUE_DATE);
|
||||||
Integer priority = (Integer)props.get(WorkflowModel.PROP_PRIORITY);
|
Integer priority = (Integer)props.get(WorkflowModel.PROP_PRIORITY);
|
||||||
NodeRef workflowPackage = workflowTask.getPath().getInstance().getWorkflowPackage();
|
NodeRef workflowPackage = workflowTask.getPath().getInstance().getWorkflowPackage();
|
||||||
|
|
||||||
// Send notification
|
// Send notification
|
||||||
|
Reference in New Issue
Block a user