{% extends 'admin/master.html' %} {% import 'admin/lib.html' as lib with context %} {% import 'admin/actions.html' as actionslib with context %} {% block body %} {% block breadcrums %} {% endblock %} {% block file_list_table %}
{% block list_header scoped %} {% if actions %} {% endif %} {% for column in admin_view.column_list %} {% endfor %} {% endblock %} {% for name, path, is_dir, size, date in items %} {% block list_row scoped %} {% if actions %} {% endif %} {% if is_dir %} {% else %} {% if admin_view.is_column_visible('size') %} {% endif %} {% endif %} {% if admin_view.is_column_visible('date') %} {% endif %} {% endblock %} {% endfor %}
  {% if admin_view.is_column_sortable(column) %} {% if sort_column == column %} {{ admin_view.column_label(column) }} {% if sort_desc %} {% else %} {% endif %} {% else %} {{ admin_view.column_label(column) }} {% endif %} {% else %} {{ _gettext(admin_view.column_label(column)) }} {% endif %}
{% if not is_dir %} {% endif %} {% block list_row_actions scoped %} {% if admin_view.can_rename and path and name != '..' %} {%- if admin_view.rename_modal -%} {{ lib.add_modal_button(url=get_url('.rename', path=path, modal=True), title=_gettext('Rename File'), content='') }} {% else %} {%- endif -%} {% endif %} {%- if admin_view.can_delete and path -%} {% if is_dir %} {% if name != '..' and admin_view.can_delete_dirs %}
{{ delete_form.path(value=path) }} {% if delete_form.csrf_token %} {{ delete_form.csrf_token }} {% elif csrf_token %} {% endif %}
{% endif %} {% else %}
{{ delete_form.path(value=path) }} {% if delete_form.csrf_token %} {{ delete_form.csrf_token }} {% elif csrf_token %} {% endif %}
{% endif %} {%- endif -%} {% endblock %}
{{ name }} {% if admin_view.can_download %} {%- if admin_view.edit_modal and admin_view.is_file_editable(path) -%} {{ lib.add_modal_button(url=get_file_url(path, modal=True)|safe, btn_class='', content=name) }} {% else %} {{ name }} {%- endif -%} {% else %} {{ name }} {% endif %} {{ size|filesizeformat }} {{ timestamp_format(date) }}
{% endblock %} {% block toolbar %}
{% if admin_view.can_upload %}
{%- if admin_view.upload_modal -%} {{ lib.add_modal_button(url=get_dir_url('.upload', path=dir_path, modal=True), btn_class="btn btn-default btn-large", content=_gettext('Upload File')) }} {% else %} {{ _gettext('Upload File') }} {%- endif -%}
{% endif %} {% if admin_view.can_mkdir %}
{%- if admin_view.mkdir_modal -%} {{ lib.add_modal_button(url=get_dir_url('.mkdir', path=dir_path, modal=True), btn_class="btn btn-default btn-large", content=_gettext('Create Directory')) }} {% else %} {{ _gettext('Create Directory') }} {%- endif -%}
{% endif %} {% if actions %}
{{ actionslib.dropdown(actions, 'dropdown-toggle btn btn-default btn-large') }}
{% endif %}
{% endblock %} {% block actions %} {{ actionslib.form(actions, get_url('.action_view')) }} {% endblock %} {%- if admin_view.rename_modal or admin_view.mkdir_modal or admin_view.upload_modal or admin_view.edit_modal -%} {{ lib.add_modal_window() }} {%- endif -%} {% endblock %} {% block tail %} {{ super() }} {{ actionslib.script(_gettext('Please select at least one file.'), actions, actions_confirmation) }} {% endblock %}