My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 25 attachment: with.diff (3.4 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Index: templates/forum/forum_list.html
===================================================================
--- templates/forum/forum_list.html (revision 20)
+++ templates/forum/forum_list.html (working copy)
@@ -11,9 +11,11 @@

{% for forum in object_list %}
<tr>
-<td class='djangoForumListDetails'><p><strong><a href='{{ forum.get_absolute_url }}'>{{ forum.title }}</a></strong><br /><span class='djangoForumStats'>{% blocktrans with forum.threads as thread_count and forum.posts as post_count %}{{ thread_count }} threads, {{ post_count }} posts{% endblock %}</span></p>
+<td class='djangoForumListDetails'><p><strong><a href='{{ forum.get_absolute_url }}'>{{ forum.title }}</a></strong><br /><span class='djangoForumStats'>{% blocktrans with forum.threads as thread_count and forum.posts as post_count %}{{ thread_count }} threads, {{ post_count }} posts{% endblocktrans %}</span></p>
<p>{{ forum.description }}</p></td>
-<td class='djangoForumListLastPost'>{% if forum.forum_latest_post %}{{ forum.forum_latest_post.time|timesince }} ago by {{ forum.forum_latest_post.author }} (<a href='{{ forum.forum_latest_post.get_absolute_url }}'>{% trans "view" %}</a>){% else %}{% trans "No Posts" %}{% endif %}</td>
+{% with forum.forum_latest_post as latest_post %}
+<td class='djangoForumListLastPost'>{% if latest_post %}{{ latest_post.time|timesince }} ago by {{ latest_post.author }} (<a href='{{ latest_post.get_absolute_url }}'>{% trans "view" %}</a>){% else %}{% trans "No Posts" %}{% endif %}</td>
+{% endwith %}
</tr>
{% endfor %}
</table>
Index: templates/forum/thread_list.html
===================================================================
--- templates/forum/thread_list.html (revision 20)
+++ templates/forum/thread_list.html (working copy)
@@ -25,7 +25,9 @@
<tr>
<td class='djangoForumListDetails'><p><strong><a href='{{ subforum.get_absolute_url }}'>{{ subforum.title }}</a></strong><br /><span class='djangoForumStats'>{{ subforum.threads }} thread{{ subforum.threads|pluralize }}, {{ subforum.posts }} post{{ subforum.posts|pluralize }}</span></p>
<p>{{ subforum.description }}</p></td>
-<td class='djangoForumListLastPost'>{% if subforum.forum_latest_post %}{{ subforum.forum_latest_post.time|timesince }} ago by {{ subforum.forum_latest_post.author }} (<a href='{{ subforum.forum_latest_post.get_absolute_url }}'>view</a>){% else %}No Posts{% endif %}</td>
+{% with subforum.forum_latest_post as latest_post %}
+<td class='djangoForumListLastPost'>{% if latest_post %}{{ latest_post.time|timesince }} ago by {{ latest_post.author }} (<a href='{{ subforum.latest_post.get_absolute_url }}'>view</a>){% else %}No Posts{% endif %}</td>
+{% endwith %}
</tr>
{% endfor %}
</table>
@@ -46,7 +48,9 @@
<td>{% if t.sticky %}Sticky {% endif %}<a href='{{ t.get_absolute_url }}'>{{ t.title|escape }}</a>{% if t.closed %} (Closed){% endif %}</td>
<td style='width: 50px;'>{{ t.posts }}</td>
<td style='width: 50px;'>{{ t.views }}</td>
-<td style='width: 220px;' class='djangoForumThreadLastPost'>{{ t.thread_latest_post.time|timesince }} ago by {{ t.thread_latest_post.author }} (<a href='{{ t.thread_latest_post.get_absolute_url }}'>view</a>)</td>
+{% with t.thread_latest_post as latest_post %}
+<td style='width: 220px;' class='djangoForumThreadLastPost'>{{ t.latest_post.time|timesince }} ago by {{ t.latest_post.author }} (<a href='{{ t.latest_post.get_absolute_url }}'>view</a>)</td>
+{% endwith %}
</tr>
{% endfor %}
</table>
Powered by Google Project Hosting