Commits

Stephen McDonald committed 5f11e53

Apply popup layout tweaks to all popup types.

Comments (0)

Files changed (2)

filebrowser_safe/templates/filebrowser/include/filelisting.html

 {% load i18n future adminmedia fb_tags mezzanine_tags %}
 
+{% if query.pop %}
+<style>
+#header, .object-tools {display: none;}
+h1 {margin:-30px 0 15px 0;}
+</style>
+{% endif %}
+
 {% for file in page.object_list %}
 <tr class="{% cycle 'row1' 'row2' %}">
 
         {% endif %}
     </td>
     {% endif %}
-    <style>#media-library-popup #header, #media-library-popup .object-tools {display: none;}</style>
     {% endifequal %}
 
     <!-- FILEICON -->
     {% endifequal %}
 
     <!-- RENAME -->
-    {% ifnotequal query.pop '4' %}
+    {% if not query.pop %}
     <td class="fb_icon"><a href="{% url "fb_rename" %}{% query_string %}&amp;filename={{ file.filename }}" class="fb_renamelink" title="{% trans 'Rename' %}"></a></td>
-    {% endifnotequal %}
+    {% endif %}
 
     <!-- SIZE -->
     <td>{{ file.filesize|filesizeformat }}</td>
     <td>{{ file.datetime|date:"N j, Y" }}</td>
 
     <!-- DELETE -->
-    {% ifnotequal query.pop '4' %}
+    {% if not query.pop %}
     <td class="fb_icon">
         {% ifnotequal file.filetype 'Folder' %}
         <form method="POST" action="{% url "fb_delete" %}{% query_string %}&amp;filename={{ file.filename }}&amp;filetype={{ file.filetype }}" id="delete-{{ forloop.counter0 }}">{% csrf_token %}</form>
         <a href="#" class="fb_deletelink" onclick="if (confirm('{% trans "Are you sure you want to delete this Folder?" %}')) {$('#delete-{{ forloop.counter0 }}').submit();} return false;" title="{% trans 'Delete Folder' %}"></a>
         {% endifnotequal %}
     </td>
-    {% endifnotequal %}
+    {% endif %}
 
     <!-- DEBUG -->
     {% if settings_var.DEBUG %}

filebrowser_safe/templates/filebrowser/include/tableheader.html

     {% ifequal query.o 'filename_lower' %}<th class="sorted {{ query.ot }}ending"><a href="{% query_string "" "o,ot,p" %}&amp;ot={% ifequal query.ot 'desc' %}asc{% else %}desc{% endifequal %}&amp;o=filename_lower">{% trans 'Filename' %}</a></th>{% endifequal %}
     {% ifnotequal query.o 'filename_lower' %}<th><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=filename_lower">{% trans 'Filename' %}</a></th>{% endifnotequal %}
     <!-- RENAME -->
-    {% ifnotequal query.pop '4' %}
+    {% if not query.pop %}}
     <th>&nbsp;</th>
-    {% endifnotequal %}
+    {% endif %}
     <!-- SIZE -->
     {% ifequal query.o 'filesize' %}<th class="sorted {{ query.ot }}ending"><a href="{% query_string "" "o,ot,p" %}&amp;ot={% ifequal query.ot 'desc' %}asc{% else %}desc{% endifequal %}&amp;o=filesize">{% trans 'Size' %}</a></th>{% endifequal %}
     {% ifnotequal query.o 'filesize' %}<th><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=filesize">{% trans 'Size' %}</a></th>{% endifnotequal %}
     {% ifequal query.o 'date' %}<th class="sorted {{ query.ot }}ending"><a href="{% query_string "" "o,ot,p" %}&amp;ot={% ifequal query.ot 'desc' %}asc{% else %}desc{% endifequal %}&amp;o=date">{% trans 'Date' %}</a></th>{% endifequal %}
     {% ifnotequal query.o 'date' %}<th><a href="{% query_string "" "o,ot,p" %}&amp;ot=asc&amp;o=date">{% trans 'Date' %}</a></th>{% endifnotequal %}
     <!-- DELETE -->
-    {% ifnotequal query.pop '4' %}
+    {% if not query.pop %}
     <th>&nbsp;</th>
-    {% endifnotequal %}
+    {% endif %}
     {% if settings_var.DEBUG %}<th>Debug</th>{% endif %}
     </tr>
 </thead>