aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorJessica T <xray7224@googlemail.com>2013-04-11 22:37:48 +0100
committerJessica T <xray7224@googlemail.com>2013-04-11 22:37:48 +0100
commitf1c3807db73adcc5eb817d693d160386f87bb15b (patch)
tree9cc05c5aeadf7369c7639eb78a10983f1ab525fe /mediagoblin/templates
parent71ef20078cc061317eaf42f20bdc905bcce3ab2a (diff)
downloadmediagoblin-f1c3807db73adcc5eb817d693d160386f87bb15b.tar.lz
mediagoblin-f1c3807db73adcc5eb817d693d160386f87bb15b.tar.xz
mediagoblin-f1c3807db73adcc5eb817d693d160386f87bb15b.zip
Adds the timesince ability which fixes #394
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index b77c12b9..58b9cdce 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -125,7 +125,9 @@
comment=comment.id,
user=media.get_uploader.username,
media=media.slug_or_id) }}#comment">
- {{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}
+ <span title='{{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}'>
+ {{ timesince(comment.created) }}
+ </span>
</a>:
</div>
<div class="comment_content">
@@ -141,9 +143,9 @@
{% endif %}
</div>
<div class="media_sidebar">
- {% trans date=media.created.strftime("%Y-%m-%d") -%}
+ {% trans date=media.created.strftime("%Y-%m-%d"), formatted_time=timesince(media.created) -%}
<h3>Added on</h3>
- <p>{{ date }}</p>
+ <p><span title="{{ date }}">{{ formatted_time }}</span></p>
{%- endtrans %}
{% if media.tags %}
{% include "mediagoblin/utils/tags.html" %}