summaryrefslogtreecommitdiff
path: root/chimere/templates
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/templates')
-rw-r--r--chimere/templates/chimere/blocks/map_menu.html2
-rw-r--r--chimere/templates/chimere/blocks/news.html2
-rw-r--r--chimere/templates/chimere/category_directory.html35
-rw-r--r--chimere/templates/chimere/category_directory_detail.html25
-rw-r--r--chimere/templates/chimere/category_item_detail.html38
-rw-r--r--chimere/templates/search/indexes/chimere/marker_text.txt2
-rw-r--r--chimere/templates/search/indexes/chimere/route_text.txt2
-rw-r--r--chimere/templates/search/search.html5
8 files changed, 107 insertions, 4 deletions
diff --git a/chimere/templates/chimere/blocks/map_menu.html b/chimere/templates/chimere/blocks/map_menu.html
index 38fb4a8..02f415a 100644
--- a/chimere/templates/chimere/blocks/map_menu.html
+++ b/chimere/templates/chimere/blocks/map_menu.html
@@ -1,7 +1,7 @@
{% load i18n %}
<div id='chimere_map_menu'>
<ul>
- {% if routing %}
+ {% if routing and not simple %}
<li id='map_menu_from' class='routing_item'>{% trans "From" context "routing" %}</li>
<li id='map_menu_step' class='routing_item'>{% trans "Add a step" context "routing" %}</li>
<li id='map_menu_to' class='routing_item'>{% trans "To" context "routing" %}</li>
diff --git a/chimere/templates/chimere/blocks/news.html b/chimere/templates/chimere/blocks/news.html
index 07c2bbb..0514081 100644
--- a/chimere/templates/chimere/blocks/news.html
+++ b/chimere/templates/chimere/blocks/news.html
@@ -22,7 +22,7 @@ $(function(){
<h3>{{news.title}} &ndash; {{ news.date }}</h3>
<p>{{news.content|safe}}</p>
{% else %}
- <h3>{{news.name}} &ndash; {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h3>
+ <h3>{{news.name}} &ndash; {{ news.start_date }}{% if news.end_date and news.end_date != news.start_date %} &ndash; {{ news.end_date }}{% endif %}</h3>
{% if news.default_pictures or news.default_pictures or news.default_multimedia_items%}
<div class='small-gallery'>
{% for picture in news.default_pictures %}
diff --git a/chimere/templates/chimere/category_directory.html b/chimere/templates/chimere/category_directory.html
new file mode 100644
index 0000000..7031c83
--- /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}}</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>
diff --git a/chimere/templates/search/indexes/chimere/marker_text.txt b/chimere/templates/search/indexes/chimere/marker_text.txt
index 7c7929d..d089654 100644
--- a/chimere/templates/search/indexes/chimere/marker_text.txt
+++ b/chimere/templates/search/indexes/chimere/marker_text.txt
@@ -2,3 +2,5 @@
{{object.name}}
{{object.description|safe|striptags|unescape}}
{{object.keywords}}
+{% for category in object.categories.all %}{{category.keywords}}
+{% endfor %}
diff --git a/chimere/templates/search/indexes/chimere/route_text.txt b/chimere/templates/search/indexes/chimere/route_text.txt
index 5e612cd..d67c88b 100644
--- a/chimere/templates/search/indexes/chimere/route_text.txt
+++ b/chimere/templates/search/indexes/chimere/route_text.txt
@@ -1,2 +1,4 @@
{{object.name}}
{{object.keywords}}
+{% for category in object.categories.all %}{{category.keywords}}
+{% endfor %}
diff --git a/chimere/templates/search/search.html b/chimere/templates/search/search.html
index 95d3937..ab3e61e 100644
--- a/chimere/templates/search/search.html
+++ b/chimere/templates/search/search.html
@@ -30,7 +30,7 @@ var end_do_you_mean = "{% trans '?' %}";
{% else %}
<form id='search-form' class='autocomplete-me'>
<input type="text" id="id_q" name="q" autocomplete="off"/>
- <button name='haystack-search' id='haystack-search' type='button' disabled='disabled' class="btn btn-default"><span class='action-label'>{% trans "Search" %} </span><span class="glyphicon glyphicon-search"></span></button>
+ <button name='haystack-search' id='haystack-search' type='button' class="btn btn-default"><span class='action-label'>{% trans "Search" %} </span><span class="glyphicon glyphicon-search"></span></button>
</form>
<div id='spelling'></div>
<div id='search-result'></div>
@@ -42,10 +42,11 @@ $(function(){
$("#main-map").chimere("razMap");
haystack_search(evt);
});
+ {% if autocomplete %}
window.autocomplete = new Autocomplete({
form_selector: '.autocomplete-me'
});
- window.autocomplete.setup();
+ window.autocomplete.setup();{% endif %}
});
</script>
{% endif %}