mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-11514: ALL LANG - Following_email Templates updated/localised
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32412 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -529,7 +529,7 @@
|
|||||||
</props>
|
</props>
|
||||||
<props>
|
<props>
|
||||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname}</prop>
|
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname}</prop>
|
||||||
<prop key="location">alfresco/templates/following-email-templates.acp</prop>
|
<prop key="location">alfresco/templates/following-email-templates.xml</prop>
|
||||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||||
</props>
|
</props>
|
||||||
<props>
|
<props>
|
||||||
|
@@ -442,3 +442,7 @@ patch.sitesSpacePermissions.result.none=Permissions corrections not required.
|
|||||||
|
|
||||||
patch.updateWorkflowNotificationTemplates.description=Patch to update the workflow notification templates.
|
patch.updateWorkflowNotificationTemplates.description=Patch to update the workflow notification templates.
|
||||||
patch.updateWorkflowNotificationTemplates.result=Workflow Notification Templates successfully updated.
|
patch.updateWorkflowNotificationTemplates.result=Workflow Notification Templates successfully updated.
|
||||||
|
|
||||||
|
patch.updateFollowingEmailTemplatesPatch.description=Patch to update the following notification email templates.
|
||||||
|
patch.updateFollowingEmailTemplatesPatch.result=Following notification email templates successfully updated.
|
||||||
|
patch.updateFollowingEmailTemplatesPatch.error=Error retrieving base template when trying to patch the following email templates.
|
||||||
|
@@ -2486,7 +2486,7 @@
|
|||||||
<property name="bootstrapView">
|
<property name="bootstrapView">
|
||||||
<props>
|
<props>
|
||||||
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname}</prop>
|
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.email.childname}</prop>
|
||||||
<prop key="location">alfresco/templates/following-email-templates.acp</prop>
|
<prop key="location">alfresco/templates/following-email-templates.xml</prop>
|
||||||
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
|
||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
@@ -2961,4 +2961,17 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="patch.updateFollowingEmailTemplatesPatch" class="org.alfresco.repo.admin.patch.impl.UpdateFollowingEmailTemplatesPatch" parent="basePatch">
|
||||||
|
<property name="id"><value>patch.updateFollowingEmailTemplatesPatch</value></property>
|
||||||
|
<property name="description"><value>patch.updateFollowingEmailTemplatesPatch.description</value></property>
|
||||||
|
<property name="fixesFromSchema"><value>0</value></property>
|
||||||
|
<property name="fixesToSchema"><value>5021</value></property>
|
||||||
|
<property name="targetSchema"><value>5022</value></property>
|
||||||
|
<property name="requiresTransaction"><value>true</value></property>
|
||||||
|
<property name="applyToTenants"><value>true</value></property>
|
||||||
|
<property name="contentService" ref="ContentService"/>
|
||||||
|
<property name="fileFolderService" ref="FileFolderService"/>
|
||||||
|
<property name="repository" ref="repositoryHelper"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
105
config/alfresco/templates/following-email-templates.xml
Normal file
105
config/alfresco/templates/following-email-templates.xml
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
|
||||||
|
|
||||||
|
<cm:folder view:childName="app:following" xmlns="" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rn="http://www.alfresco.org/model/rendition/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:lnk="http://www.alfresco.org/model/linksmodel/1.0" xmlns:gd="http://www.alfresco.org/model/googledocs/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cmiscustom="http://www.alfresco.org/model/cmis/custom" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:emailserver="http://www.alfresco.org/model/emailserver/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:ia="http://www.alfresco.org/model/calendar" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:dl="http://www.alfresco.org/model/datalist/1.0" xmlns:st="http://www.alfresco.org/model/site/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:custom="custom.model" xmlns:exif="http://www.alfresco.org/model/exif/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:module="http://www.alfresco.org/system/modules/1.0" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:blg="http://www.alfresco.org/model/blogintegration/1.0" xmlns:alf="http://www.alfresco.org" xmlns:cmis="http://www.alfresco.org/model/cmis/1.0/cs01" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:inwf="http://www.alfresco.org/model/workflow/invite/nominated/1.0" xmlns:imap="http://www.alfresco.org/model/imap/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:reg="http://www.alfresco.org/system/registry/1.0" xmlns:ver2="http://www.alfresco.org/model/versionstore/2.0" xmlns:stcp="http://www.alfresco.org/model/sitecustomproperty/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:imwf="http://www.alfresco.org/model/workflow/invite/moderated/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" xmlns:trx="http://www.alfresco.org/model/transfer/1.0">
|
||||||
|
<view:properties>
|
||||||
|
<cm:name>${spaces.templates.email.following.name}</cm:name>
|
||||||
|
<cm:title>${spaces.templates.email.following.name}</cm:title>
|
||||||
|
<cm:description>${spaces.templates.email.following.description}</cm:description>
|
||||||
|
</view:properties>
|
||||||
|
<view:associations>
|
||||||
|
<cm:contains>
|
||||||
|
<cm:content view:childName="cm:following-email.html.ftl">
|
||||||
|
<view:aspects>
|
||||||
|
<cm:auditable></cm:auditable>
|
||||||
|
<sys:referenceable></sys:referenceable>
|
||||||
|
<app:inlineeditable></app:inlineeditable>
|
||||||
|
</view:aspects>
|
||||||
|
<view:acl></view:acl>
|
||||||
|
<view:properties>
|
||||||
|
<app:editInline>true</app:editInline>
|
||||||
|
<cm:name>following-email.html.ftl</cm:name>
|
||||||
|
<cm:title>following-email.html.ftl</cm:title>
|
||||||
|
<cm:description>${email.templates.email_template_for_following_notifications} - ${version.default}</cm:description>
|
||||||
|
<cm:content>contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html.ftl|mimetype=text/plain|size=3688|encoding=UTF-8</cm:content>
|
||||||
|
</view:properties>
|
||||||
|
</cm:content>
|
||||||
|
<cm:content view:childName="cm:following-email.html_de.ftl">
|
||||||
|
<view:aspects>
|
||||||
|
<cm:auditable></cm:auditable>
|
||||||
|
<sys:referenceable></sys:referenceable>
|
||||||
|
<app:inlineeditable></app:inlineeditable>
|
||||||
|
</view:aspects>
|
||||||
|
<view:acl></view:acl>
|
||||||
|
<view:properties>
|
||||||
|
<app:editInline>true</app:editInline>
|
||||||
|
<cm:name>following-email.html_de.ftl</cm:name>
|
||||||
|
<cm:title>following-email.html_de.ftl</cm:title>
|
||||||
|
<cm:description>${email.templates.email_template_for_following_notifications} - ${version.default}</cm:description>
|
||||||
|
<cm:content>contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html_de.ftl|mimetype=text/plain|size=3688|encoding=UTF-8</cm:content>
|
||||||
|
</view:properties>
|
||||||
|
</cm:content>
|
||||||
|
<cm:content view:childName="cm:following-email.html_es.ftl">
|
||||||
|
<view:aspects>
|
||||||
|
<cm:auditable></cm:auditable>
|
||||||
|
<sys:referenceable></sys:referenceable>
|
||||||
|
<app:inlineeditable></app:inlineeditable>
|
||||||
|
</view:aspects>
|
||||||
|
<view:acl></view:acl>
|
||||||
|
<view:properties>
|
||||||
|
<app:editInline>true</app:editInline>
|
||||||
|
<cm:name>following-email.html_es.ftl</cm:name>
|
||||||
|
<cm:title>following-email.html_es.ftl</cm:title>
|
||||||
|
<cm:description>${email.templates.email_template_for_following_notifications} - ${version.default}</cm:description>
|
||||||
|
<cm:content>contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html_es.ftl|mimetype=text/plain|size=3688|encoding=UTF-8</cm:content>
|
||||||
|
</view:properties>
|
||||||
|
</cm:content>
|
||||||
|
<cm:content view:childName="cm:following-email.html_fr.ftl">
|
||||||
|
<view:aspects>
|
||||||
|
<cm:auditable></cm:auditable>
|
||||||
|
<sys:referenceable></sys:referenceable>
|
||||||
|
<app:inlineeditable></app:inlineeditable>
|
||||||
|
</view:aspects>
|
||||||
|
<view:acl></view:acl>
|
||||||
|
<view:properties>
|
||||||
|
<app:editInline>true</app:editInline>
|
||||||
|
<cm:name>following-email.html_fr.ftl</cm:name>
|
||||||
|
<cm:title>following-email.html_fr.ftl</cm:title>
|
||||||
|
<cm:description>${email.templates.email_template_for_following_notifications} - ${version.default}</cm:description>
|
||||||
|
<cm:content>contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html_fr.ftl|mimetype=text/plain|size=3688|encoding=UTF-8</cm:content>
|
||||||
|
</view:properties>
|
||||||
|
</cm:content>
|
||||||
|
<cm:content view:childName="cm:following-email.html_it.ftl">
|
||||||
|
<view:aspects>
|
||||||
|
<cm:auditable></cm:auditable>
|
||||||
|
<sys:referenceable></sys:referenceable>
|
||||||
|
<app:inlineeditable></app:inlineeditable>
|
||||||
|
</view:aspects>
|
||||||
|
<view:acl></view:acl>
|
||||||
|
<view:properties>
|
||||||
|
<app:editInline>true</app:editInline>
|
||||||
|
<cm:name>following-email.html_it.ftl</cm:name>
|
||||||
|
<cm:title>following-email.html_it.ftl</cm:title>
|
||||||
|
<cm:description>${email.templates.email_template_for_following_notifications} - ${version.default}</cm:description>
|
||||||
|
<cm:content>contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html_it.ftl|mimetype=text/plain|size=3688|encoding=UTF-8</cm:content>
|
||||||
|
</view:properties>
|
||||||
|
</cm:content>
|
||||||
|
<cm:content view:childName="cm:following-email.html_ja.ftl">
|
||||||
|
<view:aspects>
|
||||||
|
<cm:auditable></cm:auditable>
|
||||||
|
<sys:referenceable></sys:referenceable>
|
||||||
|
<app:inlineeditable></app:inlineeditable>
|
||||||
|
</view:aspects>
|
||||||
|
<view:acl></view:acl>
|
||||||
|
<view:properties>
|
||||||
|
<app:editInline>true</app:editInline>
|
||||||
|
<cm:name>following-email.html_ja.ftl</cm:name>
|
||||||
|
<cm:title>following-email.html_ja.ftl</cm:title>
|
||||||
|
<cm:description>${email.templates.email_template_for_following_notifications} - ${version.default}</cm:description>
|
||||||
|
<cm:content>contentUrl=classpath:alfresco/templates/following-email-templates/following-email.html_ja.ftl|mimetype=text/plain|size=3688|encoding=UTF-8</cm:content>
|
||||||
|
</view:properties>
|
||||||
|
</cm:content>
|
||||||
|
</cm:contains>
|
||||||
|
</view:associations>
|
||||||
|
</cm:folder>
|
||||||
|
</view:view>
|
@@ -0,0 +1,76 @@
|
|||||||
|
<html>
|
||||||
|
<#assign followerFullName>${followerFirstName} ${followerLastName}</#assign>
|
||||||
|
<#assign followerLink><a href="${shareUrl}/page/user/${followerUserName?url('ISO-8859-1')}/profile">${(followerFullName?trim)?html}</a></#assign>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<style type="text/css"><!--
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4c4c4c;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, a:visited
|
||||||
|
{
|
||||||
|
color: #0072cf;
|
||||||
|
}
|
||||||
|
--></style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#dddddd">
|
||||||
|
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" align="center">
|
||||||
|
<table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px 0px;">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img src="${shareUrl}/res/components/images/help-people-bw-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="font-size: 22px; padding-bottom: 4px;">
|
||||||
|
${followerLink} is now following you.
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followerJobTitle??>${followerJobTitle?html}<br/></#if>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followingCount > 0><span style="font-weight:bold">${followingCount}</span> Following. </#if><span style="font-weight:bold">${followerCount}</span> Followers.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="border-bottom: 1px solid #aaaaaa;"> </div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px;">
|
||||||
|
<img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -0,0 +1,76 @@
|
|||||||
|
<html>
|
||||||
|
<#assign followerFullName>${followerFirstName} ${followerLastName}</#assign>
|
||||||
|
<#assign followerLink><a href="${shareUrl}/page/user/${followerUserName?url('ISO-8859-1')}/profile">${(followerFullName?trim)?html}</a></#assign>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<style type="text/css"><!--
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4c4c4c;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, a:visited
|
||||||
|
{
|
||||||
|
color: #0072cf;
|
||||||
|
}
|
||||||
|
--></style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#dddddd">
|
||||||
|
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" align="center">
|
||||||
|
<table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px 0px;">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img src="${shareUrl}/res/components/images/help-people-bw-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="font-size: 22px; padding-bottom: 4px;">
|
||||||
|
${followerLink} folgt Ihnen.
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followerJobTitle??>${followerJobTitle?html}<br/></#if>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followingCount > 0><span style="font-weight:bold">Sie folgen ${followingCount}</span> Mitarbeitern. </#if><span style="font-weight:bold">Ihnen folgen ${followerCount}</span> Mitarbeiter.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="border-bottom: 1px solid #aaaaaa;"> </div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px;">
|
||||||
|
<img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -0,0 +1,76 @@
|
|||||||
|
<html>
|
||||||
|
<#assign followerFullName>${followerFirstName} ${followerLastName}</#assign>
|
||||||
|
<#assign followerLink><a href="${shareUrl}/page/user/${followerUserName?url('ISO-8859-1')}/profile">${(followerFullName?trim)?html}</a></#assign>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<style type="text/css"><!--
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4c4c4c;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, a:visited
|
||||||
|
{
|
||||||
|
color: #0072cf;
|
||||||
|
}
|
||||||
|
--></style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#dddddd">
|
||||||
|
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" align="center">
|
||||||
|
<table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px 0px;">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img src="${shareUrl}/res/components/images/help-people-bw-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="font-size: 22px; padding-bottom: 4px;">
|
||||||
|
${followerLink} est<73> sigui<75>ndole ahora.
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followerJobTitle??>${followerJobTitle?html}<br/></#if>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followingCount > 0><span style="font-weight:bold">Est<73> siguiendo a ${followingCount}</span>. </#if><span style="font-weight:bold">Tiene ${followerCount}</span> seguidores.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="border-bottom: 1px solid #aaaaaa;"> </div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px;">
|
||||||
|
<img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -0,0 +1,76 @@
|
|||||||
|
<html>
|
||||||
|
<#assign followerFullName>${followerFirstName} ${followerLastName}</#assign>
|
||||||
|
<#assign followerLink><a href="${shareUrl}/page/user/${followerUserName?url('ISO-8859-1')}/profile">${(followerFullName?trim)?html}</a></#assign>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<style type="text/css"><!--
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4c4c4c;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, a:visited
|
||||||
|
{
|
||||||
|
color: #0072cf;
|
||||||
|
}
|
||||||
|
--></style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#dddddd">
|
||||||
|
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" align="center">
|
||||||
|
<table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px 0px;">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img src="${shareUrl}/res/components/images/help-people-bw-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="font-size: 22px; padding-bottom: 4px;">
|
||||||
|
${followerLink} vous suit actuellement.
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followerJobTitle??>${followerJobTitle?html}<br/></#if>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followingCount > 0><span style="font-weight:bold">${followingCount}</span> suivis en cours. </#if><span style="font-weight:bold">${followerCount}</span> suiveurs.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="border-bottom: 1px solid #aaaaaa;"> </div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px;">
|
||||||
|
<img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -0,0 +1,76 @@
|
|||||||
|
<html>
|
||||||
|
<#assign followerFullName>${followerFirstName} ${followerLastName}</#assign>
|
||||||
|
<#assign followerLink><a href="${shareUrl}/page/user/${followerUserName?url('ISO-8859-1')}/profile">${(followerFullName?trim)?html}</a></#assign>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<style type="text/css"><!--
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4c4c4c;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, a:visited
|
||||||
|
{
|
||||||
|
color: #0072cf;
|
||||||
|
}
|
||||||
|
--></style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#dddddd">
|
||||||
|
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" align="center">
|
||||||
|
<table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px 0px;">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img src="${shareUrl}/res/components/images/help-people-bw-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="font-size: 22px; padding-bottom: 4px;">
|
||||||
|
${followerLink} is now following you.
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followerJobTitle??>${followerJobTitle?html}<br/></#if>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followingCount > 0><span style="font-weight:bold">${followingCount}</span> Following. </#if><span style="font-weight:bold">${followerCount}</span> Followers.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="border-bottom: 1px solid #aaaaaa;"> </div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px;">
|
||||||
|
<img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -0,0 +1,76 @@
|
|||||||
|
<html>
|
||||||
|
<#assign followerFullName>${followerFirstName} ${followerLastName}</#assign>
|
||||||
|
<#assign followerLink><a href="${shareUrl}/page/user/${followerUserName?url('ISO-8859-1')}/profile">${(followerFullName?trim)?html}</a></#assign>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<style type="text/css"><!--
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4c4c4c;
|
||||||
|
}
|
||||||
|
|
||||||
|
a, a:visited
|
||||||
|
{
|
||||||
|
color: #0072cf;
|
||||||
|
}
|
||||||
|
--></style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body bgcolor="#dddddd">
|
||||||
|
<table width="100%" cellpadding="20" cellspacing="0" border="0" bgcolor="#dddddd">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" align="center">
|
||||||
|
<table width="70%" cellpadding="0" cellspacing="0" bgcolor="white" style="background-color: white; border: 1px solid #aaaaaa;">
|
||||||
|
<tr>
|
||||||
|
<td width="100%">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px 0px;">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<img src="${shareUrl}/res/components/images/help-people-bw-64.png" alt="" width="64" height="64" border="0" style="padding-right: 20px;" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="font-size: 22px; padding-bottom: 4px;">
|
||||||
|
${followerLink} はあなたをフォーロー中です.
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followerJobTitle??>${followerJobTitle?html}<br/></#if>
|
||||||
|
</div>
|
||||||
|
<div style="font-size: 13px;">
|
||||||
|
<#if followingCount > 0><span style="font-weight:bold">${followingCount}</span> 人がフォローしてます. </#if><span style="font-weight:bold">${followerCount}</span> 人のフォローワー.
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="border-bottom: 1px solid #aaaaaa;"> </div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 30px;">
|
||||||
|
<img src="${shareUrl}/themes/default/images/app-logo.png" alt="" width="117" height="48" border="0" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -19,4 +19,4 @@ version.build=@build-number@
|
|||||||
|
|
||||||
# Schema number
|
# Schema number
|
||||||
|
|
||||||
version.schema=5021
|
version.schema=5022
|
||||||
|
@@ -42,8 +42,7 @@ public class DatePropertyValueComparator implements PropertyValueComparator
|
|||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.action.evaluator.compare.PropertyValueComparator#compare(java.io.Serializable, java.io.Serializable, org.alfresco.repo.action.evaluator.compare.ComparePropertyValueOperation)
|
* @see org.alfresco.repo.action.evaluator.compare.PropertyValueComparator#compare(java.io.Serializable, java.io.Serializable, org.alfresco.repo.action.evaluator.compare.ComparePropertyValueOperation)
|
||||||
*/
|
*/
|
||||||
public boolean compare(Serializable propertyValue,
|
public boolean compare(Serializable propertyValue, Serializable compareValue, ComparePropertyValueOperation operation)
|
||||||
Serializable compareValue, ComparePropertyValueOperation operation)
|
|
||||||
{
|
{
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
|
|
||||||
@@ -94,7 +93,8 @@ public class DatePropertyValueComparator implements PropertyValueComparator
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Date getDate(Serializable value) {
|
private Date getDate(Serializable value)
|
||||||
|
{
|
||||||
if(value instanceof Date)
|
if(value instanceof Date)
|
||||||
{
|
{
|
||||||
return (Date) value;
|
return (Date) value;
|
||||||
|
@@ -0,0 +1,138 @@
|
|||||||
|
/*
|
||||||
|
* 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.admin.patch.impl;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.repo.admin.patch.AbstractPatch;
|
||||||
|
import org.alfresco.service.cmr.model.FileFolderService;
|
||||||
|
import org.alfresco.service.cmr.repository.ContentService;
|
||||||
|
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Roy Wetherall
|
||||||
|
*/
|
||||||
|
public abstract class GenericEMailTemplateUpdatePatch extends AbstractPatch
|
||||||
|
{
|
||||||
|
protected static final String[] LOCALES = new String[] {"de", "es", "fr", "it", "ja"};
|
||||||
|
|
||||||
|
protected ContentService contentService;
|
||||||
|
|
||||||
|
protected FileFolderService fileFolderService;
|
||||||
|
|
||||||
|
private boolean createSiblingIfMissing = true;
|
||||||
|
|
||||||
|
public void setContentService(ContentService contentService)
|
||||||
|
{
|
||||||
|
this.contentService = contentService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileFolderService(FileFolderService fileFolderService)
|
||||||
|
{
|
||||||
|
this.fileFolderService = fileFolderService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateSiblingIfMissing(boolean createSiblingIfMissing)
|
||||||
|
{
|
||||||
|
this.createSiblingIfMissing = createSiblingIfMissing;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateTemplates() throws Exception
|
||||||
|
{
|
||||||
|
NodeRef baseTemplate = getBaseTemplate();
|
||||||
|
if (nodeService.exists(baseTemplate) == true)
|
||||||
|
{
|
||||||
|
updateContent(baseTemplate, getPath(), getBaseFileName());
|
||||||
|
|
||||||
|
for (String siblingFile : getSiblingFiles())
|
||||||
|
{
|
||||||
|
updateSiblingContent(baseTemplate, getPath(), siblingFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract NodeRef getBaseTemplate();
|
||||||
|
|
||||||
|
protected abstract String getPath();
|
||||||
|
|
||||||
|
protected abstract String getBaseFileName();
|
||||||
|
|
||||||
|
protected String[] getLocales()
|
||||||
|
{
|
||||||
|
return LOCALES;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<String> getSiblingFiles()
|
||||||
|
{
|
||||||
|
List<String> siblingFiles = new ArrayList<String>(LOCALES.length);
|
||||||
|
for (String locale : LOCALES)
|
||||||
|
{
|
||||||
|
siblingFiles.add(makeSiblingFileName(getBaseFileName(), locale));
|
||||||
|
}
|
||||||
|
return siblingFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String makeSiblingFileName(String baseFileName, String locale)
|
||||||
|
{
|
||||||
|
int index = baseFileName.lastIndexOf(".");
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append(baseFileName.substring(0, index))
|
||||||
|
.append("_")
|
||||||
|
.append(locale)
|
||||||
|
.append(baseFileName.substring(index));
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateSiblingContent(NodeRef nodeRef, String path, String fileName)
|
||||||
|
{
|
||||||
|
NodeRef parent = nodeService.getPrimaryParent(nodeRef).getParentRef();
|
||||||
|
if (parent != null)
|
||||||
|
{
|
||||||
|
NodeRef sibling = fileFolderService.searchSimple(parent, fileName);
|
||||||
|
if (sibling != null)
|
||||||
|
{
|
||||||
|
updateContent(sibling, path, fileName);
|
||||||
|
}
|
||||||
|
else if (createSiblingIfMissing == true)
|
||||||
|
{
|
||||||
|
sibling = fileFolderService.create(parent, fileName, ContentModel.TYPE_CONTENT).getNodeRef();
|
||||||
|
updateContent(sibling, path, fileName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateContent(NodeRef nodeRef, String path, String fileName)
|
||||||
|
{
|
||||||
|
// Make versionable
|
||||||
|
nodeService.addAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE, null);
|
||||||
|
|
||||||
|
// Update content
|
||||||
|
InputStream is = this.getClass().getClassLoader().getResourceAsStream(path + fileName);
|
||||||
|
if (is != null)
|
||||||
|
{
|
||||||
|
ContentWriter contentWriter = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);
|
||||||
|
contentWriter.putContent(is);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* 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.admin.patch.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
|
import org.alfresco.repo.model.Repository;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update following email templates patch
|
||||||
|
*
|
||||||
|
* @author Roy Wetherall
|
||||||
|
*/
|
||||||
|
public class UpdateFollowingEmailTemplatesPatch extends GenericEMailTemplateUpdatePatch
|
||||||
|
{
|
||||||
|
private Repository repository;
|
||||||
|
|
||||||
|
private static final String PATH = "alfresco/templates/following-email-templates/";
|
||||||
|
private static final String BASE_FILE = "following-email.html.ftl";
|
||||||
|
private static final String XPATH = "/app:company_home/app:dictionary/app:email_templates/app:following/cm:following-email.html.ftl";
|
||||||
|
|
||||||
|
public void setRepository(Repository repository)
|
||||||
|
{
|
||||||
|
this.repository = repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getPath()
|
||||||
|
{
|
||||||
|
return PATH;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getBaseFileName()
|
||||||
|
{
|
||||||
|
return BASE_FILE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected NodeRef getBaseTemplate()
|
||||||
|
{
|
||||||
|
List<NodeRef> refs = searchService.selectNodes(
|
||||||
|
repository.getRootHome(),
|
||||||
|
XPATH,
|
||||||
|
null,
|
||||||
|
namespaceService,
|
||||||
|
false);
|
||||||
|
if (refs.size() != 1)
|
||||||
|
{
|
||||||
|
throw new AlfrescoRuntimeException(I18NUtil.getMessage("patch.updateFollowingEmailTemplatesPatch.error"));
|
||||||
|
}
|
||||||
|
return refs.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.alfresco.repo.admin.patch.AbstractPatch#applyInternal()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected String applyInternal() throws Exception
|
||||||
|
{
|
||||||
|
updateTemplates();
|
||||||
|
return I18NUtil.getMessage("patch.updateFollowingEmailTemplatesPatch.result");
|
||||||
|
}
|
||||||
|
}
|
@@ -18,14 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.repo.admin.patch.impl;
|
package org.alfresco.repo.admin.patch.impl;
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
|
||||||
import org.alfresco.repo.admin.patch.AbstractPatch;
|
|
||||||
import org.alfresco.repo.workflow.WorkflowNotificationUtils;
|
import org.alfresco.repo.workflow.WorkflowNotificationUtils;
|
||||||
import org.alfresco.service.cmr.model.FileFolderService;
|
|
||||||
import org.alfresco.service.cmr.repository.ContentService;
|
|
||||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.springframework.extensions.surf.util.I18NUtil;
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
|
|
||||||
@@ -34,28 +27,27 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
|||||||
*
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
*/
|
*/
|
||||||
public class UpdateWorkflowNotificationTemplatesPatch extends AbstractPatch
|
public class UpdateWorkflowNotificationTemplatesPatch extends GenericEMailTemplateUpdatePatch
|
||||||
{
|
{
|
||||||
private ContentService contentService;
|
|
||||||
|
|
||||||
private FileFolderService fileFolderService;
|
|
||||||
|
|
||||||
private static final String PATH = "alfresco/bootstrap/notification/";
|
private static final String PATH = "alfresco/bootstrap/notification/";
|
||||||
private static final String BASE_FILE = "wf-email.html.ftl";
|
private static final String BASE_FILE = "wf-email.html.ftl";
|
||||||
private static final String DE_FILE = "wf-email.html_de.ftl";
|
|
||||||
private static final String ES_FILE = "wf-email.html_es.ftl";
|
|
||||||
private static final String FR_FILE = "wf-email.html_fr.ftl";
|
|
||||||
private static final String IT_FILE = "wf-email.html_it.ftl";
|
|
||||||
private static final String JA_FILE = "wf-email.html_ja.ftl";
|
|
||||||
|
|
||||||
public void setContentService(ContentService contentService)
|
@Override
|
||||||
|
protected String getPath()
|
||||||
{
|
{
|
||||||
this.contentService = contentService;
|
return PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFileFolderService(FileFolderService fileFolderService)
|
@Override
|
||||||
|
protected String getBaseFileName()
|
||||||
{
|
{
|
||||||
this.fileFolderService = fileFolderService;
|
return BASE_FILE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected NodeRef getBaseTemplate()
|
||||||
|
{
|
||||||
|
return WorkflowNotificationUtils.WF_ASSIGNED_TEMPLATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,45 +56,7 @@ public class UpdateWorkflowNotificationTemplatesPatch extends AbstractPatch
|
|||||||
@Override
|
@Override
|
||||||
protected String applyInternal() throws Exception
|
protected String applyInternal() throws Exception
|
||||||
{
|
{
|
||||||
NodeRef baseTemplate = WorkflowNotificationUtils.WF_ASSIGNED_TEMPLATE;
|
updateTemplates();
|
||||||
if (nodeService.exists(baseTemplate) == true)
|
|
||||||
{
|
|
||||||
updateContent(baseTemplate, PATH, BASE_FILE);
|
|
||||||
updateSiblingContent(baseTemplate, PATH, DE_FILE);
|
|
||||||
updateSiblingContent(baseTemplate, PATH, ES_FILE);
|
|
||||||
updateSiblingContent(baseTemplate, PATH, FR_FILE);
|
|
||||||
updateSiblingContent(baseTemplate, PATH, IT_FILE);
|
|
||||||
updateSiblingContent(baseTemplate, PATH, JA_FILE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return I18NUtil.getMessage("patch.updateWorkflowNotificationTemplates.result");
|
return I18NUtil.getMessage("patch.updateWorkflowNotificationTemplates.result");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateSiblingContent(NodeRef nodeRef, String path, String fileName)
|
|
||||||
{
|
|
||||||
NodeRef parent = nodeService.getPrimaryParent(nodeRef).getParentRef();
|
|
||||||
if (parent != null)
|
|
||||||
{
|
|
||||||
NodeRef sibling = fileFolderService.searchSimple(parent, fileName);
|
|
||||||
if (sibling != null)
|
|
||||||
{
|
|
||||||
updateContent(sibling, path, fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateContent(NodeRef nodeRef, String path, String fileName)
|
|
||||||
{
|
|
||||||
// Make versionable
|
|
||||||
nodeService.addAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE, null);
|
|
||||||
|
|
||||||
// Update content
|
|
||||||
InputStream is = this.getClass().getClassLoader().getResourceAsStream(path + fileName);
|
|
||||||
if (is != null)
|
|
||||||
{
|
|
||||||
ContentWriter contentWriter = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);
|
|
||||||
contentWriter.putContent(is);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user