Note when posts have been updated, and put the creation date in the title text.
This commit is contained in:
@@ -222,6 +222,7 @@ def extend_content(content):
|
||||
'raw_tags': ','.join(content.get('tags', [])),
|
||||
'permalink': permalink(content),
|
||||
'roles': roles,
|
||||
'updated': content['created_at']!=content['updated_at'],
|
||||
}
|
||||
return merge_dict(content, content_info)
|
||||
|
||||
|
||||
@@ -374,6 +374,9 @@ if Backbone?
|
||||
MathJax.Hub.Queue ["Typeset", MathJax.Hub, $contentBody.attr("id")]
|
||||
|
||||
initTimeago: ->
|
||||
@$("span.timeago").each (index, element) ->
|
||||
elem = $(element)
|
||||
elem.html("posted on #{$.timeago.parse(elem.html()).toLocaleString()}")
|
||||
@$("span.timeago").timeago()
|
||||
|
||||
renderPartial: ->
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
{{/thread}}
|
||||
<div class="info">
|
||||
<div class="comment-time">
|
||||
<span class="timeago" title="{{content.updated_at}}">sometime</span> by
|
||||
{{#content.updated}}
|
||||
updated
|
||||
{{/content.updated}}
|
||||
<span class="timeago" title="{{content.updated_at}}">{{content.created_at}}</span> by
|
||||
{{#content.anonymous}}
|
||||
anonymous
|
||||
{{/content.anonymous}}
|
||||
|
||||
Reference in New Issue
Block a user