Display relative post times instead of absolute

This commit is contained in:
Trever Fischer
2012-04-17 13:23:50 -04:00
parent 46a6c47127
commit 4d8d3ff768
4 changed files with 5 additions and 5 deletions

View File

@@ -21,7 +21,7 @@
</ul></td>
<td>{{ f.topicCount }}</td>
{% if f.freshestTopic%}
<td class="author-info"><div class="avatar">{% avatar f.freshestTopic.lastPost.user 32 %}</div><ul><li>{{f.freshestTopic.lastPost.user}}</li><li>{{f.freshestTopic.created}}</li><li>In <em><a href="{{f.freshestTopic.get_absolute_url}}">{{f.freshestTopic}}</a></em></ul></td>
<td class="author-info"><div class="avatar">{% avatar f.freshestTopic.lastPost.user 32 %}</div><ul><li>{{f.freshestTopic.lastPost.user}}</li><li>{{f.freshestTopic.created|timesince}} ago</li><li>In <em><a href="{{f.freshestTopic.get_absolute_url}}">{{f.freshestTopic}}</a></em></ul></td>
{% else %}
<td><em>No posts...</em></td>
{% endif %}

View File

@@ -22,8 +22,8 @@
{% if topics %}
{% for topic in topics %}
<tr class="{%cycle 'even' 'odd' %} {% if topic.sticky %}sticky{% endif %} topic">
<td class="topic-link"><ul><li class="link"><a href="{{topic.get_absolute_url}}">{{ topic.title }}</a></li><li>Started by {{topic.rootPost.user}} on {{topic.created}}</li></ul></td>
<td class="author-info"><div class="avatar">{% avatar topic.lastPost.user 32 %}</div><ul><li>{{topic.lastPost.user}}</li><li>{{topic.created}}</li></ul></td>
<td class="topic-link"><ul><li class="link"><a href="{{topic.get_absolute_url}}">{{ topic.title }}</a></li><li>Started by {{topic.rootPost.user}} {{topic.created|timesince}} ago</li></ul></td>
<td class="author-info"><div class="avatar">{% avatar topic.lastPost.user 32 %}</div><ul><li>{{topic.lastPost.user}}</li><li>{{topic.created|timesince}} ago</li></ul></td>
</tr>
{% endfor %}
{% else %}

View File

@@ -16,7 +16,7 @@
<div class="topic">
<div class="avatar">{% avatar topic.rootPost.user 32 %}</div>
<h2>{{topic.title}}</h2>
<div class="byline">Started by <span itemprop="author">{{topic.rootPost.user}}</span> {{ topic.created }}</div>
<div class="byline">Started by <span itemprop="author">{{topic.rootPost.user}}</span> {{ topic.created|timesince }} ago</div>
<br style="clear:both;"/>
{% include "forums/_post.html" with post=topic.rootPost %}
</div>

View File

@@ -8,7 +8,7 @@
<div class='item news-item'>
<h2><a href="{{news.get_absolute_url}}">{{news.title}}</a></h2>
<div class="byline">By <span itemprop="author">{{news.author}}</span> <div class="avatar">{% avatar news.author %}</div></div>
<div class="dateline">On {{news.created}}</div>
<div class="dateline">Posted {{news.created|timesince}} ago</div>
<div class="content" itemprop="articleBody">
{{news.body|truncatewords:"100"|markdown}}
</div>