]> Raphaƫl G. Git Repositories - treebundle/blob - templates/album.html.twig
Add rapsyspack.file_util helper
[treebundle] / templates / album.html.twig
1 {% extends '@RapsysTree/_base.html.twig' %}
2 {% block content %}
3 {% if album is defined and album %}
4 <article>
5 <header>
6 <h2>
7 {% for breadcrumb in album.breadcrumbs %}
8 <a href="{{ breadcrumb.link }}">{{ breadcrumb.name }}</a>
9 {% endfor %}
10 </h2>
11 {% if album.elements is defined and album.elements %}
12 <ul>
13 {% if album.elements is defined and album.elements %}
14 {% for eid, element in album.elements %}
15 <li><a href="{{ element.link }}">{{ element.name }}</a></li>
16 {% endfor %}
17 {% endif %}
18 </ul>
19 {% endif %}
20 </header>
21 <section>
22 {% if ( album.directories is defined and album.directories ) or ( album.files is defined and album.files ) %}
23 <ul>
24 {% if album.directories is defined and album.directories %}
25 {% for name, link in album.directories %}
26 <li><a href="{{ link }}">{{ name }}</a></li>
27 {% endfor %}
28 {% endif %}
29 {% if album.files is defined and album.files %}
30 {% for name, infos in album.files %}
31 <li><a href="{{ infos.link }}">{{ name }}</a></li>
32 {% endfor %}
33 {% endif %}
34 </ul>
35 {% endif %}
36 {% if album.file is defined and album.file %}
37 <dl>
38 <dt>{% trans %}Size{% endtrans %}</dt>
39 <dd title="{{ album.file.size }}">{{ album.file.intlsize }} {{ album.file.intlunit }}</dd>
40 </dl>
41 <dl>
42 <dt>{% trans %}Mime type{% endtrans %}</dt>
43 <dd>{{ album.file.mimetype }}</dd>
44 </dl>
45 {% if album.file.thumb is defined and album.file.thumb %}
46 <dl>
47 <dt>{% trans %}Thumb{% endtrans %}</dt>
48 <dd>
49 <a href=""><img src="{{ album.file.thumb.src }}" alt="{{ album.file.name }}" width="{{ album.file.thumb.width }}" height="{{ album.file.thumb.height }}" /></a>
50 </dd>
51 </dl>
52 {% endif %}
53 {% endif %}
54 </section>
55 </article>
56 {# TODO: XXX: add next, prev and parent links ? #}
57 {% endif %}
58 {% endblock %}