Hide category names on forum index page forum
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 10 Sep 2013 14:22:02 +0000 (16:22 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 10 Sep 2013 14:22:02 +0000 (16:22 +0200)
forum/templates/pybb/category.html [new file with mode: 0644]

diff --git a/forum/templates/pybb/category.html b/forum/templates/pybb/category.html
new file mode 100644 (file)
index 0000000..53c3c50
--- /dev/null
@@ -0,0 +1,47 @@
+{% load url from future %}
+{% load i18n pybb_tags %}
+
+{% if category.forums_accessed|pybb_forum_unread:user|length > 0 %}
+<div class='category'>
+    <table class="table category-table">
+        <thead>
+            <tr class="forum-row head-row">
+                <th class="forum-name">
+                    {% trans "Forum" %}
+                </th>
+                <th class="forum-topic-count">
+                    {% trans "Topics" %}
+                </th>
+                <th class="forum-post-count">
+                    {% trans "Posts" %}
+                </th>
+                <th class="forum-last-post">
+                    {% trans "Last posts" %}
+                </th>
+            </tr>
+        </thead>
+        <tbody>
+        {% for forum in category.forums_accessed|pybb_forum_unread:user %}
+            <tr class="forum-row">
+                <td class="forum-name {% if forum.unread %} forum-unread{% endif %}">
+                    <div class="state-indicator"></div>
+                    <a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a> {% if forum.hidden %}[{% trans "Hidden" %}]{% endif %}
+                    <div class="forum-description">
+                        {{ forum.description|safe }}
+                    </div>
+                </td>
+                <td class="forum-topic-count">
+                    {{ forum.topic_count }}
+                </td>
+                <td class="forum-post-count">
+                    {{ forum.post_count }}
+                </td>
+                <td class="forum-last-post">
+                    {% include "pybb/forum_last_update_info.html" %}
+                </td>
+            </tr>
+        {% endfor %}
+        </tbody>
+    </table>
+</div>
+{% endif %}
\ No newline at end of file