Skip to content

Commit a25b502

Browse files
committed
Show relative times in Site Blog Dashlet
git-svn-id: https://share-extras.googlecode.com/svn/trunk/Site Blog Dashlet@1184 a3f5c567-fd0f-3a89-9b71-a290c5a5f590
1 parent fa71397 commit a25b502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/web/components/dashlets/site-blog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
Dom.addClass(el, "last-item");
208208
}
209209
html += "<h4><a href=\"" + Alfresco.constants.URL_PAGECONTEXT + "site/" + this.options.siteId + "/blog-postview?container=blog&postId=" + encodeURI(post.name) + "\" class=\"theme-color-1 blog-post-title\" title=\"" + $html(title) + "\">" + $html(title) + "</a></h4>\n";
210-
html += "<div class=\"post-details\">" + this.msg("text.posted-by", postedBy) + " " + this.msg("text.modified-on", Alfresco.util.formatDate(post.createdOn)) + "</div>\n";
210+
html += "<div class=\"post-details\">" + this.msg("text.posted-by", postedBy) + " " + (Alfresco.util.relativeTime ? Alfresco.util.relativeTime(new Date(post.createdOn)) : this.msg("text.modified-on", Alfresco.util.formatDate(post.createdOn))) + "</div>\n";
211211
html += "<div class=\"description\">" + postContent + "</div>\n";
212212
el.innerHTML = html;
213213
this.bodyContainer.appendChild(el);

0 commit comments

Comments
 (0)