mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Share Folder details page
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14298 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<@renderParent node.parent indent+" " />
|
||||
</#if>
|
||||
${indent}"type": "${node.typeShort}",
|
||||
${indent}"isContainer": ${node.isContainer?string},
|
||||
${indent}"hasChildren": ${(node.children?size > 0)?string},
|
||||
${indent}"name": "${node.properties.name!""}",
|
||||
${indent}"description": "${node.properties.description!""}",
|
||||
@@ -26,11 +27,11 @@
|
||||
<#list results as row>
|
||||
{
|
||||
"type": "${row.item.typeShort}",
|
||||
"isContainer": ${row.item.isContainer?string},
|
||||
"hasChildren": ${(row.item.children?size > 0)?string},
|
||||
"name": "${row.item.properties.name!""}",
|
||||
"description": "${row.item.properties.description!""}",
|
||||
"displayPath": "${row.item.displayPath!""}",
|
||||
"hasChildren": ${(row.item.children?size > 0)?string},
|
||||
"nodeRef": "${row.item.nodeRef}"<#if row.selectable?exists>,
|
||||
"selectable" : ${row.selectable?string}</#if>
|
||||
}<#if row_has_next>,</#if>
|
||||
|
@@ -14,7 +14,7 @@ function getDocList(filter)
|
||||
var items = new Array();
|
||||
var assets;
|
||||
|
||||
// Is our thumbnail tpe registered?
|
||||
// Is our thumbnail type registered?
|
||||
var haveThumbnails = thumbnailService.isThumbnailNameRegistered(THUMBNAIL_NAME);
|
||||
|
||||
// Use helper function to get the arguments
|
||||
@@ -73,7 +73,18 @@ function getDocList(filter)
|
||||
// Possibly an old indexed node - ignore it
|
||||
}
|
||||
}
|
||||
|
||||
var folderAssetsCount = folderAssets.length,
|
||||
documentAssetsCount = documentAssets.length;
|
||||
|
||||
if (url.templateArgs.type === "documents")
|
||||
{
|
||||
assets = documentAssets;
|
||||
}
|
||||
else
|
||||
{
|
||||
assets = folderAssets.concat(documentAssets);
|
||||
}
|
||||
|
||||
// Make a note of totalRecords before trimming the assets array
|
||||
var totalRecords = assets.length;
|
||||
@@ -261,6 +272,11 @@ function getDocList(filter)
|
||||
{
|
||||
luceneQuery: query,
|
||||
onlineEditing: utils.moduleInstalled("org.alfresco.module.vti"),
|
||||
itemCount:
|
||||
{
|
||||
folders: folderAssetsCount,
|
||||
documents: documentAssetsCount
|
||||
},
|
||||
paging:
|
||||
{
|
||||
startIndex: startIndex,
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<#assign workingCopyLabel = " " + message("coci_service.working_copy_label")>
|
||||
<#assign paging = doclist.paging>
|
||||
<#assign user = doclist.user>
|
||||
<#assign itemCount = doclist.itemCount>
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
{
|
||||
"totalRecords": ${paging.totalRecords?c},
|
||||
@@ -18,7 +19,12 @@
|
||||
"delete" : ${user.permissions.delete?string}
|
||||
}
|
||||
},
|
||||
"onlineEditing": ${doclist.onlineEditing?string}
|
||||
"onlineEditing": ${doclist.onlineEditing?string},
|
||||
"itemCounts":
|
||||
{
|
||||
"folders": ${(itemCount.folders!0)?string},
|
||||
"documents": ${(itemCount.documents!0)?string}
|
||||
}
|
||||
},
|
||||
"items":
|
||||
[
|
||||
|
@@ -108,6 +108,9 @@ function getFilterParams(filter, parsedArgs)
|
||||
var filterQuery = "+PATH:\"" + parsedArgs.parentNode.qnamePath + "/*\"";
|
||||
filterQuery += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
|
||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forums\"";
|
||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forum\"";
|
||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}topic\"";
|
||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}post\"";
|
||||
|
||||
filterParams.query = filterQuery;
|
||||
break;
|
||||
@@ -118,7 +121,7 @@ function getFilterParams(filter, parsedArgs)
|
||||
|
||||
const TYPE_MAP =
|
||||
{
|
||||
"documents": '+(TYPE:"{http://www.alfresco.org/model/content/1.0}content" OR TYPE:"{http://www.alfresco.org/model/application/1.0}filelink")',
|
||||
"documents": '+(TYPE:"{http://www.alfresco.org/model/content/1.0}content" OR TYPE:"{http://www.alfresco.org/model/application/1.0}filelink" OR TYPE:"{http://www.alfresco.org/model/content/1.0}folder")',
|
||||
"folders": '+TYPE:"{http://www.alfresco.org/model/content/1.0}folder"',
|
||||
"images": "-TYPE:\"{http://www.alfresco.org/model/content/1.0}thumbnail\" +@cm\\:content.mimetype:image/*"
|
||||
};
|
||||
|
@@ -10,7 +10,14 @@ function getTreenode(siteId, path)
|
||||
{
|
||||
try
|
||||
{
|
||||
var items = new Array();
|
||||
var items = new Array(),
|
||||
ignoredTypes =
|
||||
{
|
||||
"{http://www.alfresco.org/model/forum/1.0}forums": true,
|
||||
"{http://www.alfresco.org/model/forum/1.0}forum": true,
|
||||
"{http://www.alfresco.org/model/forum/1.0}topic": true,
|
||||
"{http://www.alfresco.org/model/forum/1.0}post": true
|
||||
};
|
||||
|
||||
// Use helper function to get the arguments
|
||||
var parsedArgs = getParsedArgs();
|
||||
@@ -22,7 +29,7 @@ function getTreenode(siteId, path)
|
||||
// Look for folders in the parentNode
|
||||
for each(item in parsedArgs.parentNode.children)
|
||||
{
|
||||
if (item.isSubType("cm:folder"))
|
||||
if (item.isSubType("cm:folder") && !(item.type in ignoredTypes))
|
||||
{
|
||||
items.push(item);
|
||||
}
|
||||
|
Reference in New Issue
Block a user