06-25-2013 06:09 AM
<!– Document Rating –>
<component>
<region-id>document-rating</region-id>
<url>/components/document-details/document-rating</url>
<properties>
<nodeRef>{nodeRef}</nodeRef>
</properties>
</component>
<div class="yui-u">
<@region id="document-actions" scope="template"/>
<@region id="document-rating" scope="template"/>
<@region id="document-tags" scope="template"/>
<@region id="document-links" scope="template"/>
<@region id="document-metadata" scope="template"/>
<@region id="document-sync" scope="template"/>
<@region id="document-permissions" scope="template"/>
<@region id="document-workflows" scope="template"/>
<@region id="document-versions" scope="template"/>
<@region id="document-publishing" scope="template"/>
<#if imapServerEnabled>
<@region id="document-attachments" scope="template"/>
</#if>
</div>
<#if document??>
<!– Parameters and libs –>
<#include "/org/alfresco/include/alfresco-macros.lib.ftl" />
<#assign el=args.htmlid?js_string/>
<!– Markup –>
<div class="document-rating-header document-details-panel">
<h2 id="${el}-heading" class="thin dark">
${msg("heading")}
</h2>
<div id="${el}-formContainer"></div>
<script type="text/javascript">//<![CDATA[
Alfresco.util.createTwister("${el}-heading", "DocumentRating");
new Alfresco.DocumentRating("${el}").setOptions(
{
nodeRef: "${nodeRef?js_string}",
site: <#if site??>"${site?js_string}"<#else>null</#if>,
formId: <#if formId??>"${formId?js_string}"<#else>null</#if>
}).setMessages(
${messages}
);
//]]></script>
</div>
</#if>
<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js">
function main()
{
AlfrescoUtil.param('nodeRef');
AlfrescoUtil.param('site', null);
AlfrescoUtil.param('formId', "doc-details-rating");
var documentDetails = AlfrescoUtil.getNodeDetails(model.nodeRef, model.site);
if (documentDetails)
{
model.document = documentDetails;
}
}
main();
<webscript>
<shortname>document-rating</shortname>
<description>Document Rating Component</description>
<url>/components/document-details/document-rating</url>
</webscript>
<#include "/org/alfresco/components/form/form.get.head.ftl">
<!– Document Rating Header –>
<@script type="text/javascript" src="${page.url.context}/res/components/document-details/document-rating.js"></@script>
<@link rel="stylesheet" type="text/css" href="${page.url.context}/res/components/rating/document-rating.css" />
<@script type="text/javascript" src="${page.url.context}/res/components/rating/document-fiveStarsRating.js"></@script>
<@script type="text/javascript" src="${page.url.context}/res/components/rating/document-compactRating.js"></@script>
06-27-2013 01:28 AM
<#include "/org/alfresco/components/form/form.get.head.ftl">
<#include "../component.head.inc">
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.