Tweak the forum display

This commit is contained in:
Trever Fischer
2012-02-19 18:05:31 -05:00
parent cdecf57bbc
commit 4a2e056835
2 changed files with 14 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
{% load mptt_tags %}
{% if forums %}
<table>
<tr class="header">
<th>Name</th>
@@ -9,7 +10,8 @@
<tr class="{% cycle 'even' 'odd' %}">
<td><a href="{{ f.get_absolute_url }}">{{ f.name }}</a></td>
<td>{{ f.topicCount }}</td>
<td>Today</td>
<td><a href="{{f.latestTopic.get_absolute_url}}">{{f.latestTopic.title}}</a> by {{f.latestTopic.user}}</td>
</tr>
{% endfor %}
</table>
{% endif %}

View File

@@ -17,6 +17,7 @@
<th>Posted</th>
<th>Latest Activity</th>
</tr>
{% if topics %}
{% for topic in topics %}
<tr class="{%cycle 'even' 'odd' %}">
<td><a href="{{topic.get_absolute_url}}">{{ topic.title }}</a></td>
@@ -24,6 +25,15 @@
<td>{{topic.lastPost.created}} by {{ topic.lastPost.user }} </td>
</tr>
{% endfor %}
{% else %}
<tr class="infoBar">
<td colspan="3">No topics...</td>
</tr>
{% endif %}
<tr class="actionBar">
<td colspan="3">
<a href="{%url forums.views.newTopic forumID=forum.id %}">New Topic</a>
</td>
</tr>
</table>
<a href="{%url forums.views.newTopic forumID=forum.id %}">New Topic</a>
{% endblock %}