Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

collections.html 1.3KB

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