Browse Source

Fix mass actions not working without filters, small admin forms tweaks

rafalp 6 years ago
parent
commit
f44ec982ab

+ 16 - 4
misago/templates/misago/admin/categories/list.html

@@ -15,8 +15,9 @@
 {% block table-header %}
 {% block table-header %}
 <th style="width: 1%;">&nbsp;</th>
 <th style="width: 1%;">&nbsp;</th>
 <th>{% trans "Category" %}</th>
 <th>{% trans "Category" %}</th>
-<th style="width: 120px;">{% trans "Threads" %}</th>
-<th style="width: 120px;">{% trans "Posts" %}</th>
+<th>{% trans "CSS class" %}</th>
+<th>{% trans "Threads" %}</th>
+<th>{% trans "Posts" %}</th>
 <th style="width: 1%;">&nbsp;</th>
 <th style="width: 1%;">&nbsp;</th>
 <th style="width: 1%;">&nbsp;</th>
 <th style="width: 1%;">&nbsp;</th>
 <th style="width: 1%;">&nbsp;</th>
 <th style="width: 1%;">&nbsp;</th>
@@ -38,6 +39,13 @@
   </a>
   </a>
 </td>
 </td>
 <td class="small">
 <td class="small">
+  {% if item.css_class %}
+    <pre class="m-0">{{ item.css_class }}</pre>
+  {% else %}
+    <i class="text-muted">{% trans "Not set" %}</i>
+  {% endif %}
+</td>
+<td class="small">
   {{ item.threads }}
   {{ item.threads }}
 </td>
 </td>
 <td class="small">
 <td class="small">
@@ -52,7 +60,9 @@
       </button>
       </button>
     </form>
     </form>
   {% else %}
   {% else %}
-    &nbsp;
+    <button class="btn btn-light btn-sm" disabled>
+      <span class="fa fa-chevron-down"></span>
+    </button>
   {% endif %}
   {% endif %}
 </td>
 </td>
 <td>
 <td>
@@ -64,7 +74,9 @@
       </button>
       </button>
     </form>
     </form>
   {% else %}
   {% else %}
-    &nbsp;
+    <button class="btn btn-light btn-sm" disabled>
+      <span class="fa fa-chevron-up"></span>
+    </button>
   {% endif %}
   {% endif %}
 </td>
 </td>
 <td>
 <td>

+ 2 - 2
misago/templates/misago/admin/generic/filter_form.html

@@ -16,6 +16,6 @@
         <span class="fa fa-times"></span>
         <span class="fa fa-times"></span>
         {% trans "Clear filters" %}
         {% trans "Clear filters" %}
       </button>
       </button>
-    </form>
-  {% endif %}
+    {% endif %}
+  </form>
 </div>
 </div>

+ 1 - 1
misago/templates/misago/admin/generic/mass_actions.html

@@ -1,11 +1,11 @@
 {% load i18n %}
 {% load i18n %}
 <div class="col-auto ml-auto">
 <div class="col-auto ml-auto">
   <form id="mass-action" action="{{ querystring }}" method="post">
   <form id="mass-action" action="{{ querystring }}" method="post">
+    {% csrf_token %}
     <div class="dropdown">
     <div class="dropdown">
       <button type="button" class="btn btn-light btn-sm dropdown-toggle" data-toggle="dropdown">
       <button type="button" class="btn btn-light btn-sm dropdown-toggle" data-toggle="dropdown">
         <span class="fas fa-check-square"></span> <span>{{ empty_selection_label }}</span>
         <span class="fas fa-check-square"></span> <span>{{ empty_selection_label }}</span>
       </button>
       </button>
-      {% csrf_token %}
       <div class="dropdown-menu dropdown-menu-right">
       <div class="dropdown-menu dropdown-menu-right">
         <h6 class="dropdown-header">{% trans "With selected:" %}</h6>
         <h6 class="dropdown-header">{% trans "With selected:" %}</h6>
         {% for action in mass_actions %}
         {% for action in mass_actions %}

+ 2 - 2
misago/templates/misago/admin/ranks/list.html

@@ -56,14 +56,14 @@
   {% if item.title %}
   {% if item.title %}
     {{ item.title }}
     {{ item.title }}
   {% else %}
   {% else %}
-    <i class="text-muted">{% trans "No title set" %}</i>
+    <i class="text-muted">{% trans "Not set" %}</i>
   {% endif %}
   {% endif %}
 </td>
 </td>
 <td class="small">
 <td class="small">
   {% if item.css_class %}
   {% if item.css_class %}
     <pre class="m-0">{{ item.css_class }}</pre>
     <pre class="m-0">{{ item.css_class }}</pre>
   {% else %}
   {% else %}
-    <i class="text-muted">{% trans "CSS class set" %}</i>
+    <i class="text-muted">{% trans "Not set" %}</i>
   {% endif %}
   {% endif %}
 </td>
 </td>
 {% include "misago/admin/generic/list_extra_actions.html" %}
 {% include "misago/admin/generic/list_extra_actions.html" %}