1. Kevin Chan
  2. django-filebrowser-no-grappelli-and-uploadify

Commits

Kevin Chan  committed af255e3

Added {% load url from future %}; updated url tags to use quoted params.

  • Participants
  • Parent commits 5b49942
  • Branches master
  • Tags 3.0.2

Comments (0)

Files changed (5)

File filebrowser/templates/filebrowser/append.html

View file
  • Ignore whitespace
+{% load url from future %}
 {% load i18n %}
 
 <div class="module">
     <table>
         <caption>{% trans "FileBrowser" %}</caption>
         <tr class="row2">
-            <th scope="row"><a href="{% url fb_browse %}">{% trans "FileBrowser" %}</a></th>
+            <th scope="row"><a href="{% url 'fb_browse' %}">{% trans "FileBrowser" %}</a></th>
             <td> </td>
             <td> </td>
         </tr>
     </table>
-</div>
+</div>

File filebrowser/templates/filebrowser/custom_field.html

View file
  • Ignore whitespace
+{% load url from future %}
 {% load fb_versions %}
-<input id="{{ final_attrs.id }}" type="text" class="vFileBrowseField" name="{{ final_attrs.name }}" value="{{ value }}" /><a href="javascript:FileBrowser.show('{{ final_attrs.id }}', '{% url fb_browse %}?pop=1{% if final_attrs.directory %}&amp;dir={{ final_attrs.directory }}{% endif %}{% if final_attrs.format %}&amp;type={{ final_attrs.format }}{% endif %}');" class="fb_show">
+<input id="{{ final_attrs.id }}" type="text" class="vFileBrowseField" name="{{ final_attrs.name }}" value="{{ value }}" /><a href="javascript:FileBrowser.show('{{ final_attrs.id }}', '{% url 'fb_browse' %}?pop=1{% if final_attrs.directory %}&amp;dir={{ final_attrs.directory }}{% endif %}{% if final_attrs.format %}&amp;type={{ final_attrs.format }}{% endif %}');" class="fb_show">
     <img src="{{ final_attrs.search_icon }}" alt="" />
 </a>
 {% ifequal value.filetype "Image" %}

File filebrowser/templates/filebrowser/include/breadcrumbs.html

View file
  • Ignore whitespace
+{% load url from future %}
 {% load i18n fb_tags %}
 
 <div class="breadcrumbs">
         <a href="../../">{% trans "Home" %}</a> &rsaquo;
     {% endif %}
     {% if breadcrumbs or breadcrumbs_title %}
-        <a href="{% url fb_browse %}{% query_string "" "dir,filename,p" %}">{% trans 'FileBrowser' %}</a> &rsaquo;
+        <a href="{% url 'fb_browse' %}{% query_string "" "dir,filename,p" %}">{% trans 'FileBrowser' %}</a> &rsaquo;
     {% else %}
         {% trans 'FileBrowser' %}
     {% endif %}
     {% for item in breadcrumbs %}
         {% if not forloop.last %}
-            <a href="{% url fb_browse %}{% query_string "" "dir,filename,p" %}&amp;dir={{ item.1 }}">{{ item.0 }}</a> &rsaquo;
+            <a href="{% url 'fb_browse' %}{% query_string "" "dir,filename,p" %}&amp;dir={{ item.1 }}">{{ item.0 }}</a> &rsaquo;
         {% else %}
             {% if breadcrumbs_title %}
-                <a href="{% url fb_browse %}{% query_string "" "dir,filename,p" %}&amp;dir={{ item.1 }}">{{ item.0 }}</a> &rsaquo;
+                <a href="{% url 'fb_browse' %}{% query_string "" "dir,filename,p" %}&amp;dir={{ item.1 }}">{{ item.0 }}</a> &rsaquo;
             {% else %}
                 {{ item.0 }}
             {% endif %}

File filebrowser/templates/filebrowser/include/filelisting.html

View file
  • Ignore whitespace
+{% load url from future %}
 {% load i18n fb_tags fb_versions %}
 
 {% for file in page.object_list %}
         
         <!-- FILENAME/DIMENSIONS -->
         {% if file.filetype == "Folder" %}
