mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- removed highlight for blog/discussions/comments in case no actions are available
- some ui improvements for blog/discussions lists - comment components now check for permissions git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10540 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -14,26 +14,29 @@
|
||||
|
||||
<#--
|
||||
|
||||
This template renders a comment.
|
||||
This template renders a comment.
|
||||
|
||||
-->
|
||||
<#macro commentJSON item>
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
{
|
||||
"url" : "api/comment/node/${item.node.nodeRef?replace('://','/')}",
|
||||
"nodeRef" : "${item.node.nodeRef}",
|
||||
"name" : "${item.node.properties.name!''}",
|
||||
"url" : "api/comment/node/${item.node.nodeRef?replace('://','/')}",
|
||||
"nodeRef" : "${item.node.nodeRef}",
|
||||
"name" : "${item.node.properties.name!''}",
|
||||
"title" : "${item.node.properties.title!''}",
|
||||
"content" : "${stringUtils.stripUnsafeHTML(item.node.content)}",
|
||||
"content" : "${stringUtils.stripUnsafeHTML(item.node.content)}",
|
||||
<#if item.author??>
|
||||
<@renderPerson person=item.author fieldName="author" />
|
||||
<#else>
|
||||
"author" : { "username" : "${item.node.properties.creator}" },
|
||||
</#if>
|
||||
"createdOn" : "${item.node.properties.created?string("MMM dd yyyy HH:mm:ss 'GMT'Z '('zzz')'")}",
|
||||
"modifiedOn" : "${item.node.properties.modified?string("MMM dd yyyy HH:mm:ss 'GMT'Z '('zzz')'")}",
|
||||
"isUpdated" : ${item.isUpdated?string},
|
||||
"permissions" : {"edit" : true, "delete" : true}
|
||||
"createdOn" : "${item.node.properties.created?string("MMM dd yyyy HH:mm:ss 'GMT'Z '('zzz')'")}",
|
||||
"modifiedOn" : "${item.node.properties.modified?string("MMM dd yyyy HH:mm:ss 'GMT'Z '('zzz')'")}",
|
||||
"isUpdated" : ${item.isUpdated?string},
|
||||
"permissions" : {
|
||||
"edit" : ${item.node.hasPermission("Write")?string},
|
||||
"delete" : ${item.node.hasPermission("Delete")?string}
|
||||
}
|
||||
}
|
||||
</#escape>
|
||||
</#macro>
|
||||
|
@@ -26,6 +26,7 @@ function main()
|
||||
var count = args["pageSize"] != undefined ? parseInt(args["pageSize"]) : 10;
|
||||
|
||||
model.data = getCommentsList(node, index, count);
|
||||
model.node = node;
|
||||
}
|
||||
|
||||
main();
|
||||
|
@@ -1,6 +1,11 @@
|
||||
<#import "comment.lib.ftl" as commentLib/>
|
||||
<#import "../generic-paged-results.lib.ftl" as gen/>
|
||||
{
|
||||
"nodePermissions" : {
|
||||
"create" : ${node.hasPermission("CreateChildren")?string},
|
||||
"edit" : ${node.hasPermission("Write")?string},
|
||||
"delete" : ${node.hasPermission("Delete")?string}
|
||||
},
|
||||
<@gen.pagedResults data=data ; item>
|
||||
<@commentLib.commentJSON item=item />
|
||||
</@gen.pagedResults>
|
||||
|
Reference in New Issue
Block a user