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

#410: placeholders for threads lists actions

Rafał Pitoń 10 лет назад
Родитель
Сommit
a6f98578e8

+ 1 - 0
misago/templates/misago/threads/actions.html

@@ -0,0 +1 @@
+{{ list_actions }}

+ 0 - 0
misago/templates/misago/threads/actions_js.html


+ 4 - 0
misago/templates/misago/threads/forum.html

@@ -54,6 +54,10 @@
   {% endif %}
 
   {% include "misago/threads/reply_btn.html" %}
+
+  {% if user.is_authenticated %}
+    {% include "misago/threads/actions.html" %}
+  {% endif %}
 </div>
 
 {{ block.super }}

+ 3 - 4
misago/threads/views/generic/forum.py

@@ -230,15 +230,14 @@ class ForumActions(Actions):
                 'action': 'announce',
                 'name': _("Change to announcements")
             })
-        if forum.acl['can_change_threads_weight'] == 1:
+        if forum.acl['can_change_threads_weight']:
             actions.append({
                 'action': 'pin',
                 'name': _("Change to pinned")
             })
-        if forum.acl['can_change_threads_weight']:
             actions.append({
-                'action': 'pin',
-                'name': _("Change to standard")
+                'action': 'default',
+                'name': _("Change to default")
             })
 
         return actions