-            <td><a href="{% url fb_browse %}{% query_string "" "q,dir,p" %}&amp;dir={{ file.path_relative_directory|urlencode }}"><strong>{{ file.filename }}</strong></a></td>
+            <td><a href="{% url 'fb_browse' %}{% query_string "" "q,dir,p" %}&amp;dir={{ file.path_relative_directory|urlencode }}"><strong>{{ file.filename }}</strong></a></td>
         {% else %}
             <td>
                 <b><a href="{{ file.url_full }}">{{ file.filename }}</a></b>
                 {% endif %}
                 {% endcomment %}
                 {% if results_var.images_total and settings_var.ADMIN_VERSIONS and file.filetype == "Image" %}
-                    <a class="internal fb_showversions" href="{% url fb_versions %}{% query_string "" "p" %}&amp;filename={{ file.filename }}" title="{% trans 'Versions' %}">{% trans 'Versions' %}</a>
+                    <a class="internal fb_showversions" href="{% url 'fb_versions' %}{% query_string "" "p" %}&amp;filename={{ file.filename }}" title="{% trans 'Versions' %}">{% trans 'Versions' %}</a>
                 {% endif %}
             </td>
         {% endif %}
         <td>{{ file.datetime|date:"N j, Y" }}</td>
 
         <!-- RENAME -->
-        <td class="fb_icon"><a href="{% url fb_rename %}{% query_string %}&amp;filename={{ file.filename }}" class="fb_renamelink" title="{% trans 'Rename' %}"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_rename.gif" /></a></td>
+        <td class="fb_icon"><a href="{% url 'fb_rename' %}{% query_string %}&amp;filename={{ file.filename }}" class="fb_renamelink" title="{% trans 'Rename' %}"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_rename.gif" /></a></td>
 
         <!-- DELETE -->
         {% if results_var.delete_total %}
         <td class="fb_icon">
           {% ifnotequal file.filetype 'Folder' %}
-          <a href="{% url fb_delete %}{% query_string %}&amp;filename={{ file.filename }}&amp;filetype={{ file.filetype }}" class="fb_deletelink" onclick="return confirm('{% trans "Are you sure you want to delete this file?" %}');" title="{% trans 'Delete File' %}"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_delete.gif" /></a>
+          <a href="{% url 'fb_delete' %}{% query_string %}&amp;filename={{ file.filename }}&amp;filetype={{ file.filetype }}" class="fb_deletelink" onclick="return confirm('{% trans "Are you sure you want to delete this file?" %}');" title="{% trans 'Delete File' %}"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_delete.gif" /></a>
           {% else %}
           {% if file.is_empty %}
-          <a href="{% url fb_delete %}{% query_string %}&amp;filename={{ file.filename }}&amp;filetype={{ file.filetype }}" class="fb_deletelink" onclick="return confirm('{% trans "Are you sure you want to delete this Folder?" %}');" title="{% trans 'Delete Folder' %}"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_delete.gif" /></a>
+          <a href="{% url 'fb_delete' %}{% query_string %}&amp;filename={{ file.filename }}&amp;filetype={{ file.filetype }}" class="fb_deletelink" onclick="return confirm('{% trans "Are you sure you want to delete this Folder?" %}');" title="{% trans 'Delete Folder' %}"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_icon_delete.gif" /></a>
           {% endif %}
           {% endifnotequal %}
         </td>

File filebrowser/templates/filebrowser/index.html

View file
  • Ignore whitespace
 {% extends "admin/base_site.html" %}
 
 <!-- LOADING -->
+{% load url from future %}
 {% load i18n fb_tags fb_pagination %}
 
 <!-- STYLESHEETS -->
 <div id="content-main">
     {% block object-tools %}
     <ul class="object-tools">
-        <li><a href="{% url fb_mkdir %}{% query_string '' 'p' %}">{% trans "New Folder" %}</a></li>
-        <li><a href="{% url fb_upload %}{% query_string '' 'p' %}" class="focus">{% trans "Upload" %}</a></li>
+        <li><a href="{% url 'fb_mkdir' %}{% query_string '' 'p' %}">{% trans "New Folder" %}</a></li>
+        <li><a href="{% url 'fb_upload' %}{% query_string '' 'p' %}" class="focus">{% trans "Upload" %}</a></li>
     </ul>
     {% endblock %}
     <div class="module filtered" id="changelist">