1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <!--
- This file is part of Lodel 2 (https://github.com/OpenEdition)
-
- Copyright (C) 2015-2017 Cléo UMS-3287
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- -->
-
-
- {% extends "base.html" %}
- {% import 'macros/show_object.html' as show_object %}
- {% import 'components/components.html' as components %}
- {% import "listing/display_obj.html" as edit %}
- {% set my_class = leapi.name2class(classname) %}
- {% set obj = my_class.get_from_uid(lodel_id) %}
- {% if obj is none %}
- ERROR <!-- conception failure, the controller should test this before calling the template -->
- {% endif %}
- {% set uidfield = my_class.uid_fieldname()[0] %}
- {% set objects = my_class.get(('%s = %s') % (uidfield, lodel_id)) %}
- {% set obj = objects.pop() %}
- {% if my_class.is_abstract() %}
- {% set classname = obj.data('classname') %}
- {% set my_class = my_class.name2class(classname) %}
- {% endif %}
- {% block title %}Object {{ lodel_id }} {% endblock %}
- {% block content %}
- <ol class="breadcrumb">
- <li><a href="/{{ root_url }}/">Home</a></li>
- <li><a href="/{{ root_url }}/list_classes">Types</a></li>
- <li><a href="/{{ root_url }}/show_class?classname={{ classname }}">{{ classname }}</a></li>
- <li class="active">{{ lodel_id }}</li>
- </ol>
- <h1 class="h1_lodel">Lodel 2 - {{ classname }} with uid {{ lodel_id }}</h1>
- {{ show_object.object_ul(obj, 2) }}
- {% endblock %}
|