diff options
author | therazer <devnull@localhost> | 2010-11-15 18:53:36 +0100 |
---|---|---|
committer | therazer <devnull@localhost> | 2010-11-15 18:53:36 +0100 |
commit | 8218c2b3e47684d580f388603ea38c40374d4359 (patch) | |
tree | c4911eb38a63be22bc012636b32847f6e8977155 /module/web/templates | |
parent | making filebrowser compatible with relative paths (diff) | |
download | pyload-8218c2b3e47684d580f388603ea38c40374d4359.tar.xz |
fixes for file browser
Diffstat (limited to 'module/web/templates')
-rw-r--r-- | module/web/templates/default/pathchooser.html | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/module/web/templates/default/pathchooser.html b/module/web/templates/default/pathchooser.html index 10299e458..6a72214e8 100644 --- a/module/web/templates/default/pathchooser.html +++ b/module/web/templates/default/pathchooser.html @@ -1,5 +1,6 @@ {% load truncate %} {% load quotepath %} +{% load i18n %} <html> <head> <script class="javascript"> @@ -31,40 +32,49 @@ </head> <body{% ifequal type 'file' %}{% if not oldfile %} onload="setInvalid();"{% endif %}{% endifequal %}> <center> - <form method="get" action="?" onSubmit="chosen();" onReset="exit();"> - <input type="text" name="p" value="{{ oldfile|default:cwd }}" size="60" onfocus="setValid();"> - <input type="submit" value="Ok" name="send"> - </form> - <table border="0" cellspacing="0" cellpadding="3" width="90%"> + <div id="paths"> + <form method="get" action="?" onSubmit="chosen();" onReset="exit();"> + <input type="text" name="p" value="{{ oldfile|default:cwd }}" size="60" onfocus="setValid();"> + <input type="submit" value="Ok" name="send"> + </form> + + {% ifequal type 'folder' %} + <span class="path_abs_rel">{% trans "Path" %}: <a href="{% url path cwd|path_make_absolute|quotepath %}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{% trans "absolute" %}</a> | <a href="{% url path cwd|path_make_relative|quotepath %}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{% trans "relative" %}</a></span> + {% else %} + <span class="path_abs_rel">{% trans "Path" %}: <a href="{% url file cwd|path_make_absolute|quotepath %}"{% if absolute %} style="text-decoration: underline;"{% endif %}>{% trans "absolute" %}</a> | <a href="{% url file cwd|path_make_relative|quotepath %}"{% if not absolute %} style="text-decoration: underline;"{% endif %}>{% trans "relative" %}</a></span> + {% endifequal %} + </div> + <table border="0" cellspacing="0" cellpadding="3"> <tr> - <th>Name</th> - <th>Size</th> - <th>Type</th> - <th>Last modified</th> + <th>{% trans "name" %}</th> + <th>{% trans "size" %}</th> + <th>{% trans "type" %}</th> + <th>{% trans "last modified" %}</th> </tr> + {% if parentdir %} <tr> <td colspan="4"> - <a href="{% ifequal type 'folder' %}{% url path parentdir %}{% else %}{% url file parentdir %}{% endifequal %}"><span class="parentdir">parent directory</span></a> + <a href="{% ifequal type 'folder' %}{% url path parentdir|quotepath %}{% else %}{% url file parentdir|quotepath %}{% endifequal %}"><span class="parentdir">{% trans "parent directory" %}</span></a> </td> </tr> + {% endif %} {% for file in files %} <tr> {% ifequal type 'folder' %} - <td class="name">{% ifequal file.type 'dir' %}<a href="{% url path file.fullpath|quotepath %}" title="{{ file.fullpath }}"><span class="path_directory">{{ file.name|truncate:25 }}</span></a>{% else %}<span class="path_file">{{ file.name|truncate:25 }}{% endifequal %}</span></td> + <td class="name">{% ifequal file.type 'dir' %}<a href="{% url path file.fullpath|quotepath %}" title="{{ file.fullpath }}"><span class="path_directory">{{ file.name|truncate:25 }}</span></a>{% else %}<span class="path_file" title="{{ file.fullpath }}">{{ file.name|truncate:25 }}{% endifequal %}</span></td> {% else %} <td class="name">{% ifequal file.type 'dir' %}<a href="{% url file file.fullpath|quotepath %}" title="{{ file.fullpath }}"><span class="file_directory">{{ file.name|truncate:25 }}</span></a>{% else %}<a href="#" onclick="setFile('{{ file.fullpath }}');" title="{{ file.fullpath }}"><span class="file_file">{{ file.name|truncate:25 }}{% endifequal %}</span></a></td> {% endifequal %} <td class="size">{{ file.size|floatformat:-2 }} {{ file.unit }}</td> - <td class="type">{% ifequal file.type 'dir' %}directory{% else %}{{ file.ext }}{% endifequal %}</td> + <td class="type">{% ifequal file.type 'dir' %}directory{% else %}{{ file.ext|default:"file" }}{% endifequal %}</td> <td class="mtime">{{ file.modified|date:"d.m.Y - H:i:s" }}</td> <tr> {% empty %} <tr> - <td colspan="4">no content</td> + <td colspan="4">{% trans "no content" %}</td> </tr> {% endfor %} </table> </center> </body> -</html> - +</html>
\ No newline at end of file |