diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2015-04-19 22:52:43 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2015-04-19 22:52:43 +0200 |
| commit | 5953bfdb54bd36f716d7b36681aae2648e3c1028 (patch) | |
| tree | ae14b6fc6184b32030e1ab5ede8eceae0e00317f /chimere/templates | |
| parent | 908744a6f3d5ac40a48f0a52c5167e131785b2cc (diff) | |
| download | Chimère-5953bfdb54bd36f716d7b36681aae2648e3c1028.tar.bz2 Chimère-5953bfdb54bd36f716d7b36681aae2648e3c1028.zip | |
Add a directory with all available markers
Diffstat (limited to 'chimere/templates')
| -rw-r--r-- | chimere/templates/chimere/category_directory.html | 35 | ||||
| -rw-r--r-- | chimere/templates/chimere/category_directory_detail.html | 25 | ||||
| -rw-r--r-- | chimere/templates/chimere/category_item_detail.html | 38 |
3 files changed, 98 insertions, 0 deletions
diff --git a/chimere/templates/chimere/category_directory.html b/chimere/templates/chimere/category_directory.html new file mode 100644 index 0000000..916bd38 --- /dev/null +++ b/chimere/templates/chimere/category_directory.html @@ -0,0 +1,35 @@ +{% extends "chimere/base.html" %} +{% load i18n chimere_tags %} +{% load url from future %} +{% block extra_head %} + {{ block.super }} + {{ form.media }} + {% head_jquery %} +{% endblock %} +{% block message_map %}{% endblock %} +{% block message_edit%}{% endblock %} +{% block content %} + {{ block.super }} + <div id="category-directory-content"> + {% if not object_list.count %} + <p>{% trans "No category defined!" %}</p> + {% else %} + <ul id="category-directory" class="list-group">{% for object in object_list %} + {% ifchanged object.category %} + {% if forloop.counter0 %} + </ul> + </li> + {% endif %} + <li class='list-group-item' id='{{object.category|slugify}}'><p class='category-directory-category'>{{object.category}}</p> + <ul> + {% endifchanged %} + <li class='list-group-item'><span class='icon'><img src='{{MEDIA_URL}}{{object.icon.image}}'/></span><a href="{% url 'chimere:category-directory-detail' area_name object.slug %}">{{object.name}} ({{object.item_nb}})</a></li> + {% endfor %} + </ul> + </li> + </ul> + {% endif %} + </div> +{% endblock %} + + diff --git a/chimere/templates/chimere/category_directory_detail.html b/chimere/templates/chimere/category_directory_detail.html new file mode 100644 index 0000000..1b23b7e --- /dev/null +++ b/chimere/templates/chimere/category_directory_detail.html @@ -0,0 +1,25 @@ +{% extends "chimere/base.html" %} +{% load i18n chimere_tags %} +{% load url from future %} +{% block extra_head %} + {{ block.super }} + {{ form.media }} + {% head_jquery %} +{% endblock %} +{% block message_map %}{% endblock %} +{% block message_edit%}{% endblock %} +{% block content %} + {{ block.super }} + <ol class="breadcrumb"> + <li><a href="{% url 'chimere:category-directory' area_name %}#{{category.category.name|slugify}}">{{category.category.name}}</a></li> + <li class="active">{{category.name}}</li> + </ol> + <ul id="category-directory" class="list-group">{% for marker in items %} + <li class='list-group-item' id='{{item.name|slugify}}'> + {% include "chimere/category_item_detail.html" %} + </li> + {% endfor %} + </ul> +{% endblock %} + + diff --git a/chimere/templates/chimere/category_item_detail.html b/chimere/templates/chimere/category_item_detail.html new file mode 100644 index 0000000..3f90c6c --- /dev/null +++ b/chimere/templates/chimere/category_item_detail.html @@ -0,0 +1,38 @@ +{% load i18n sanitize chimere_tags %} + +<h2>{{ marker.name }}</h2> +<div class='detail_content'> + {% if marker.default_pictures or marker.default_pictures or marker.default_multimedia_items%} + <div class='small-gallery'> + {% for picture in marker.default_pictures %} + {% multimedia_render picture %} + {%endfor%} + {% for multimedia_item in marker.default_multimedia_items %} + {% multimedia_render multimedia_item %} + {%endfor%} + </div> + {%endif%} + <div> + {% if dated %} + <p class='detail_start_date'><label>{% trans "Date:" %}</label> <span>{{marker.start_date|date:"D d M Y"}} + {% if marker.end_date %} - {{marker.end_date|date:"D d M Y"}}</p>{% endif %}</span> + {% endif %} + {% if marker.description %} + <p class='description'>{{ marker.description|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}</p> + {% endif %} + {% for property in marker.getProperties %} + <p class='{{property.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}</p> + {% endfor %} + {% if marker.origin %}<p class='detail_source'><strong>{% trans "Source:" %}</strong> <span>{{marker.origin}}</span></p>{% endif %} + {% if marker.license %}<p class='detail_license'><strong>{% trans "License:" %}</strong> <span>{{marker.license}}</span></p>{% endif %} + {% share_bar marker.name %} + <a href="{% get_tinyfied_url marker area_name %}">{% trans "See on the map" %}</a> + <p class='detail_amendment'><a href='{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.route.pk "" %}{%else%}{% url chimere:edit-item area_name_slash|default_if_none:"" marker.pk "" %}{%endif%}'> + {% trans "Submit an amendment" %} + </a> + {% if moderator_emails %} + <a href="mailto:?from={{moderator_emails}}&subject={% trans "Propose amendment" %}&body={% trans "I would like to propose an amendment for this item:"%} {{share_url}}"> + {% trans "Propose amendment" %} + </a>{%endif%} + </div> +</div> |
