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.

show_object_detailled.html 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. {% import 'macros/show_object.html' as show_object %}
  17. {% import 'components/components.html' as components %}
  18. {% import "listing/display_obj.html" as edit %}
  19. {% set my_class = leapi.name2class(classname) %}
  20. {% set obj = my_class.get_from_uid(lodel_id) %}
  21. {% if obj is none %}
  22. ERROR <!-- conception failure, the controller should test this before calling the template -->
  23. {% endif %}
  24. {% set uidfield = my_class.uid_fieldname()[0] %}
  25. {% set objects = my_class.get(('%s = %s') % (uidfield, lodel_id)) %}
  26. {% set obj = objects.pop() %}
  27. {% if my_class.is_abstract() %}
  28. {% set classname = obj.data('classname') %}
  29. {% set my_class = my_class.name2class(classname) %}
  30. {% endif %}
  31. {% block title %}Object {{ lodel_id }} {% endblock %}
  32. {% block content %}
  33. <ol class="breadcrumb">
  34. <li><a href="/{{ root_url }}/">Home</a></li>
  35. <li><a href="/{{ root_url }}/list_classes">Types</a></li>
  36. <li><a href="/{{ root_url }}/show_class?classname={{ classname }}">{{ classname }}</a></li>
  37. <li class="active">{{ lodel_id }}</li>
  38. </ol>
  39. <h1 class="h1_lodel">Lodel 2 - {{ classname }} with uid {{ lodel_id }}</h1>
  40. {{ show_object.object_ul(obj, 2) }}
  41. {% endblock %}