RM DocLib checkpoint

Copy-to action switches to RM data webscripts when selecting RM site type for destination.
Cleaned up component definitions in detail pages.
RM-specific path on detail pages.
Icon and Container type on detail pages.
Imported new icons from UX team.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15215 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2009-07-16 07:03:14 +00:00
parent 7d5677a155
commit 9129e3db47
3 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
<webscript>
<shortname>containers</shortname>
<description>Document List Component - Site Containers query</description>
<url>/slingshot/doclib/containers/{site}</url>
<format default="json">argument</format>
<authentication>user</authentication>
<transaction>required</transaction>
</webscript>

View File

@@ -0,0 +1,27 @@
/**
* TODO: This webscript should get all the site's containers and return the Document Library ones.
* Unfortunately, there's no way to distinguish them, so we can only return the one called "documentLibrary".
*/
function main()
{
// site input
var siteId = url.templateArgs.site;
siteNode = siteService.getSite(siteId);
if (siteNode === null)
{
status.setCode(status.STATUS_NOT_FOUND, "Site not found: '" + siteId + "'");
return null;
}
var containerNode = siteNode.getContainer("documentLibrary");
if (containerNode === null)
{
status.setCode(status.STATUS_NOT_FOUND, "Document Library container '" + containerId + "' not found in '" + siteId + "'. (No permission?)");
return null;
}
model.containers = [containerNode];
}
main();

View File

@@ -0,0 +1,15 @@
<#escape x as jsonUtils.encodeJSONString(x)>
{
"containers":
[
<#list containers as container>
{
"name": "${container.name}",
"description": "${container.properties.description!""}",
"nodeRef": "${container.nodeRef}",
"type": "${container.typeShort}"
}<#if container_has_next>,</#if>
</#list>
]
}
</#escape>