Browse Source

Added unread/read icons

sh4nks 11 years ago
parent
commit
5c50c8d5e9

+ 4 - 4
flaskbb/templates/forum/forum.html

@@ -44,9 +44,9 @@
             <td align="center" valign="center" width="4%">
             <td align="center" valign="center" width="4%">
 
 
             {% if forumread|is_unread(subforum.last_post) %}
             {% if forumread|is_unread(subforum.last_post) %}
-                Unread
+                <span class="fa fa-comments" style="font-size: 2em"></span>
             {% else %}
             {% else %}
-                Read
+                <span class="fa fa-comments-o" style="font-size: 2em"></span>
             {% endif %}
             {% endif %}
             </td>
             </td>
 
 
@@ -119,9 +119,9 @@
             <td width="4%">
             <td width="4%">
 
 
             {% if topicread|is_unread(topic.last_post) %}
             {% if topicread|is_unread(topic.last_post) %}
-                Unread
+                <span class="fa fa-comment" style="font-size: 2em"></span>
             {% else %}
             {% else %}
-                Read
+                <span class="fa fa-comment-o" style="font-size: 2em"></span>
             {% endif %}
             {% endif %}
 
 
             </td>
             </td>

+ 2 - 2
flaskbb/templates/forum/index.html

@@ -27,9 +27,9 @@
             <td align="center" valign="center" width="4%">
             <td align="center" valign="center" width="4%">
 
 
             {% if forum[1]|is_unread(forum[0].last_post) %}
             {% if forum[1]|is_unread(forum[0].last_post) %}
-                Unread
+                <span class="fa fa-comments" style="font-size: 2em"></span>
             {% else %}
             {% else %}
-                Read
+                <span class="fa fa-comments-o" style="font-size: 2em"></span>
             {% endif %}
             {% endif %}
 
 
             </td>
             </td>

+ 2 - 2
flaskbb/templates/forum/topic.html

@@ -26,7 +26,7 @@
     {% if current_user|delete_topic(topic.first_post.user_id, topic.forum) %}
     {% if current_user|delete_topic(topic.first_post.user_id, topic.forum) %}
     <a href="{{ url_for('forum.delete_topic', topic_id=topic.id) }}" class="btn btn-primary">Delete Topic</a>
     <a href="{{ url_for('forum.delete_topic', topic_id=topic.id) }}" class="btn btn-primary">Delete Topic</a>
     {% endif %}
     {% endif %}
-    {# Move this to the topictracker template
+
     {% if current_user.is_authenticated() %}
     {% if current_user.is_authenticated() %}
         {% if current_user.is_tracking_topic(topic) %}
         {% if current_user.is_tracking_topic(topic) %}
         <a href="{{ url_for('forum.untrack_topic', topic_id=topic.id) }}" class="btn btn-primary">Untrack Topic</a>
         <a href="{{ url_for('forum.untrack_topic', topic_id=topic.id) }}" class="btn btn-primary">Untrack Topic</a>
@@ -34,7 +34,7 @@
         <a href="{{ url_for('forum.track_topic', topic_id=topic.id) }}" class="btn btn-primary">Track Topic</a>
         <a href="{{ url_for('forum.track_topic', topic_id=topic.id) }}" class="btn btn-primary">Track Topic</a>
         {% endif %}
         {% endif %}
     {% endif %}
     {% endif %}
-    #}
+
 </div>
 </div>
 
 
 <table class="table table-bordered">
 <table class="table table-bordered">

+ 11 - 3
flaskbb/templates/forum/topictracker.html

@@ -34,9 +34,17 @@
             <td>Last Post</td>
             <td>Last Post</td>
         </tr>
         </tr>
 
 
-        {% for topic in topics.items %}
+        {% for topic, topicread in topics.items %}
         <tr>
         <tr>
-            <td width="4%"></td>
+            <td width="4%">
+
+            {% if topicread|is_unread(topic.last_post) %}
+                <span class="fa fa-comment" style="font-size: 2em"></span>
+            {% else %}
+                <span class="fa fa-comment-o" style="font-size: 2em"></span>
+            {% endif %}
+
+            </td>
             <td>
             <td>
                 <div>
                 <div>
                     <a href="{{ url_for('forum.view_topic', topic_id=topic.id) }}">{{ topic.title }}</a> <br />
                     <a href="{{ url_for('forum.view_topic', topic_id=topic.id) }}">{{ topic.title }}</a> <br />
@@ -50,7 +58,7 @@
                 {{ topic.views }}
                 {{ topic.views }}
             </td>
             </td>
             <td>
             <td>
-                <a href="{{ url_for('forum.view_topic', topic_id=topic.id) }}#pid{{topic.last_post.id}}">{{ topic.last_post.date_created|time_since }}</a><br />
+                <a href="{{ url_for('forum.view_post', post_id=topic.last_post.id) }}">{{ topic.last_post.date_created|time_since }}</a><br />
                 <small>by <a href="{{ url_for('user.profile', username=topic.last_post.user.username) }}">{{ topic.last_post.user.username }}</a></small>
                 <small>by <a href="{{ url_for('user.profile', username=topic.last_post.user.username) }}">{{ topic.last_post.user.username }}</a></small>
             </td>
             </td>
         </tr>
         </tr>