]> Raphaƫl G. Git Repositories - treebundle/blobdiff - templates/index.html.twig
Version 0.0.8
[treebundle] / templates / index.html.twig
index b7fd158fe94421b4e78341f0d0b618980d7dfd77..75da781419d21f8a8386f4f7f9f418c0eeeaff0d 100644 (file)
@@ -1,19 +1,25 @@
 {% extends '@RapsysTree/_base.html.twig' %}
 {% block content %}
 {% extends '@RapsysTree/_base.html.twig' %}
 {% block content %}
-       <article>
-               <header>
-                       <h2><a href="{{ path('rapsystree') }}">{{ title.section }}</a></h2>
-                       <p>{{ description }}</p>
-               </header>
-               <div>
-                       {% for id, path in roots %}
-                               <section>
-                                       <header>
-                                               <h3><a href="{{ path('rapsystree_directory', {path: id}) }}">{{ id }}</a></h3>
-                                       </header>
-                                       TODO: list of images ?
-                               </section>
-                       {% endfor %}
-               </div>
-       </article>
+       {% if albums is defined and albums %}
+               {% for id, album in albums %}
+                       <article>
+                               <header>
+                                       <h2><a href="{{ album.link }}">{{ album.slug|capitalize }}</a></h2>
+                               </header>
+                               {% if album.elements is defined and album.elements %}
+                                       {% for id, element in album.elements %}
+                                               <section>
+                                                       <header>
+                                                               <h3><a href="{{ element.link }}">{{ element.name }}</a></h3>
+                                                       </header>
+                                                       <p>
+                                                               TODO: miniature if target is a file or image list when directory ?
+                                                       </p>
+                                               </section>
+                                       {% endfor %}
+                               {% endif %}
+                       </article>
+               {% endfor %}
+               {# TODO: XXX: add next and prev links ? #}
+       {% endif %}
 {% endblock %}
 {% endblock %}