Browse Source

Keep secret stuff secret

Rafał Pitoń 11 years ago
parent
commit
7c5c0d214c

+ 4 - 2
templates/cranefly/new_threads.html

@@ -46,16 +46,18 @@
         </div>
         <div class="thread-body">
           <ul class="thread-activity">
-            {% if thread.replies_reported %}
+            {% if user.is_authenticated() %}
+            {% if thread.replies_reported and acl.threads.can_mod_posts(forum) %}
             <li class="thread-replies-reported tooltip-top" title="{% trans %}Reported replies{% endtrans %}">
               {{ thread.replies_reported|intcomma }}
             </li>
             {% endif %}
-            {% if thread.replies_moderated %}
+            {% if thread.replies_moderated and acl.threads.can_approve(forum) %}
             <li class="thread-replies-moderated tooltip-top" title="{% trans %}Unreviewed replies{% endtrans %}">
               {{ thread.replies_moderated|intcomma }}
             </li>
             {% endif %}
+            {% endif %}
             {% if thread.replies %}
             <li class="thread-replies{% if not thread.is_read%} thread-replies-new{% endif %} tooltip-top" title="{% trans %}Replies{% endtrans %}">
               {{ thread.replies|intcomma }}

+ 4 - 2
templates/cranefly/popular_threads.html

@@ -46,16 +46,18 @@
         </div>
         <div class="thread-body">
           <ul class="thread-activity">
-            {% if thread.replies_reported %}
+            {% if user.is_authenticated() %}
+            {% if thread.replies_reported and acl.threads.can_mod_posts(forum) %}
             <li class="thread-replies-reported tooltip-top" title="{% trans %}Reported replies{% endtrans %}">
               {{ thread.replies_reported|intcomma }}
             </li>
             {% endif %}
-            {% if thread.replies_moderated %}
+            {% if thread.replies_moderated and acl.threads.can_approve(forum) %}
             <li class="thread-replies-moderated tooltip-top" title="{% trans %}Unreviewed replies{% endtrans %}">
               {{ thread.replies_moderated|intcomma }}
             </li>
             {% endif %}
+            {% endif %}
             {% if thread.replies %}
             <li class="thread-replies{% if not thread.is_read%} thread-replies-new{% endif %} tooltip-top" title="{% trans %}Replies{% endtrans %}">
               {{ thread.replies|intcomma }}

+ 1 - 1
templates/cranefly/private_threads/thread.html

@@ -541,7 +541,7 @@
     {% if extra %}
     {% if not is_read %}<li><a href="{{ url('private_thread_new', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
     {% endif %}
-    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{{ url('private_thread_reported', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
+    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(forum) %}<li><a href="{{ url('private_thread_reported', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
   </ul>
 </div>
 {% endmacro %}

+ 4 - 2
templates/cranefly/threads/list.html

@@ -145,16 +145,18 @@
         </div>
         <div class="thread-body">
           <ul class="thread-activity">
-            {% if thread.replies_reported %}
+            {% if user.is_authenticated() %}
+            {% if thread.replies_reported and acl.threads.can_mod_posts(forum) %}
             <li class="thread-replies-reported tooltip-top" title="{% trans %}Reported replies{% endtrans %}">
               {{ thread.replies_reported|intcomma }}
             </li>
             {% endif %}
-            {% if thread.replies_moderated %}
+            {% if thread.replies_moderated and acl.threads.can_approve(forum) %}
             <li class="thread-replies-moderated tooltip-top" title="{% trans %}Unreviewed replies{% endtrans %}">
               {{ thread.replies_moderated|intcomma }}
             </li>
             {% endif %}
+            {% endif %}
             {% if thread.replies %}
             <li class="thread-replies{% if not thread.is_read%} thread-replies-new{% endif %} tooltip-top" title="{% trans %}Replies{% endtrans %}">
               {{ thread.replies|intcomma }}

+ 1 - 1
templates/cranefly/threads/thread.html

@@ -508,7 +508,7 @@
     {% if extra and user.is_authenticated() %}
     {% if not is_read %}<li><a href="{{ url('thread_new', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
     {% if thread.replies_moderated > 0 and acl.threads.can_approve(forum) %}<li><a href="{{ url('thread_moderated', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first post awaiting review{% endtrans %}"><i class="icon-eye-close"></i> {% trans %}First Unreviewed{% endtrans %}</a></li>{% endif %}
-    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{{ url('thread_reported', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
+    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(forum) %}<li><a href="{{ url('thread_reported', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
     {% endif %}
   </ul>
 </div>