123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- {% extends "sora/layout.html" %}
- {% load i18n %}
- {% load url from future %}
- {% import "sora/macros.html" as macros with context %}
- {% block title %}{{ macros.page_title(title=forum.name,page=pagination['page']) }}{% endblock %}
- {% block breadcrumb %}{{ super() }} <span class="divider">/</span></li>
- {% for parent in parents %}
- <li class="first"><a href="{{ parent.type|url(forum=forum.pk, slug=forum.slug) }}">{{ parent.name }}</a> <span class="divider">/</span></li>
- {% endfor %}
- <li class="active">{{ forum.name }}
- {%- endblock %}
- {% block content %}
- <div class="page-header">
- <ul class="breadcrumb">
- {{ self.breadcrumb() }}</li>
- </ul>
- <h1>{{ forum.name }}{% if forum.description %} <small>{{ forum.description }}</small>{% endif %}</h1>
- </div>
- {% if forum.subforums %}
- <div class="forums-list subforums-list">
- <h3>{% trans %}Subforums{% endtrans %}:</h3>
- <div class="category{% if forum.style %} {{ forum.style }}{% endif %}">
- {{ macros.draw_forums(forum, 12) }}
- </div>
- </div>
- {% endif %}
- {% if message %}{{ macros.draw_message(message) }}{% endif %}
- <div class="list-nav">
- {{ pager() }}
- {% if user.is_authenticated() and acl.threads.can_start_threads(forum) %}
- <ul class="nav nav-pills pull-right">
- <li class="primary"><a href="{% url 'thread_new' forum=forum.pk, slug=forum.slug %}"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a></li>
- </ul>
- {% endif %}
- </div>
- <table class="table table-striped threads-list">
- <thead>
- <tr>
- <th style="width: 1%;"> </th>
- <th>{% trans %}Thread{% endtrans %}</th>
- <th>{% trans %}Author{% endtrans %}</th>
- <th>{% trans %}Replies{% endtrans %}</th>
- <th>{% trans %}Last Poster{% endtrans %}</th>
- </tr>
- </thead>
- <tbody>
- {% for thread in threads %}
- <tr>
- <td><span class="thread-icon{% if not thread.is_read %} {% if thread.closed %}thread-closed{% else %}thread-new{% endif %}{% endif %}"><i class="icon-{% if thread.closed %}remove{% else %}comment{% endif %} icon-white"></i></span></td>
- <td>
- <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{% if not thread.is_read %}<strong>{{ thread.name }}</strong>{% else %}{{ thread.name }}{% endif %}</a>[LABELS][JUMP] [ICONS]
- </td>
- <td class="span2">{% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}" class="tooltip-top" title="{{ thread.start|reltimesince }}">{{ thread.start_poster_name }}</a>{% else %}<em class="tooltip-top muted" title="{{ thread.start|reltimesince }}">{{ thread.start_poster_name }}</em>{% endif %}</td>
- <td class="span1">{{ thread.replies|intcomma }}</td>
- <td class="span2">{% if thread.last_poster_id %}<a href="{% url 'user' user=thread.last_poster_id, username=thread.last_poster_slug %}" class="tooltip-top" title="{{ thread.last|reltimesince }}">{{ thread.last_poster_name }}</a>{% else %}<em class="tooltip-top muted" title="{{ thread.last|reltimesince }}">{{ thread.last_poster_name }}</em>{% endif %}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- <div class="form-actions table-footer">
- [MOD ACTIONS]
- </div>
- <div class="list-nav last">
- {{ pager() }}
- {% if user.is_authenticated() and acl.threads.can_start_threads(forum) %}
- <ul class="nav nav-pills pull-right">
- <li class="primary"><a href="{% url 'thread_new' forum=forum.pk, slug=forum.slug %}"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a></li>
- </ul>
- {% endif %}
- </div>
- {% endblock %}
- {% macro pager() %}
- <ul class="pager pull-left">
- {%- if pagination['prev'] > 1 %}<li><a href="{% url 'forum' slug=forum.slug, forum=forum.id %}" class="tooltip-top" title="{% trans %}First Page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
- {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'forum' slug=forum.slug, forum=forum.id, page=pagination['prev'] %}{% else %}{% url 'forum' slug=forum.slug, forum=forum.id %}{% endif %}" class="tooltip-top" title="{% trans %}Newest Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
- {%- if pagination['next'] > 0 %}<li><a href="{% url 'forum' slug=forum.slug, forum=forum.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
- <li class="count">
- {%- trans current_page=pagination['page'], pages=pagination['total'] -%}
- Page {{ current_page }} of {{ pages }}
- {%- endtrans -%}
- </li>
- </ul>
- {% endmacro %}
|