Просмотр исходного кода

Added a few icons according to their functinos

sh4nks 11 лет назад
Родитель
Сommit
7d4e310c12
2 измененных файлов с 24 добавлено и 15 удалено
  1. 12 5
      flaskbb/templates/forum/forum.html
  2. 12 10
      flaskbb/templates/forum/topic.html

+ 12 - 5
flaskbb/templates/forum/forum.html

@@ -13,19 +13,26 @@
     <li class="active">{{ forum.title }}</li>
 </ol>
 
+{% if forum.topics %}
 <div class="pull-left" style="padding-bottom: 10px">
     {{ render_pagination(topics, url_for('forum.view_forum', forum_id=forum.id)) }}
 </div> <!-- end span pagination -->
+{% endif %}
 
 {% if current_user|post_topic(forum) and not forum.is_category %}
 <div class="pull-right" style="padding-bottom: 10px">
-    {% if forum.locked %}
-    <span class="btn btn-primary"><span class="fa fa-lock"></span> Locked</span>
-    {% else %}
-    <a href="{{ url_for('forum.new_topic', forum_id=forum.id) }}" class="btn btn-primary">New Topic</a>
-    {% endif %}
+    <!-- star tick pencil -->
+    <div class="btn-group">
+        <a href="#" class="btn btn-default"><span class="fa fa-check"></span> Mark as Read</a>
+        {% if forum.locked %}
+        <span class="btn btn-primary"><span class="fa fa-lock"></span> Locked</span>
+        {% else %}
+        <a href="{{ url_for('forum.new_topic', forum_id=forum.id) }}" class="btn btn-primary"><span class="fa fa-pencil"></span> New Topic</a>
+        {% endif %}
+    </div>
 </div>
 {% endif %}
+
 {% if subforums[0]|length %}
 <table class="table table-bordered">
     <thead>

+ 12 - 10
flaskbb/templates/forum/topic.html

@@ -20,21 +20,23 @@
 </div> <!-- end span pagination -->
 
 <div class="pull-right" style="padding-bottom: 10px">
-    {% if current_user|post_reply(topic.forum) and not (topic.locked or not topic.forum.locked) %}
-    <a href="{{ url_for('forum.new_post', topic_id=topic.id) }}" class="btn btn-primary">Reply</a>
-    {% endif %}
     {% 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-danger"><span class="fa fa-trash-o"></span> Delete Topic</a>
     {% endif %}
 
     {% if current_user.is_authenticated() %}
-        {% 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>
-        {% else %}
-        <a href="{{ url_for('forum.track_topic', topic_id=topic.id) }}" class="btn btn-primary">Track Topic</a>
-        {% endif %}
+        <div class="btn btn-group">
+            {% if current_user.is_tracking_topic(topic) %}
+            <a href="{{ url_for('forum.untrack_topic', topic_id=topic.id) }}" class="btn btn-default"><span class="fa fa-star"></span> Untrack Topic</a>
+            {% else %}
+            <a href="{{ url_for('forum.track_topic', topic_id=topic.id) }}" class="btn btn-default"><span class="fa fa-star"></span> Track Topic</a>
+            {% endif %}
+
+            {% if current_user|post_reply(topic.forum) and not (topic.locked or topic.forum.locked) %}
+            <a href="{{ url_for('forum.new_post', topic_id=topic.id) }}" class="btn btn-primary"><span class="fa fa-pencil"></span> Reply</a>
+            {% endif %}
+        </div>
     {% endif %}
-
 </div>
 
 <table class="table table-bordered">