/usr/share/pyshared/flask_autoindex/templates/__autoindex__/macros.html is in python-flask-autoindex 0.5-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | {% macro entry(ent) %}
<tr>
{% set icon = ent.guess_icon() %}
<td class="icon">
{% if icon %}
<img src="{{ icon }}" />
{% endif %}
</td>
<td class="name">
<a href="{{ url_for(endpoint, path=ent.path) }}">
{%- if ent.name == ".." -%}
Parent folder
{%- else -%}
{{ ent.name }}
{%- endif -%}
</a></td>
<td class="modified">
<time datetime="{{ ent.modified }}">{{ ent.modified }}</time>
</td>
<td class="size">
{% if ent.size %}
{{ ent.size|filesizeformat }}
{% else %}
-
{% endif %}
</td>
</tr>
{% endmacro %}
{% macro th(key, label, colspan=1) %}
<th class="{{ key }}" colspan="{{ colspan }}">
{%- if sort_by == key and order > 0 -%}
<a href="?sort_by={{ key }}&order=desc">{{ label }}</a>
{%- else -%}
<a href="?sort_by={{ key }}">{{ label }}</a>
{%- endif -%}
{%- if sort_by == key -%}
{%- if order > 0 -%}
<img src="{{ url_for('__autoindex__.static', filename='asc.gif') }}" alt="ASC" />
{%- elif order < 0 -%}
<img src="{{ url_for('__autoindex__.static', filename='desc.gif') }}" alt="DESC" />
{%- endif -%}
{%- endif -%}
</th>
{% endmacro %}
{% macro thead() %}
<tr>
{{ th("name", "Name", 2) }}
{{ th("modified", "Last modified") }}
{{ th("size", "Size") }}
</tr>
{% endmacro %}
{% macro breadcrumb(ent) %}
{% set parent = ent.parent %}
{% if parent %}
{{ breadcrumb(parent) }}
<span class="sep">»</span>
{% endif %}
<a href="{{ url_for(endpoint, path=ent.path) }}">
{% set icon = ent.guess_icon() %}
{% if icon %}
<img src="{{ icon }}" />
{% endif %}
{% if not ent.is_root() %}
{{ ent.name }}
{% endif %}
</a>
{% endmacro %}
|