Implemented ALF-3926 "F11 Workflow can be started with a context (current folder)"

- Better context/destination set for Start workflow when started form doclib 
- doclist REST api additions: metadata.container & items[].location.parent.nodeRef

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21743 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2010-08-11 16:32:03 +00:00
parent 99a6c0f890
commit f9ca7b5019
3 changed files with 17 additions and 1 deletions

View File

@@ -135,6 +135,11 @@ function getDoclist()
file: node.name
};
}
location.parent = {};
if (node.parent != null && node.parent.hasPermission("Read"))
{
location.parent.nodeRef = String(node.parent.nodeRef.toString());
}
// Resolved location
item.location = location;
@@ -163,6 +168,7 @@ function getDoclist()
totalRecords: totalRecords,
startIndex: startIndex
},
container: parsedArgs.rootNode,
parent: parent,
onlineEditing: utils.moduleInstalled("org.alfresco.module.vti"),
itemCount:

View File

@@ -5,6 +5,7 @@
"startIndex": ${doclist.paging.startIndex?c},
"metadata":
{
<#if doclist.container??>"container": "${doclist.container.nodeRef}",</#if>
"parent":
{
<#if doclist.parent??>

View File

@@ -63,7 +63,16 @@
"siteTitle": "${item.location.siteTitle!""}",
"container": "${item.location.container!""}",
"path": "${item.location.path!""}",
"file": "${item.location.file!""}"
"file": "${item.location.file!""}",
"parent":
{
<#if item.location.parent??>
<#assign parentLocation = item.location.parent>
<#if parentLocation??>
"nodeRef": "${parentLocation.nodeRef!""}"
</#if>
</#if>
}
},
"permissions":
{