05-20-2014 10:57 AM
getDocumentVersionMarkup
function of Alfresco.DocumentVersions
?05-21-2014 08:29 AM
getDocumentVersionMarkup: function DocumentVersions_getDocumentVersionMarkup(doc)
{
var downloadURL = Alfresco.constants.PROXY_URI + '/api/node/content/' + doc.nodeRef.replace(":/", "") + '/' + doc.name + '?a=true',
html = '';
html += '<div class="version-panel-left">'
html += ' <span class="document-version">' + $html(doc.label) + '</span>';
html += '</div>';
html += '<div class="version-panel-right">';
html += ' <h3 class="thin dark" style="width:' + (Dom.getViewportWidth() * 0.25) + 'px;">' + $html(doc.name) + '</h3>';
html += ' <span class="actions">';
if (this.options.allowNewVersionUpload)
{
html += ' <a href="#" name=".onRevertVersionClick" rel="' + doc.label + '" class="' + this.id + ' revert" title="' + this.msg("label.revert") + '"> </a>';
}
html += ' <a href="' + downloadURL + '" class="download" title="' + this.msg("label.download") + '"> </a>';
html += ' <a href="#" name=".onViewHistoricPropertiesClick" rel="' + doc.nodeRef + '" class="' + this.id + ' historicProperties" title="' + this.msg("label.historicProperties") + '"> </a>';
html += ' </span>';
html += ' <div class="clear"></div>';
html += ' <div class="version-details">';
html += ' <div class="version-details-left">'
html += $userAvatar(doc.creator.userName, 32);
html += ' </div>';
html += ' <div class="version-details-right">';
html += $userProfileLink(doc.creator.userName, doc.creator.firstName + ' ' + doc.creator.lastName, 'class="theme-color-1"') + ' ';
html += Alfresco.util.relativeTime(Alfresco.util.fromISO8601(doc.createdDateISO)) + '<br />';
html += ((doc.description || "").length > 0) ? $html(doc.description, true) : '<span class="faded">(' + this.msg("label.noComment") + ')</span>';
html += ' </div>';
html += ' </div>';
html += '</div>';
html += '<div class="clear"></div>';
return html;
},
05-21-2014 08:34 AM
05-21-2014 11:03 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.