Source

Ochs / ochs_filebrowser / templates / filebrowser / include / filelisting.html

Full commit
{% load adminmedia %}
{% load i18n %}

<tr>
    <!-- Fileselect for FileBrowseField -->
    {% ifequal popmode '1' %}
    <td class="fb_icon">
        <a href="javascript://" onclick="FileSubmit('{{ file.link }}', '{{ file.path_thumb }}', '{{ file.file_type }}');" class="fb_selectlink" title="{% trans 'Select' %}"></a>
    </td>
    {% endifequal %}
    <!-- Fileselect for RTE/TinyMCE -->
    {% ifequal popmode '2' %}
    <td class="fb_icon">
        {% ifnotequal file.file_type 'Folder' %}
            <a href="javascript:FileBrowserDialogue.fileSubmit('{{ file.link }}');" class="fb_selectlink" title="{% trans 'Select File' %}"></a>
        {% endifnotequal %}
    </td>
    {% endifequal %}
    <!-- FileIcon -->
    <td class="fb_icon"><img src="{{ settings_var.URL_FILEBROWSER_MEDIA }}img/filebrowser_type_{{ file.file_type|lower }}.gif" /></td>
    <!-- Thumbnail or MakeThumbIcon -->
    {% ifnotequal counter.Image 0 %}
    {% if results_var.change_total %}
    <td class="fb_icon">
        {% ifequal file.file_type 'Image' %}
        <a href="{{ file.link }}"><img src="{{ file.path_thumb }}" width="{{ file.thumb_dimensions.0 }}" height="{{ file.thumb_dimensions.1 }}" title="{% trans 'View Image' %}" /></a>
        {% endifequal %}
    </td>
    {% endif %}
    {% endifnotequal %}
    <!-- Filename/Dimensions -->
    {% ifequal file.file_type 'Folder' %}
    <td><b><a href="{{ file.link }}/{{ query.query_str_total }}">{{ file.filename }}</a></b></td>
    {% else %}
    <td><b><a href="{{ file.link }}">{{ file.filename }}</a></b>{% if file.image_dimensions %}<br /><span class="tiny">{{ file.image_dimensions.0 }} x {{ file.image_dimensions.1 }} px</span>{% endif %}</td>
    {% endifequal %}
    <!-- Size -->
    <td>{{ file.filesize_str|safe }}</td>
    <!-- Date -->
    <td>{{ file.date }}</td>
    <!-- Delete -->
    {% if results_var.delete_total %}
    <td class="fb_icon">
        {% ifnotequal file.file_type 'Folder' %}
        <a href="delete/{{ query.query_str_total }}&filename={{ file.filename }}&type={{ file.file_type }}" class="fb_deletelink" onclick="return confirm('{% trans "Are you sure you want to delete this file?" %}');" title="{% trans 'Delete File' %}"></a>
        {% else %}
        {% if file.flag_deletedir %}
        <a href="delete/{{ query.query_str_total }}&filename={{ file.filename }}&type={{ file.file_type }}" class="fb_deletelink" onclick="return confirm('{% trans "Are you sure you want to delete this Folder?" %}');" title="{% trans 'Delete Folder' %}"></a>
        {% endif %}
        {% endifnotequal %}
    </td>
    {% endif %}
</tr>