Browse Source

Only show 'Report Post' if the user is logged in

sh4nks 11 years ago
parent
commit
8b068ea281
1 changed files with 2 additions and 0 deletions
  1. 2 0
      flaskbb/templates/forum/topic.html

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

@@ -154,9 +154,11 @@
                 </span>
                 </span>
 
 
                 <span class="pull-right">
                 <span class="pull-right">
+                    {% if current_user.is_authenticated %}
                     <a href="{{ url_for('forum.report_post', post_id=post.id) }}" onclick="window.open(this.href, 'wio_window','width=500,height=500'); return false;">
                     <a href="{{ url_for('forum.report_post', post_id=post.id) }}" onclick="window.open(this.href, 'wio_window','width=500,height=500'); return false;">
                         Report
                         Report
                     </a> |
                     </a> |
+                    {% endif %}
                     {% if current_user|edit_post(post.user_id, topic.forum) %}
                     {% if current_user|edit_post(post.user_id, topic.forum) %}
                     <a href="{{ url_for('forum.edit_post', post_id=post.id) }}">Edit</a> |
                     <a href="{{ url_for('forum.edit_post', post_id=post.id) }}">Edit</a> |
                     {% endif %}
                     {% endif %}