{% extends "base.html" %} {% macro draw_widget(f, widget) -%} {%- if widget.type == 'button' -%} {{ widget.text or '' }} {%- elif widget.type == 'link' -%} {{ widget.text or '' }} {%- elif widget.type == 'script' -%} {%- elif widget.type == 'stylesheet' -%} {%- elif widget.type == 'upload' -%}
{%- elif widget.type == 'html' -%} {{ widget.html|safe }} {%- endif -%} {%- endmacro %} {% macro draw_widgets(f, place) -%} {%- for widget in f.widgets -%} {%- if widget.place == place -%} {{ draw_widget(f, widget) }} {%- endif -%} {%- endfor -%} {%- endmacro %} {% macro th(text, property, type='text', colspan=1) -%} 1 %} colspan="{{ colspan }}"{% endif %}> {% set urlpath = file.urlpath or None %} {% set property_desc = '-{}'.format(property) %} {% set prop = property_desc if sort_property == property else property %} {% set active = ' active' if sort_property in (property, property_desc) else '' %} {% set desc = ' desc' if sort_property == property_desc else '' %} {{ text }} {%- endmacro %} {% block styles %} {{ super() }} {{ draw_widgets(file, 'styles') }} {% endblock %} {% block head %} {{ super() }} {{ draw_widgets(file, 'head') }} {% endblock %} {% block scripts %} {{ super() }} {{ draw_widgets(file, 'scripts') }} {% endblock %} {% block header %}

    {% for parent in file.ancestors[::-1] %}
  1. {{ parent.name }}
  2. {% endfor %} {% if file.name %}
  3. {{ file.name }}
  4. {% endif %}

{% endblock %} {% block content %} {% block content_header %} {{ draw_widgets(file, 'header') }} {% endblock %} {% block content_table %} {% if file.is_empty %}

No files in directory

{% else %} {{ th('Name', 'text', 'text', 3) }} {{ th('Mimetype', 'type') }} {{ th('Modified', 'modified', 'numeric') }} {{ th('Size', 'size', 'numeric') }} {% for f in file.listdir(sortkey=sort_fnc, reverse=sort_reverse) %} {% if f.link %} {% else %} {% endif %} {% endfor %}
{{ draw_widget(f, f.link) }} {{ draw_widgets(f, 'entry-actions') }} {{ f.type or '' }} {{ f.modified or '' }} {{ f.size or '' }}
{% endif %} {% endblock %} {% block content_footer %} {{ draw_widgets(file, 'footer') }} {% endblock %} {% endblock %}