10-10-2012 09:46 AM
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<!– Default (fallback) –>
<template id="default">
<line index="10" id="date">{date}{size}</line>
<line index="20" id="description" view="detailed">{description}</line>
<line index="30" id="tags" view="detailed">{tags}</line>
<!–line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line–>
<!–line index="50" id="social" view="detailed">{social}</line–>
</template>
</metadata-templates>
</config>
10-10-2012 01:01 PM
10-15-2012 04:42 AM
10-17-2012 10:01 AM
10-24-2012 08:30 AM
<!– Modified & Social –>
<div>
<#assign modifyUser = node.properties["cm:modifier"]>
<#assign modifyDate = node.properties["cm:modified"]>
<#assign modifierLink = userProfileLink(modifyUser.userName, modifyUser.displayName, 'class="theme-color-1"') >
${msg("label.modified-by-user-on-date", modifierLink, "<span id='${id}-modifyDate'>${modifyDate.iso8601}</span>")}
<#if showFavourite == "true">
<span id="${id}-favourite" class="item item-separator"></span>
</#if>
<#if showLikes == "true">
<span id="${id}-like" class="item item-separator"></span>
</#if>
<#if showComments == "false">
<span class="item item-separator item-social">
<a href="#" name="@commentNode" rel="${nodeRef?js_string}" class="theme-color-1 comment ${id}" title="${msg("comment.${itemType}.tip")}" tabindex="0">${msg("comment.${itemType}.label")}</a><#if commentCount??><span class="comment-count">${commentCount}</span></#if>
</span>
</#if>
<#if showQuickShare == "false">
<span id="${id}-quickshare" class="item item-separator"></span>
</#if>
</div>
10-31-2012 08:04 AM
<!–Remove Node-Header Details–>
<component>
<scope>template</scope>
<region-id>node-header</region-id>
<source-id>document-details</source-id>
<sub-components>
<sub-component id="default">
<evaluations>
<evaluation id="rm-nodeHeader">
<url>/components/node-details/node-header</url>
<properties>
<nodeRef>{nodeRef}</nodeRef>
<rootPage>documentlibrary</rootPage>
<rootLabelId>path.fileplan</rootLabelId>
<showFavourite>false</showFavourite>
<showLikes>false</showLikes>
<showComments>false</showComments>
<showQuickShare>false</showQuickShare>
</properties>
</evaluation>
</evaluations>
</sub-component>
</sub-components>
</component>
10-31-2012 08:15 AM
I can't find anything about sub-components of the document-details view. Is there a tutorial for a module available?
10-31-2012 10:04 AM
<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js">
function main()
{
AlfrescoUtil.param("nodeRef");
AlfrescoUtil.param("site", null);
AlfrescoUtil.param("rootPage", "documentlibrary");
AlfrescoUtil.param("rootLabelId", "path.documents");
AlfrescoUtil.param("showFavourite", "true");
AlfrescoUtil.param("showLikes", "true");
AlfrescoUtil.param("showComments", "false");
AlfrescoUtil.param("showQuickShare", "true");
AlfrescoUtil.param("showDownload", "true");
AlfrescoUtil.param("showPath", "true");
var nodeDetails = AlfrescoUtil.getNodeDetails(model.nodeRef, model.site);
if (nodeDetails)
{
model.item = nodeDetails.item;
model.node = nodeDetails.item.node;
model.isContainer = nodeDetails.item.node.isContainer;
model.paths = AlfrescoUtil.getPaths(nodeDetails, model.rootPage, model.rootLabelId);
model.showQuickShare = (!model.isContainer && model.showQuickShare && config.scoped["Social"]["quickshare"].getChildValue("url") != null).toString();
model.showComments = ((nodeDetails.item.node.permissions.user["CreateChildren"] || false) && model.showComments).toString();
model.showDownload = (!model.isContainer && model.showDownload).toString();
var count = nodeDetails.item.node.properties["fm:commentCount"];
model.commentCount = (count != undefined ? count : null);
// Widget instantiation metadata…
var likes = {};
if (model.item.likes != null)
{
likes.isLiked = model.item.likes.isLiked || false;
likes.totalLikes = model.item.likes.totalLikes || 0;
}
var nodeHeader = {
id : "NodeHeader",
name : "Alfresco.component.NodeHeader",
options : {
nodeRef : model.nodeRef,
siteId : model.site,
rootPage : model.rootPage,
rootLabelId : model.rootLabelId,
showDownload : Boolean(model.showDownload),
showPath : Boolean(model.showPath),
displayName : (model.item.displayName != null) ? model.item.displayName : model.item.fileName,
isFavourite : Boolean(model.item.isFavourite || false),
isContainer : Boolean(model.isContainer),
sharedId: model.item.node.properties["qshare:sharedId"] || null,
sharedBy: model.item.node.properties["qshare:sharedBy"] || null
}
};
model.widgets = [nodeHeader];
}
}
main();
10-31-2012 10:19 AM
for (var i=0; i<model.widgets.length; i++)
{
if (model.widgets[i].id == "NodeHeader")
{
model.widgets[i].options.showLikes = false;
}
}
06-20-2013 08:05 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.