{% extends "base.html" %} {% block copyright %} {% endblock %} {% block title %}Listing of {{ directory_info.name() }}{% endblock %} {% block extra_head %} {% if settings.DEBUG %} {% else %} {% endif %} {% endblock %} {% set disabled_attrs='class="disabled" title="You do not have permission to use this function"'|safe %} {% set vdisabled_attrs='class="disabled" title="You do not have permission to view this folder"'|safe %} {% block body %}

Listing of {{ directory_info.name() }}

{% if err_msg %}
{{ err_msg|newlines }}
{% else %} {% if db_info and db_info.status == STATUS_ACTIVE %}
  {% endif %} Total folder size: {{ directory_info.size()|filesizeformat }} {# Dummy row to vpad and set the column spacings #} {% set row_class = cycler('odd', 'even') %} {% if directory_info.exists() %} {# Offer a Back link if this isn't the root directory #} {% if directory_info.parent_name() %} {% set back_url = url_for('browse', path=directory_info.parent_name()) %} {% endif %} {# Loop over all directory items #} {% for entry in directory_info.contents() %} {% if entry.is_directory %} {% set sep = pathsep if directory_info.name() != pathsep else '' %} {% set sub_folder_path = directory_info.name() + sep + entry.filename %} {% set view_url = url_for('browse', path=sub_folder_path) %} {% set view_permitted = is_folder_permitted(sub_folder_path, FolderPermission.ACCESS_VIEW) %} {% else %} {% set fpath = (directory_info.name() + pathsep) if directory_info.name() != pathsep else '' %} {% set view_url = url_for('details', src=fpath + entry.filename) %} {% set can_view = entry.filename|fileextension in formats %} {% endif %} {% else %} {# The directory is empty #} {% endfor %} {% else %} {# The directory does not exist #} {% endif %} {# End if directory exists #}
         
Back       (back to parent folder)
{% if view_permitted %} Folder {% else %} {% endif %}       {% if view_permitted %} {{ entry.filename }} {% else %} {{ entry.filename }} {% endif %} {% if can_view %} Image {% else %} File {% endif %}   {% if can_view %} {{ entry.size|filesizeformat }} {% else %} {{ entry.size|filesizeformat }} {% endif %} {% if can_view %} {{ entry.modified|datetimeformat(True) }} {% else %} {{ entry.modified|datetimeformat(True) }} {% endif %} {% if can_view %} {{ entry.filename }} {% else %} {{ entry.filename }} {% endif %}
This folder contains no files.
Sorry, this folder does not exist.
(back to root folder)
{% if directory_info.exists() and directory_info.count() > 0 %}
{% include "inc_timezone.html" %} {% endif %} {% include "inc_preview_popup.html" %} {% if db_info %} {% set parent_path = db_parent_info.path if db_parent_info else '' %} {% endif %} {% endif %} {% endblock %}