root/lib/sct/sphenecoll/sphene/sphboard/templates/sphene/sphboard/listCategories.html

Revision 117:9ecb5a0a3ef8, 5.0 kB (checked in by Daniele Varrazzo <piro@develer.com>, 1 year ago)

Using a tag to generate the Post icon.

Line 
1 {% extends "sphene/sphboard/base.html" %}
2 {% load i18n %}
3 {% load sphboard_extras %}
4 {% load sph_extras %}
5 {% load sph_pagination %}
6
7 {% block content %}
8
9   <p>{% if search_posts_url %}<a href="{{ search_posts_url }}?category_id={{ category.id }}">Search</a> | {% endif %}<a href="{% sph_url2 sphboard_latest category_id=category_id %}">{% trans "Latest" %}</a> | {% sphboard_displayBreadcrumbsForCategory category 0 1 %}</p>
10
11   {% if user.is_authenticated %}
12     <p>
13     {% if category %}
14       {% include "sphene/sphboard/_category_monitor.html" %}
15     {% else %}
16       {% if group.has_monitor %}
17         {% trans "You are currently receiving email notifications on new posts." %} - <a href="{% sph_url2 sphboard_toggle_monitor monitortype="group" object_id=group.id %}">{% trans "Stop notifications" %}</a>
18       {% else %}
19         {% if rootCategories %}
20           <a href="{% sph_url2 sphboard_toggle_monitor monitortype="group" object_id=group.id %}">{% trans "Notify me by email on new posts." %}</a>
21         {% endif %}
22       {% endif %}
23     {% endif %}
24     </p>
25   {% endif %}
26
27   {% if rootCategories %}
28   <table class="sphboard_categories">
29     <tr>
30       <th colspan='6'>{% trans "Title" %}</th>
31       <th>{% trans "Threads" %}</th>
32       <th>{% trans "Posts" %}</th>
33       <th>{% trans "Last Post" %}</th>
34     </tr>
35     {% sphboard_displayCategories rootCategories 5 %}
36   </table>
37   <br/><br/>
38   {% else %}
39     {% if not isShowLatest %}
40       {% if not category %}
41         {% trans "There are currently no categories. (Or you have no permission to see them.)" %}
42       {% endif %}
43     {% endif %}
44   {% endif %}
45
46   {% if not category.get_category_type.is_separator %}
47   {% if isShowLatest or category.canContainPosts %}
48     {% block above_thread_list %}
49     {% endblock %}
50     {% include category.get_category_type.get_new_thread_link_template %}
51     <table class="sphboard_thread_list">
52       {% block thread_list_header %}
53       <tr>
54         <th class="sphboard_mainhead" colspan="{% if sph_settings.board_count_views %}6{% else %}5{% endif %}">{% trans "Threads" %}</th>
55       </tr>
56       <tr>
57         <th colspan="3">{% trans "Subject / Author" %}</th>
58         {% if sph_settings.board_count_views %}
59           <th>{% trans "Views" %}</th>
60         {% endif %}
61         <th>{% trans "Posts" %}</th>
62         <th>{% trans "Last Post" %}</th>
63       </tr>
64       {% endblock thread_list_header %}
65       {% for thread in thread_list %}
66         <tr>
67           <td width="20px"><img src="{{ MEDIA_URL }}sphene/sphboard/icons/{% if thread.has_new_posts %}new{% endif %}folder.gif" width='16px' height='16px' title='Heat: {{ thread.heat }}' /></td>
68           <td width="20px">{% sphboard_displayPostIcon thread %}</td>
69           {% if thread.is_moved %}
70             <td colspan="4"><small>
71             {% blocktrans with thread.get_absolute_url as th_url and thread.subject as th_subject and thread.category.get_absolute_url as cat_url and thread.root_post.category.name as cat_name %}Thread was moved: <a href="{{ th_url }}">{{ th_subject }}</a> into <a href="{{ cat_url }}">{{ cat_name }}</a>.{% endblocktrans %}
72             </small></td>
73           {% else %}
74           <td>{% if thread.is_sticky %}<b>{% trans "Sticky:" %}</b> {% endif %}{% if thread.is_hot %}<b>{% trans "Hot:" %}</b> {% endif %}{% if thread.is_poll %}{% trans "Poll:" %} {% endif %}{% if thread.is_closed %}{% trans "Locked:" %} {% endif %}{% block thread_list_subject %}<a href="{{ thread.get_absolute_url }}">{{ thread.subject }}</a>{% endblock %}{% if thread.has_paging %} ( {% sph_pagination thread.get_page_count -1 thread.get_absolute_url_nopaging %} ){% endif %}<br/><small>{% if isShowLatest %}{% sphboard_displayBreadcrumbsForCategory thread.category 1 %} - {% endif %}{% trans "By" %} {% sphboard_displayUserName thread.author %}</small></td>
75           {% block thread_list_info %}
76           {% if sph_settings.board_count_views %}
77             <td class="sphboard_viewcount">{{ thread.view_count }}</td>
78           {% endif %}
79           <td class="sphboard_postcount">{{ thread.post_count }}</td>
80           <td class="sphboard_latestpost">{% sphboard_latestPost thread.latest_post 0 %}</td>
81           {% endblock %}
82           {% endif %}
83         </tr>
84       {% endfor %}
85       <tr>
86         <td colspan="{% if sph_settings.board_count_views %}6{% else %}5{% endif %}"><span class="board_threadcount">{% blocktrans %}{{ hits }} Threads in this category.{% endblocktrans %}</span><span class="board_pagination">{% sph_pagination pages page %}</span></td>
87       </tr>
88     </table>
89     {% include category.get_category_type.get_new_thread_link_template %}
90     {% if user.is_authenticated and category.has_new_posts %}
91       <p><a href="{% sph_url2 sphene.sphboard.views.catchup  category_id=category.id %}" title="{% trans "Mark all Posts in this Category as read." %}">{% trans "Catch Up" %}</a></p>
92     {% endif %}
93   {% endif %}
94   {% endif %}
95
96   {% if not category and user.is_authenticated %}
97       <p><a href="{% sph_url2 sphene.sphboard.views.catchup category_id=0 %}">{% trans "Mark all as read" %}</a></p>
98   {% endif %}
99
100   {% block below_thread_list %}
101   {% endblock %}
102 {% endblock %}
Note: See TracBrowser for help on using the browser.