diff gpp/templates/forums/index.html @ 84:9e5e52556d5b

Forums: added a last_post_info template tag. Still need to add a go to last post icon for it.
author Brian Neal <bgneal@gmail.com>
date Sat, 29 Aug 2009 22:01:40 +0000
parents e356ea79a7a2
children 806399f3b950
line wrap: on
line diff
--- a/gpp/templates/forums/index.html	Sat Aug 29 20:54:16 2009 +0000
+++ b/gpp/templates/forums/index.html	Sat Aug 29 22:01:40 2009 +0000
@@ -1,4 +1,5 @@
 {% extends 'base.html' %}
+{% load forum_tags %}
 {% block title %}Forums{% endblock %}
 {% block content %}
 <h2>Forums</h2>
@@ -22,14 +23,7 @@
                   <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">
-                  {% if forum.last_post %}
-                     {{ forum.last_post.update_date|date }}<br />
-                     {{ forum.last_post.user.username }}
-                  {% else %}
-                     <i>No Posts</i>
-                  {% endif %}
-               </td>
+               <td class="forum-last_post">{% last_post_info forum.last_post %}</td>
             </tr>
          {% endfor %}
       </tbody>