12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <!--
- 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" %}
- {% block title %}Lodel 2 - Class {{ classname }} {% 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 class="active">{{ classname }}</li>
- </ol>
- <h1 class="h1_lodel">Type {{ classname }} </h1>
- {% set my_class = leapi.name2class(classname) %}
- {% if my_class.child_classes()|length >0 %}
- <h2> Childs types</h2>
- <ul>
- {% for child in my_class.child_classes() %}
- {% if child.is_abstract() %}
- {% set abst = ' - Abstract class ' %}
- {% else %}
- {% set abst = ' - ' ~ child.get(None)|length %}
- {% endif %}
- <li><a href="/{{ root_url }}/show_class?classname={{ child.__name__ }}" >{{ child.__name__ }}</a>{{ abst }}</li>
- {% endfor %}
- </ul>
- {% endif %}
- {% if not my_class.is_abstract() %}
- <h2>Instances</h2>
- {% set uid_f = my_class.uid_fieldname() %}
- {% set objects = my_class.get(None) %}
- <ul>
- {% for obj in objects %}
- <li><a href="/{{ root_url }}/show_object?classname={{ classname }}&lodel_id={{ obj.uid() }}" >{{ obj.uid() }} </a> | <a href="/{{ root_url }}/show_object_detailled?classname={{ classname }}&lodel_id={{ obj.uid() }}" >Detailed view </a></li>
- {% endfor %}
- </ul>
- {% endif %}
-
- {% endblock %}
|