Commits

Ahmad Khayyat committed f739a6f

Hide the rename and delete columns in the generic popup

The popup is meant for browsing and selection, not editing and library
management. Renaming and deleting submits forms and confuses the
parent page in which the popup dialog is opened.

Comments (0)

Files changed (2)

filebrowser_safe/templates/filebrowser/include/filelisting.html

     {% endifequal %}
 
     <!-- RENAME -->
+    {% ifnotequal query.pop '4' %}
     <td class="fb_icon"><a href="{% url "fb_rename" %}{% query_string %}&amp;filename={{ file.filename }}" class="fb_renamelink" title="{% trans 'Rename' %}"></a></td>
+    {% endifnotequal %}
 
     <!-- SIZE -->
     <td>{{ file.filesize|filesizeformat }}</td>
     <td>{{ file.datetime|date:"N j, Y" }}</td>
 
     <!-- DELETE -->
+    {% ifnotequal query.pop '4' %}
     <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 %}
 
     <!-- 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' %}
     <th>&nbsp;</th>
+    {% endifnotequal %}
     <!-- 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' %}
     <th>&nbsp;</th>
+    {% endifnotequal %}
     {% if settings_var.DEBUG %}<th>Debug</th>{% endif %}
     </tr>
 </thead>