changeset 94:806399f3b950

Forums: minor cosmetic tweaks mainly.
author Brian Neal <bgneal@gmail.com>
date Sun, 13 Sep 2009 05:01:52 +0000
parents 4c33e266db03
children 23035afdeae8
files gpp/forums/templatetags/forum_tags.py gpp/templates/base.html gpp/templates/forums/forum_index.html gpp/templates/forums/index.html gpp/templates/forums/last_post_info.html media/css/base.css media/icons/note_go.png
diffstat 7 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/forums/templatetags/forum_tags.py	Sun Sep 13 04:33:15 2009 +0000
+++ b/gpp/forums/templatetags/forum_tags.py	Sun Sep 13 05:01:52 2009 +0000
@@ -7,8 +7,11 @@
 
 
 @register.inclusion_tag('forums/last_post_info.html')
-def last_post_info(post):
-    return {'post': post}
+def last_post_info(post, media_url):
+    return {
+        'post': post,
+        'MEDIA_URL': media_url,
+    }
 
 
 @register.inclusion_tag('forums/pagination.html')
--- a/gpp/templates/base.html	Sun Sep 13 04:33:15 2009 +0000
+++ b/gpp/templates/base.html	Sun Sep 13 05:01:52 2009 +0000
@@ -38,6 +38,7 @@
       <ul>
          {% if user.is_authenticated %}
          <li>Welcome, <a href="{% url bio-me %}">{{ user.username }}</a></li>
+         <li><a href="{% url forums-index %}">Forums</a></li>
          <li>{% unread_messages user %}</li>
          <li><a href="{% url accounts-logout %}">Logout</a></li>
          {% else %}
--- a/gpp/templates/forums/forum_index.html	Sun Sep 13 04:33:15 2009 +0000
+++ b/gpp/templates/forums/forum_index.html	Sun Sep 13 05:01:52 2009 +0000
@@ -30,7 +30,7 @@
          <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>
          <td class="forum-index_views">{{ topic.view_count }}</td>
          <td class="forum-index_last_post">
-            {% last_post_info topic.last_post %}
+            {% last_post_info topic.last_post MEDIA_URL %}
          </td>
       </tr>
    {% empty %}
--- a/gpp/templates/forums/index.html	Sun Sep 13 04:33:15 2009 +0000
+++ b/gpp/templates/forums/index.html	Sun Sep 13 05:01:52 2009 +0000
@@ -18,12 +18,12 @@
       </thead>
       <tbody>
          {% for forum in iter.forums %}
-            <tr>
+            <tr class="{% cycle 'odd' 'even' %}">
                <td><h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a></h4>
                   <p>{{ forum.description }}</p></td>
                <td class="forum-topics">{{ forum.topic_count }}</td>
                <td class="forum-posts">{{ forum.post_count }}</td>
-               <td class="forum-last_post">{% last_post_info forum.last_post %}</td>
+               <td class="forum-last_post">{% last_post_info forum.last_post MEDIA_URL %}</td>
             </tr>
          {% endfor %}
       </tbody>
--- a/gpp/templates/forums/last_post_info.html	Sun Sep 13 04:33:15 2009 +0000
+++ b/gpp/templates/forums/last_post_info.html	Sun Sep 13 05:01:52 2009 +0000
@@ -1,5 +1,6 @@
 {% if post %}
-<a href="{{ post.get_absolute_url }}">{{ post.update_date|date:"M d, Y H:i"}}</a><br />
+<a href="{{ post.get_absolute_url }}" title="Goto last post"><img src="{{ MEDIA_URL }}icons/note_go.png" alt="Goto last post" />
+<a href="{{ post.get_absolute_url }}" title="Goto last post">{{ post.update_date|date:"M d, Y H:i"}}</a><br />
 <a href="{% url bio-view_profile username=post.user.username %}" title="View profile for {{ post.user.username }}">{{ post.user.username }}</a>
 {% else %}
 <i>No posts</i>
--- a/media/css/base.css	Sun Sep 13 04:33:15 2009 +0000
+++ b/media/css/base.css	Sun Sep 13 05:01:52 2009 +0000
@@ -205,6 +205,7 @@
    width:5%;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid black;
+   vertical-align: top;
 }
 td.forum-post-body {
    vertical-align: top;
Binary file media/icons/note_go.png has changed