diff options
Diffstat (limited to 'templates/module_show.html')
-rw-r--r-- | templates/module_show.html | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/templates/module_show.html b/templates/module_show.html index 8b2dda1..9e7e336 100644 --- a/templates/module_show.html +++ b/templates/module_show.html @@ -1,24 +1,32 @@ +{% macro render_module_list(module) %} +<ul id="module-list"> +{% for year,files in module %} + <li> + {{year}} + <ul> + {% for name,oid in files %} + <li> + <a href="{{url_for('study_show', study = study, oid=oid)}}">{{name}}</a> + </li> + {% endfor %} + </ul> + </li> +{% else %} + <li>Keine Einträge bisher</li> +{% endfor %} +</ul> +{% endmacro %} + {% extends "layout.html" %} {% block body %} - <h3>{{module}}</h3> + <p class="right"> + <a href="{{url_for('study_index', study=study)}}">zurück zur Übersicht</a> + </p> - <p> - <a href="{{url_for('study_index', study=study)}}">zurück zur Übersicht</a> - </p> + <div id="module-index"> + <h3>{{module}}</h3> - <ul> - {% for year,files in entries %} - <li> - {{year}} - <ul> - {% for name,oid in files %} - <li> - <a href="{{url_for('study_show', study = study, oid=oid)}}">{{name}}</a> - </li> - {% endfor %} - </ul> - </li> - {% endfor %} - </ul> + {{ render_module_list(entries)}} + </div> {% endblock %} |