mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- activities for blog comments
- correct date encoding in rss blog/discussions feeds git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9983 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
<#assign username=userId>
|
||||||
|
<#if firstName?exists>
|
||||||
|
<#assign username = firstName + " " + lastName>
|
||||||
|
</#if>
|
||||||
|
<entry xmlns='http://www.w3.org/2005/Atom'>
|
||||||
|
<title>New comment for ${(itemTitle!'')?html}</title>
|
||||||
|
<link rel="alternate" type="text/html" href="${(browsePostUrl!'')?replace("&", "&")}" />
|
||||||
|
<id>${id}</id>
|
||||||
|
<updated>${xmldate(date)}</updated>
|
||||||
|
<summary type="html">
|
||||||
|
<![CDATA[${username} added a comment to <a href="${(browseItemUrl!'')}">${itemTitle!'unknown'}</a>]]>
|
||||||
|
</summary>
|
||||||
|
<author>
|
||||||
|
<name>${userId!""}</name>
|
||||||
|
</author>
|
||||||
|
</entry>
|
||||||
|
|
@@ -0,0 +1,17 @@
|
|||||||
|
<#assign username=userId>
|
||||||
|
<#if firstName?exists>
|
||||||
|
<#assign username = firstName + " " + lastName>
|
||||||
|
</#if>
|
||||||
|
<entry xmlns='http://www.w3.org/2005/Atom'>
|
||||||
|
<title>Comment deleted</title>
|
||||||
|
<link rel="alternate" type="text/html" href="${(browsePostListUrl!'')?replace("&", "&")}" />
|
||||||
|
<id>${id}</id>
|
||||||
|
<updated>${xmldate(date)}</updated>
|
||||||
|
<summary type="html">
|
||||||
|
<![CDATA[${username} deleted comment on <a href="${(browseItemUrl!'')}">${itemTitle!'unknown'}</a>]]>
|
||||||
|
</summary>
|
||||||
|
<author>
|
||||||
|
<name>${userId!""}</name>
|
||||||
|
</author>
|
||||||
|
</entry>
|
||||||
|
|
@@ -0,0 +1,17 @@
|
|||||||
|
<#assign username=userId>
|
||||||
|
<#if firstName?exists>
|
||||||
|
<#assign username = firstName + " " + lastName>
|
||||||
|
</#if>
|
||||||
|
<entry xmlns='http://www.w3.org/2005/Atom'>
|
||||||
|
<title>Comment updated</title>
|
||||||
|
<link rel="alternate" type="text/html" href="${(browsePostUrl!'')?replace("&", "&")}" />
|
||||||
|
<id>${id}</id>
|
||||||
|
<updated>${xmldate(date)}</updated>
|
||||||
|
<summary type="html">
|
||||||
|
<![CDATA[${username} updated comment on <a href="${(browseItemUrl!'')}">${itemTitle!'unknown'}</a>]]>
|
||||||
|
</summary>
|
||||||
|
<author>
|
||||||
|
<name>${userId!""}</name>
|
||||||
|
</author>
|
||||||
|
</entry>
|
||||||
|
|
@@ -28,6 +28,19 @@ function main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
deleteComment(node);
|
deleteComment(node);
|
||||||
|
|
||||||
|
// post an activitiy item, but only if we got a site
|
||||||
|
if ((args["site"] != undefined) &&
|
||||||
|
(args["container"] != undefined) &&
|
||||||
|
(args["itemTitle"] != undefined) &&
|
||||||
|
(args["browseItemUrl"] != undefined))
|
||||||
|
{
|
||||||
|
var data = {
|
||||||
|
itemTitle: decodeURIComponent(args["itemTitle"]),
|
||||||
|
browseItemUrl: decodeURIComponent(args["browseItemUrl"])
|
||||||
|
}
|
||||||
|
activities.postActivity("org.alfresco.comments.comment-deleted", args["site"], args["container"], jsonUtils.toJSONString(data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
@@ -31,8 +31,20 @@ function main()
|
|||||||
|
|
||||||
// update comment
|
// update comment
|
||||||
updateComment(node);
|
updateComment(node);
|
||||||
|
|
||||||
model.item = getCommentData(node);
|
model.item = getCommentData(node);
|
||||||
|
|
||||||
|
// post an activitiy item, but only if we got a site
|
||||||
|
if (json.has("site") &&
|
||||||
|
json.has("container") &&
|
||||||
|
json.has("itemTitle") &&
|
||||||
|
json.has("browseItemUrl"))
|
||||||
|
{
|
||||||
|
var data = {
|
||||||
|
itemTitle: json.get("itemTitle"),
|
||||||
|
browseItemUrl: json.get("browseItemUrl")
|
||||||
|
}
|
||||||
|
activities.postActivity("org.alfresco.comments.comment-updated", json.get("site"), json.get("container"), jsonUtils.toJSONString(data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
@@ -42,6 +42,19 @@ function main()
|
|||||||
|
|
||||||
var comment = addComment(node);
|
var comment = addComment(node);
|
||||||
model.item = getCommentData(comment);
|
model.item = getCommentData(comment);
|
||||||
|
|
||||||
|
// post an activitiy item, but only if we got a site
|
||||||
|
if (json.has("site") &&
|
||||||
|
json.has("container") &&
|
||||||
|
json.has("itemTitle") &&
|
||||||
|
json.has("browseItemUrl"))
|
||||||
|
{
|
||||||
|
var data = {
|
||||||
|
itemTitle: json.get("itemTitle"),
|
||||||
|
browseItemUrl: json.get("browseItemUrl")
|
||||||
|
}
|
||||||
|
activities.postActivity("org.alfresco.comments.comment-created", json.get("site"), json.get("container"), jsonUtils.toJSONString(data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
Reference in New Issue
Block a user