No Description
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 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!--
  2. This file is part of Lodel 2 (https://github.com/OpenEdition)
  3. Copyright (C) 2015-2017 Cléo UMS-3287
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as published
  6. by the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. -->
  15. {% extends "base.html" %}
  16. {% block title %}Lodel 2 - Collections {% endblock %}
  17. {% block content %}
  18. {% set collections = my_classes.Collection.get(None) %}
  19. {% set issues = my_classes.Issue.get(None) %}
  20. <ol class="breadcrumb">
  21. <li><a href="/{{ root_url }}/">Home</a></li>
  22. <li class="active">Collections</li>
  23. </ol>
  24. <h1 class="h1_lodel">Collections </h1>
  25. <ul>
  26. {% for collection in collections %}
  27. <h2>{{ collection.data('title') }}</h2>
  28. <ul>
  29. {% if issues is not none: %}
  30. {% for issue in issues %}
  31. {% if issue.data('collection') == collection.uid(): %}
  32. <li>
  33. <h3><a href="/{{ root_url }}/issue?lodel_id={{ issue.uid() }}"> {{ issue.data('title') }}</a></h3>
  34. <h3>{{ issue.data('subtitle') }}</h3>
  35. {% set author_ids = my_classes.get_authors(issue) %}
  36. {% set authors = my_classes.Person.get(("%s in (%s)") % ("lodel_id", author_ids|join(','))) %}
  37. <p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
  38. </li>
  39. {% endif %}
  40. {% endfor %}
  41. {% endif %}
  42. </ul>
  43. {% endfor %}
  44. <ul>
  45. {% endblock %}