annotate gpp/templates/forums/forum_index.html @ 271:4746df47a538

Follow on to last rev (r292) for #126. Missed updating a shoutbox template. Also the repoze.timeago package uses UTC time by default. Change this to local time for now until we decide to switch over to UTC for everything.
author Brian Neal <bgneal@gmail.com>
date Sun, 26 Sep 2010 17:42:00 +0000
parents 307a74e28112
children 593fb6dbd449
rev   line source
bgneal@82 1 {% extends 'base.html' %}
bgneal@84 2 {% load forum_tags %}
bgneal@263 3 {% block custom_head %}
bgneal@263 4 {% if feed %}
bgneal@263 5 <link rel="alternate" type="application/rss+xml" title="{{ feed.name }}" href="{{ feed.feed }}" />
bgneal@263 6 {% endif %}
bgneal@263 7 {% endblock %}
bgneal@82 8 {% block title %}Forums: {{ forum.name }}{% endblock %}
bgneal@82 9 {% block content %}
bgneal@263 10 <h2>Forums: {{ forum.name }}
bgneal@263 11 {% if feed %}
bgneal@263 12 <a href="{{ feed.feed }}"><img src="{{ MEDIA_URL }}icons/feed.png" alt="RSS Feed" title="Feed for this forum" /></a>
bgneal@263 13 {% endif %}
bgneal@263 14 </h2>
bgneal@82 15
bgneal@82 16 <h3>
bgneal@82 17 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> &raquo;
bgneal@82 18 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a>
bgneal@82 19 </h3>
bgneal@82 20
bgneal@82 21 <div class="forum-block">
bgneal@113 22 {% if user.is_authenticated %}
bgneal@113 23 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> &bull;
bgneal@194 24 <form action="{% url forums-catchup slug=forum.slug %}" method="post" style="display:inline">{% csrf_token %}
bgneal@113 25 <input type="submit" value="Mark All Topics Read" />
bgneal@113 26 </form>
bgneal@113 27 {% endif %}
bgneal@97 28 {{ page_nav }}
bgneal@82 29 <table class="forum-index-table">
bgneal@82 30 <thead>
bgneal@82 31 <tr>
bgneal@82 32 <th class="forum-index_title">Topics</th>
bgneal@82 33 <th class="forum-index_replies">Replies</th>
bgneal@82 34 <th class="forum-index_author">Author</th>
bgneal@82 35 <th class="forum-index_views">Views</th>
bgneal@82 36 <th class="forum-index_last_post">Last Post</th>
bgneal@82 37 </tr>
bgneal@82 38 </thead>
bgneal@82 39 <tbody>
bgneal@93 40 {% for topic in page.object_list %}
bgneal@93 41 <tr class="{% cycle 'odd' 'even' %}">
bgneal@114 42 <td>
bgneal@167 43 {% topic_icons topic %}
bgneal@161 44 <h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4>
bgneal@161 45 {% if topic.page_range %}
bgneal@167 46 {% topic_page_range topic %}
bgneal@161 47 {% endif %}
bgneal@161 48 </td>
bgneal@83 49 <td class="forum-index_replies">{{ topic.reply_count }}</td>
bgneal@85 50 <td class="forum-index_author"><a href="{% url bio-view_profile username=topic.user.username %}" title="View profile for {{ topic.user.username }}">{{ topic.user.username }}</a></td>
bgneal@82 51 <td class="forum-index_views">{{ topic.view_count }}</td>
bgneal@82 52 <td class="forum-index_last_post">
bgneal@120 53 {% last_post_info topic.last_post %}
bgneal@82 54 </td>
bgneal@82 55 </tr>
bgneal@82 56 {% empty %}
bgneal@82 57 <tr>
bgneal@111 58 <td colspan="5">
bgneal@82 59 <i>No topics available.</i>
bgneal@82 60 </td>
bgneal@82 61 </tr>
bgneal@82 62 {% endfor %}
bgneal@82 63 </tbody>
bgneal@82 64 </table>
bgneal@97 65 {{ page_nav }}
bgneal@113 66 {% if user.is_authenticated %}
bgneal@113 67 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> &bull;
bgneal@194 68 <form action="{% url forums-catchup slug=forum.slug %}" method="post" style="display:inline">{% csrf_token %}
bgneal@113 69 <input type="submit" value="Mark All Topics Read" />
bgneal@113 70 </form>
bgneal@113 71 {% endif %}
bgneal@113 72 {% if can_moderate %}
bgneal@111 73 <p><a href="{% url forums-mod_forum slug=forum.slug %}">Moderate this forum</a></p>
bgneal@113 74 {% endif %}
bgneal@120 75 {% current_forum_time user %}
bgneal@82 76 </div>
bgneal@82 77 {% endblock %}