<!–
Custom Metadata Templates for the Document Library Browse View
Use view="simple" or view="detailed" to limit the display to one particular view.
–>
<metadata-templates>
<!– 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>
this.registerRenderer("date", function(record, label)
{
var jsNode = record.jsNode,
properties = jsNode.properties,
html = "";
var dateI18N = "modified", dateProperty = properties.modified.iso8601;
if (record.workingCopy && record.workingCopy.isWorkingCopy)
{
dateI18N = "editing-started";
}
else if (dateProperty === properties.created.iso8601)
{
dateI18N = "created";
}
html = '<span class="item">' + label + this.msg("details." + dateI18N + "-by", $relTime(dateProperty), Alfresco.DocumentList.generateUserLink(this, properties.modifier)) + '</span>';
return html;
});
$relTime(dateProperty)
$date(dateProperty)
(function()
{
/**
* Alfresco Slingshot aliases
*/
var $html = Alfresco.util.encodeHTML,
$date = function $date(date, format) { return Alfresco.util.formatDate(Alfresco.util.fromISO8601(date), format); };
if (Alfresco.DocumentList)
{
YAHOO.Bubbling.fire("registerRenderer",
{
propertyName: "customdate",
renderer: function description_renderer(record, label)
{
var jsNode = record.jsNode,
properties = jsNode.properties,
html = "";
var dateI18N = "modified", dateProperty = properties.modified.iso8601;
if (record.workingCopy && record.workingCopy.isWorkingCopy)
{
dateI18N = "editing-started";
}
else if (dateProperty === properties.created.iso8601)
{
dateI18N = "created";
}
html = '<span class="item">' + label + this.msg("details." + dateI18N + "-by", $date(dateProperty), Alfresco.DocumentList.generateUserLink(this, properties.modifier)) + '</span>';
return html;
}
});
}
})();
<config evaluator="string-compare" condition="DocLibCustom">
<dependencies>
<js src="/extension/components/documentlibrary/date-renderer.js" />
</dependencies>
</config>
<config evaluator="string-compare" condition="DocumentLibrary">
<metadata-templates>
<template id="default">
<line index="10" id="date">{customdate}{size}</line>
</template>
</metadata-templates>
</config>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.