Commit 422a965a by Ibrahim Awwal

Note when posts have been updated, and put the creation date in the title text.

parent 80e7d60f
...@@ -222,6 +222,7 @@ def extend_content(content): ...@@ -222,6 +222,7 @@ def extend_content(content):
'raw_tags': ','.join(content.get('tags', [])), 'raw_tags': ','.join(content.get('tags', [])),
'permalink': permalink(content), 'permalink': permalink(content),
'roles': roles, 'roles': roles,
'updated': content['created_at']!=content['updated_at'],
} }
return merge_dict(content, content_info) return merge_dict(content, content_info)
......
...@@ -374,6 +374,9 @@ if Backbone? ...@@ -374,6 +374,9 @@ if Backbone?
MathJax.Hub.Queue ["Typeset", MathJax.Hub, $contentBody.attr("id")] MathJax.Hub.Queue ["Typeset", MathJax.Hub, $contentBody.attr("id")]
initTimeago: -> initTimeago: ->
@$("span.timeago").each (index, element) ->
elem = $(element)
elem.html("posted on #{$.timeago.parse(elem.html()).toLocaleString()}")
@$("span.timeago").timeago() @$("span.timeago").timeago()
renderPartial: -> renderPartial: ->
......
...@@ -29,7 +29,10 @@ ...@@ -29,7 +29,10 @@
{{/thread}} {{/thread}}
<div class="info"> <div class="info">
<div class="comment-time"> <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}} {{#content.anonymous}}
anonymous anonymous
{{/content.anonymous}} {{/content.anonymous}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment