Commits

Kyle Fuller committed 812a4c2

forum: Improve the thread list theme

  • Participants
  • Parent commits 904f567

Comments (0)

Files changed (1)

File lithium/forum/templates/forum/thread_list.html

 {% block title %}{{ forum }}{% endblock %}
 
 {% block content %}
-{% render_parent_list forum.get_parent_list %}
-<h2>{{ forum }}</h2>
+{% if forum %}{% render_parent_list forum.get_parent_list %}{% endif %}
+<h2>{% if forum %}{{ forum }}{% else %}All threads{% endif%}</h2>
 
 {% if forum.has_children %}
 <h3>Sub-forums</h3>
 {% endif %}
 
 {% if not forum.is_category %}
-<h3>{% trans 'Threads' %} {% if not forum.is_category and can_create %}<a href="{{ forum.get_create_thread_url }}">(create)</a>{% endif %}</h3>
 <table>
-    <tr>
-        <th>Thread</th>
-        <th>Last modified</th>
-        <th>Posts</th>
-    </tr>
+    <thead>
+        <tr>
+            <th class="thread">Thread {% if not forum.is_category and can_create %}<a href="{{ forum.get_create_thread_url }}"    >(create)</a>{% endif %}</th>
+            <th>Last modified</th>
+            <th>Posts</th>
+        </tr>
+    </thead>
 
-  {% for thread in thread_list %}
-    <tr class="{% cycle 'odd' 'even' %} {% if thread.is_locked %}locked{% endif %}{% if thread.is_sticky %} sticky{% endif %}">
-        <td class="thread"><a href="{{ thread.get_absolute_url }}">{{ thread }}</a></td>
-        <td class="last-modified">{{ thread.last_post_date|date:"h:i A" }}</a></td>
-        <td class="posts">{{ thread.post_count }}</td>
-    </tr>
-  {% endfor %}
+    <tbody>
+      {% for thread in thread_list %}
+        <tr class="{% cycle 'odd' 'even' %} {% if thread.is_locked %}locked{% endif %}{% if thread.is_sticky %} sticky{% endif %}">
+            <td class="thread"><a href="{{ thread.get_absolute_url }}">{{ thread }}</a></td>
+            <td class="last-modified">{{ thread.last_post_date|date:"h:i A" }}</a></td>
+            <td class="posts">{{ thread.post_count }}</td>
+        </tr>
+      {% endfor %}
+    </tbody>
 </table>
 {% endif %}