mirror of
https://github.com/yweber/lodel2.git
synced 2026-01-13 02:02:15 +01:00
Allows a pretty display for em_simple
This commit is contained in:
parent
5964923d30
commit
548df7c36c
3 changed files with 7 additions and 5 deletions
|
|
@ -24,7 +24,7 @@ def list_classes(request):
|
|||
# @param request : the request (get or post)
|
||||
# @note the response is given in a html page called in get_response_function
|
||||
def collections(request):
|
||||
return get_response('listing/collections.html', my_classes=dyncode)
|
||||
return get_response('listing/collections.html', my_classes=dyncode, get_authors=get_authors)
|
||||
|
||||
##@brief Controller's function to list all types (classes) of the editorial model
|
||||
# @param request : the request (get or post)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ urls = (
|
|||
(r'^/list_classes?$', list_classes),
|
||||
(r'^/collections', collections),
|
||||
(r'^/collections?$', collections),
|
||||
(r'^/issue?$', issue),
|
||||
(r'^/show_object?$', show_object),
|
||||
(r'^/show_object_detailled?$', show_object_detailled),
|
||||
(r'^/show_class?$', show_class),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %}Lodel 2 - Collections {% endblock %}
|
||||
{% block content %}
|
||||
{% block content %}
|
||||
{% set collections = my_classes.Collection.get(None) %}
|
||||
{% set issues = my_classes.Issue.get(None) %}
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/{{ root_url }}/">Home</a></li>
|
||||
|
|
@ -11,11 +12,10 @@
|
|||
<ul>
|
||||
{% for collection in collections %}
|
||||
<h2>{{ collection.data('title') }}</h2>
|
||||
{% set filter = ("%s = %s") % ('collection', collection.uid()) %}
|
||||
{% set issues = my_classes.Issue.get((filter)) %}
|
||||
<ul>
|
||||
{% if issues is not none: %}
|
||||
{% for issue in issues %}
|
||||
{% if issue.data('collection') == collection.uid(): %}
|
||||
<li>
|
||||
<h3><a href="/{{ root_url }}/issue?lodel_id={{ issue.uid() }}"> {{ issue.data('title') }}</a></h3>
|
||||
<h3>{{ issue.data('subtitle') }}</h3>
|
||||
|
|
@ -23,9 +23,10 @@
|
|||
{% set authors = my_classes.Person.get(("%s in (%s)") % ("lodel_id", author_ids|join(','))) %}
|
||||
<p>Authors : {% for author in authors %} {{ author.data('firstname')}} {{ author.data('lastname')}} ; {% endfor %} </p>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
<ul>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue