|
@@ -1,7 +1,8 @@
|
1
|
1
|
{% extends "base.html" %}
|
2
|
2
|
{% block title %}Lodel 2 - Collections {% endblock %}
|
3
|
|
-{% block content %}
|
|
3
|
+{% block content %}
|
4
|
4
|
{% set collections = my_classes.Collection.get(None) %}
|
|
5
|
+{% set issues = my_classes.Issue.get(None) %}
|
5
|
6
|
|
6
|
7
|
<ol class="breadcrumb">
|
7
|
8
|
<li><a href="/{{ root_url }}/">Home</a></li>
|
|
@@ -11,11 +12,10 @@
|
11
|
12
|
<ul>
|
12
|
13
|
{% for collection in collections %}
|
13
|
14
|
<h2>{{ collection.data('title') }}</h2>
|
14
|
|
- {% set filter = ("%s = %s") % ('collection', collection.uid()) %}
|
15
|
|
- {% set issues = my_classes.Issue.get((filter)) %}
|
16
|
15
|
<ul>
|
17
|
16
|
{% if issues is not none: %}
|
18
|
17
|
{% for issue in issues %}
|
|
18
|
+ {% if issue.data('collection') == collection.uid(): %}
|
19
|
19
|
<li>
|
20
|
20
|
<h3><a href="/{{ root_url }}/issue?lodel_id={{ issue.uid() }}"> {{ issue.data('title') }}</a></h3>
|
21
|
21
|
<h3>{{ issue.data('subtitle') }}</h3>
|
|
@@ -23,9 +23,10 @@
|
23
|
23
|
{% set authors = my_classes.Person.get(("%s in (%s)") % ("lodel_id", author_ids|join(','))) %}
|
24
|
24
|
<p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
|
25
|
25
|
</li>
|
|
26
|
+ {% endif %}
|
26
|
27
|
{% endfor %}
|
27
|
28
|
{% endif %}
|
28
|
29
|
</ul>
|
29
|
30
|
{% endfor %}
|
30
|
31
|
<ul>
|
31
|
|
-{% endblock %}
|
|
32
|
+{% endblock %}
|