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.

issue.html 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 - Issue {{ lodel_id }} {% endblock %}
  17. {% set uidfield = my_classes.Issue.uid_fieldname()[0] %}
  18. {% set objects = my_classes.Issue.get(('%s = %s') % (uidfield, lodel_id)) %}
  19. {% set person_class = leapi.name2class('Person') %}
  20. {% set obj = objects.pop() %}
  21. {% block content %}
  22. <ol class="breadcrumb">
  23. <li><a href="/{{ root_url }}/">Home</a></li>
  24. <li><a href="/{{ root_url }}/collection">Collections</a></li>
  25. <li class="active"><a href="/{{ root_url }}/issue?lodel_id={{ lodel_id}}">Collection {{ obj.data('collection') }} - Issue {{lodel_id}}</a></li>
  26. </ol>
  27. <h1 class="h1_lodel">Issue {{ obj.data('title') }} </h1>
  28. <h2>{{ obj.data('subtitle') }}</h2>
  29. {% set directors=person_class.get(("%s in (%s)") % (person_class.uid_fieldname()[0], obj.data('linked_directors')|join(','))) %}
  30. <p><strong>Directors : </strong>{% for director in directors %} <a href="/{{ root_url }}/show_object?classname=Person&lodel_id={{ director.uid() }} " >{{ director.data('firstname')}} {{ director.data('lastname')}}</a> ; {% endfor %}</p>
  31. {% set texts=my_classes.Text.get(("%s in (%s)") % (my_classes.Text.uid_fieldname()[0], obj.data('linked_texts')|join(','))) %}
  32. {% set parts=my_classes.Part.get(("%s in (%s)") % (my_classes.Part.uid_fieldname()[0], obj.data('linked_parts')|join(','))) %}
  33. {% if texts is not none: %}
  34. <ul>
  35. {% for text in texts %}
  36. <li>
  37. <h3><a href="/{{ root_url }}/show_object?classname={{ text.data('classname') }}&lodel_id={{ text.uid() }}" > {{ text.data('title') }}</a></h3>
  38. <h4>{{ text.data('subtitle') }}</h4>
  39. {% set authors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], text.data('linked_persons')|join(','))) %}
  40. <p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
  41. </li>
  42. {% endfor %}
  43. </ul>
  44. {% endif %}
  45. <h2>Parties</h2>
  46. <div style="margin-left:20px;">
  47. {% if parts is not none: %}
  48. <ul>
  49. {% for part in parts %}
  50. <li>
  51. <h3><a href="/{{ root_url }}/show_object?classname={{ part.data('classname') }}&lodel_id={{ part.uid() }}"> {{ part.data('title') }}</a></h3>
  52. <h4>{{ part.data('subtitle') }}</h4>
  53. {% set directors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], part.data('linked_directors')|join(','))) %}
  54. <p>Directors : {% for director in directors %} {{ director.data('firstname')}} {{ director.data('lastname')}} ; {% endfor %} </p>
  55. {% set p_texts=my_classes.Text.get(("%s in (%s)") % (my_classes.Text.uid_fieldname()[0], part.data('linked_texts')|join(','))) %}
  56. {% if texts is not none: %}
  57. <ul style="margin-left:20px">
  58. {% for text in p_texts %}
  59. <li>
  60. <h3><a href="/{{ root_url }}/show_object?classname={{ text.data('classname') }}&lodel_id={{ text.uid() }}" > {{ text.data('title') }}</a></h3>
  61. <h4>{{ text.data('subtitle') }}</h4>
  62. {% set authors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], text.data('linked_persons')|join(','))) %}
  63. <p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
  64. </li>
  65. {% endfor %}
  66. </ul>
  67. {% endif %}
  68. <h4>Sous-parties</h4>
  69. {% set ss_parts=my_classes.Part.get(("%s in (%s)") % (my_classes.Part.uid_fieldname()[0], part.data('linked_parts')|join(','))) %}
  70. {% if parts is not none: %}
  71. <ul>
  72. {% for part in ss_parts %}
  73. <li>
  74. <h3><a href="/{{ root_url }}/show_object?classname={{ part.data('classname') }}&lodel_id={{ part.uid() }}" > {{ part.data('title') }}</a></h3>
  75. <h4>{{ part.data('subtitle') }}</h4>
  76. {% set directors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], part.data('linked_directors')|join(','))) %}
  77. <p>Directors : {% for director in directors %} {{ director.data('firstname')}} {{ director.data('lastname')}} ; {% endfor %} </p>
  78. {% set sp_texts=my_classes.Text.get(("%s in (%s)") % (my_classes.Text.uid_fieldname()[0], part.data('linked_texts')|join(','))) %}
  79. {% if texts is not none: %}
  80. <ul style="margin-left:20px">
  81. {% for text in sp_texts %}
  82. <li>
  83. <h3><a href="/{{ root_url }}/show_object?classname={{ text.data('classname') }}&lodel_id={{ text.uid() }}" > {{ text.data('title') }}</a></h3>
  84. <h4>{{ text.data('subtitle') }}</h4>
  85. {% set authors = my_classes.Person.get(("%s in (%s)") % (person_class.uid_fieldname()[0], text.data('linked_persons')|join(','))) %}
  86. <p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
  87. </li>
  88. {% endfor %}
  89. </ul>
  90. {% endif %}
  91. </li>
  92. {% endfor %}
  93. </ul>
  94. {% endif %}
  95. </li>
  96. {% endfor %}
  97. </ul>
  98. {% endif %}
  99. </div>
  100. {% endblock %}