summaryrefslogtreecommitdiff
path: root/chimere/templates
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/templates')
-rw-r--r--chimere/templates/base.html58
-rw-r--r--chimere/templates/categories.html22
-rw-r--r--chimere/templates/chimere/base.html20
-rw-r--r--chimere/templates/chimere/base_user.html (renamed from chimere/templates/base_user.html)2
-rw-r--r--chimere/templates/chimere/blocks/actions.html20
-rw-r--r--chimere/templates/chimere/blocks/areas.html11
-rw-r--r--chimere/templates/chimere/blocks/categories.html29
-rw-r--r--chimere/templates/chimere/blocks/footer.html3
-rw-r--r--chimere/templates/chimere/blocks/head.html44
-rw-r--r--chimere/templates/chimere/blocks/map_params.html17
-rw-r--r--chimere/templates/chimere/blocks/welcome.html31
-rw-r--r--chimere/templates/chimere/blocks/welcome_message.html1
-rw-r--r--chimere/templates/chimere/category_detail.html (renamed from chimere/templates/category_detail.html)0
-rw-r--r--chimere/templates/chimere/contactus.html19
-rw-r--r--chimere/templates/chimere/detail.html23
-rw-r--r--chimere/templates/chimere/edit.html72
-rw-r--r--chimere/templates/chimere/edit_route.html68
-rw-r--r--chimere/templates/chimere/main_map.html27
-rw-r--r--chimere/templates/chimere/main_map_simple.html22
-rw-r--r--chimere/templates/chimere/submited.html10
-rw-r--r--chimere/templates/chimere/upload_file.html (renamed from chimere/templates/upload_file.html)0
-rw-r--r--chimere/templates/chimere/welcome.html (renamed from chimere/templates/welcome.html)0
-rw-r--r--chimere/templates/contactus.html20
-rw-r--r--chimere/templates/detail.html22
-rw-r--r--chimere/templates/edit.html68
-rw-r--r--chimere/templates/edit_route.html68
-rw-r--r--chimere/templates/main_map.html44
-rw-r--r--chimere/templates/main_map_simple.html20
-rw-r--r--chimere/templates/submited.html11
29 files changed, 441 insertions, 311 deletions
diff --git a/chimere/templates/base.html b/chimere/templates/base.html
index 67322f6..f19601a 100644
--- a/chimere/templates/base.html
+++ b/chimere/templates/base.html
@@ -4,41 +4,29 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{% block title %}Chimère{% endblock %}</title>
- <script type="text/javascript"><!--
- var media_path = '{{STATIC_URL}}';
- var extra_url = "{{extra_url}}";
- // --></script>
- <script type="text/javascript" src="{{JQUERY_URL}}"></script>
- {% block extra_head %}{{extra_head|safe}}{% endblock %}
- <link rel="stylesheet" href="{{STATIC_URL}}styles.css" />
- {%if css_area%}<link rel="stylesheet" href="{{STATIC_URL}}{{css_area}}" />{%endif%}
- {% block head %}{% endblock %}
+ {% block extra_head %}
+ {% endblock %}
</head>
-
-{% block bodyhead %}<body>{% endblock %}
- {% block top %}{% endblock %}
- {% block actions %}<div id="topbar">
- <ul id='action'>
-{% for action, subactions in actions %}
- <li{% ifequal action.id action_selected.0 %} class='selected'{% endifequal %}>
- <a href='{{extra_url}}{{ action.path }}' onclick='saveExtent();'>{{ action.label }}</a>
- {% ifequal action.id action_selected.0 %}{% if subactions %}<ul>{% for subaction in subactions %}
- <li{% ifequal subaction.id action_selected.1 %} class='selected'{% endifequal %}>
- <a href='{{extra_url}}{{ subaction.path }}' onclick='saveExtent();'>{{ subaction.label }}</a>
- </li>
- {% endfor %}</ul>{% endif %}{% endifequal %}
- </li>
-{% endfor %}
- </ul>
- </div>{% endblock %}
- {% block sidebar %}{% endblock %}
- {% block message_map %}{% endblock %}
- {% block message_edit %}{% endblock %}
- {% block content %}{% endblock %}
- {% block bottom %}{% endblock %}
- <div id='footer'>{% block footer %}
-{% trans "This site uses Chimère"%} - © 2008-2011 <a href='http://blog.peacefrogs.net/nim/chimere/'>Chimère project</a>
- {% endblock %}</div>
+<body {% block body_id %}{% endblock %} {% block body_class %}{% endblock %}>
+ {% block extrabody %}
+ {% endblock %}
+ {% block body %}
+ <div id="header">
+ {% block header %}
+ {% endblock %}
+ </div>
+ <div id="sidebar">
+ {% block sidebar %}
+ {% endblock %}
+ </div>
+ <div id="content">
+ {% block content %}
+ {% endblock %}
+ </div>
+ <div id="footer">
+ {% block footer %}
+ {% endblock %}
+ </div>
+ {% endblock %}
</body>
</html>
-
diff --git a/chimere/templates/categories.html b/chimere/templates/categories.html
deleted file mode 100644
index db3d827..0000000
--- a/chimere/templates/categories.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{% load i18n %}
-<ul id='ul_categories'>
-{% for category, lst_sub_categories in sub_categories %}
- <li>
- <img class='control_image' id='maincategory_img_{{category.id}}' alt='control' src='{{STATIC_URL}}icons/{% if category.selected %}minus.png{%else%}plus.png{%endif%}' onclick='toggleCategory(this);'/>
-<input type="checkbox" id='checkall_{{category.id}}' onclick="checkAll(this);loadGeoObjects();">
-{% trans category.name %}
-<img class='zoom_image' alt='{% trans "Zoom to" %} {{category.name}}' src='{{STATIC_URL}}icons/zoom.png' onclick='zoomToCategory({{category.id}})'/>
- <ul class='subcategories' id='maincategory_{{category.id}}'{% if not category.selected %} style='display:None'{% endif %}>
- {% for sub_category in lst_sub_categories %}
- <li id='li_sub_{{sub_category.id}}'>
- <input type='checkbox' onclick='loadGeoObjects()' name='category_{{sub_category.id}}' id='category_{{sub_category.id}}'{% if sub_category.selected %} checked='checked'{% endif %}/>
- <label for='category_{{sub_category.id}}'>
- <img alt='{{sub_category.name}}' src='{{STATIC_URL}}{{sub_category.icon.image}}'/>
- {% trans sub_category.name %}</label>
- <img class='zoom_image' alt='{% trans "Zoom to" %} {{sub_category.name}}' src='{{STATIC_URL}}icons/zoom.png' onclick='zoomToSubCategory({{sub_category.id}})'/>
- </li>{% endfor %}
- {%if category.description%}<li><a href='#' onclick='displayCategoryDetail({{category.id}});'>{%trans "Tell me more..."%}</a></li>{%endif%}
- </ul>
- </li>{% endfor %}
- <li id='display_submited'><input type='checkbox' onclick='loadGeoObjects()' name='display_submited' id='display_submited_check'/> {% trans "Display markers and routes waiting for validation"%}</li>
-</ul>
diff --git a/chimere/templates/chimere/base.html b/chimere/templates/chimere/base.html
new file mode 100644
index 0000000..cc1c767
--- /dev/null
+++ b/chimere/templates/chimere/base.html
@@ -0,0 +1,20 @@
+{% extends "base.html" %}
+{% load chimere_tags %}
+{% block extra_head %}
+ {% head %}
+{% endblock %}
+{% block header %}
+ {% block actions %}
+ {% include "chimere/blocks/actions.html" %}
+ {% endblock %}
+{% endblock %}
+{% block content %}
+ {% block top %}{% endblock %}
+ {% block message_map %}{% endblock %}
+ {% block message_edit %}{% endblock %}
+ {% block bottom %}{% endblock %}
+{% endblock %}
+{% block footer %}
+ {% include "chimere/blocks/footer.html" %}
+{% endblock %}
+
diff --git a/chimere/templates/base_user.html b/chimere/templates/chimere/base_user.html
index da0ecf3..d60cc15 100644
--- a/chimere/templates/base_user.html
+++ b/chimere/templates/chimere/base_user.html
@@ -1,4 +1,4 @@
-{% extends "base.html" %}
+{% extends "chimere/base.html" %}
{% load i18n %}
{# to customize your base Chimère template add codes between the following blocks #}
{# title of the map #}{% block title %}{% endblock %}
diff --git a/chimere/templates/chimere/blocks/actions.html b/chimere/templates/chimere/blocks/actions.html
new file mode 100644
index 0000000..a98b2d4
--- /dev/null
+++ b/chimere/templates/chimere/blocks/actions.html
@@ -0,0 +1,20 @@
+<div id="topbar">
+ <ul id='action'>
+ {% for action, subactions in actions %}
+ <li{% ifequal action.id action_selected.0 %} class='selected'{% endifequal %}>
+ <a href='{{extra_url}}{{ action.path }}' onclick='saveExtent();'>{{ action.label }}</a>
+ {% ifequal action.id action_selected.0 %}
+ {% if subactions %}
+ <ul>
+ {% for subaction in subactions %}
+ <li{% ifequal subaction.id action_selected.1 %} class='selected'{% endifequal %}>
+ <a href='{{extra_url}}{{ subaction.path }}' onclick='saveExtent();'>{{ subaction.label }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% endifequal %}
+ </li>
+ {% endfor %}
+ </ul>
+</div>
diff --git a/chimere/templates/chimere/blocks/areas.html b/chimere/templates/chimere/blocks/areas.html
new file mode 100644
index 0000000..837bf45
--- /dev/null
+++ b/chimere/templates/chimere/blocks/areas.html
@@ -0,0 +1,11 @@
+{% load i18n unlocalize_point %}
+{% if areas %}
+ <div id='areas'>
+ <h2>{% trans "Shortcuts"%}</h2>
+ <ul>
+ {% for area in areas %}
+ <li><img class="zoom_image" alt="{% trans 'Zoom to' %} {{area.name}}" src="{{ STATIC_URL }}chimere/img/zoom.png" onclick="$('#maps').chimere('zoom', {'area': [{{area.upper_left_corner.x|unlocalize_point}}, {{area.upper_left_corner.y|unlocalize_point}}, {{area.lower_right_corner.x|unlocalize_point }}, {{area.lower_right_corner.y|unlocalize_point}}]});" /> {{area.name}}</li>
+ {% endfor %}
+ </ul>
+ </div>
+{% endif %}
diff --git a/chimere/templates/chimere/blocks/categories.html b/chimere/templates/chimere/blocks/categories.html
new file mode 100644
index 0000000..5ff8f36
--- /dev/null
+++ b/chimere/templates/chimere/blocks/categories.html
@@ -0,0 +1,29 @@
+{% load i18n %}
+<ul id='ul_categories'>
+ {% for category, lst_sub_categories in sub_categories %}
+ <li>
+ <img class="control_image toggle_category" id="maincategory_img_{{category.id}}" alt="control" src="{{ STATIC_URL }}chimere/img/{% if category.selected %}minus.png{% else %}plus.png{% endif %}" />
+ <input type="checkbox" id='checkall_{{category.id}}'>
+ {% trans category.name %}
+ <img id="zoom_to_category_{{category.id}}" class="zoom_image zoom_to_category" alt='{% trans "Zoom to" %} {{category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' />
+ <ul class='subcategories' id='maincategory_{{category.id}}'{% if not category.selected %} style='display:None'{% endif %}>
+ {% for sub_category in lst_sub_categories %}
+ <li id='li_sub_{{sub_category.id}}'>
+ <input type='checkbox' name='category_{{sub_category.id}}' id='category_{{sub_category.id}}'{% if sub_category.selected %} checked='checked'{% endif %}/>
+ <label for='category_{{sub_category.id}}'>
+ <img alt='{{ sub_category.name }}' src='{{ MEDIA_URL }}{{sub_category.icon.image}}'/>
+ {% trans sub_category.name %}
+ </label>
+ <img id="zoom_to_subcategory_{{sub_category.id}}" class="zoom_image zoom_to_subcategory" alt='{% trans "Zoom to" %} {{sub_category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' />
+ </li>
+ {% endfor %}
+ {% if category.description %}
+ <li><a href="#" onclick="$('#map').chimere('category_detail', {{category.id}});">{% trans "Tell me more..." %}</a></li>
+ {% endif %}
+ </ul>
+ </li>
+ {% endfor %}
+ <li id='display_submited'>
+ <input type='checkbox' onclick='loadGeoObjects()' name='display_submited' id='display_submited_check'/> {% trans "Display markers and routes waiting for validation"%}
+ </li>
+</ul>
diff --git a/chimere/templates/chimere/blocks/footer.html b/chimere/templates/chimere/blocks/footer.html
new file mode 100644
index 0000000..1665640
--- /dev/null
+++ b/chimere/templates/chimere/blocks/footer.html
@@ -0,0 +1,3 @@
+{% load i18n %}
+{% trans "This site uses Chimère"%} - © 2008-2010 <a href='http://blog.peacefrogs.net/nim/chimere/'>Chimère project</a> - {% trans "Map"%} © <a href='http://openstreetmap.org/'>OpenStreetMap</a>
+
diff --git a/chimere/templates/chimere/blocks/head.html b/chimere/templates/chimere/blocks/head.html
new file mode 100644
index 0000000..c982717
--- /dev/null
+++ b/chimere/templates/chimere/blocks/head.html
@@ -0,0 +1,44 @@
+<script type="text/javascript" src="{{ STATIC_URL }}chimere/js/jquery/jquery-1.6.1.min.js"></script>
+<script type="text/javascript">
+ /* Global variables */
+ /* lower cases are for retrocompatibility */
+ var DYNAMIC_CATEGORIES = {{ DYNAMIC_CATEGORIES|lower }};
+ var STATIC_URL = static_url = "{{ STATIC_URL }}";
+ var MEDIA_URL = media_path = "{{ MEDIA_URL }}";
+ var extra_url = "{{ EXTRA_URL }}";
+ var ICON_WIDTH = {{ ICON_WIDTH }};
+ var ICON_HEIGHT = {{ ICON_HEIGHT }};
+ var ICON_OFFSET_X = {{ ICON_OFFSET_X }};
+ var ICON_OFFSET_Y = {{ ICON_OFFSET_Y }};
+</script>
+{% if css_area %}
+ <link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/{{ css_area }}.css" />
+{% endif %}
+{% for css_url in URL_OSM_CSS %}
+ <link rel="stylesheet" href="{{ css_url }}" />
+{% endfor %}
+<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/styles.css" />
+{% for js_url in URL_OSM_JS %}
+ <script src="{{ js_url }}"></script>
+{% endfor %}
+<script src="{{ STATIC_URL }}chimere/js/utils.js"></script>
+<script src="{{ STATIC_URL }}chimere/js/base.js"></script>
+<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js"></script>
+<script type="text/javascript">
+ var DEFAULT_ZOOM = {{ DEFAULT_ZOOM }};
+ var EPSG_DISPLAY_PROJECTION = epsg_display_projection = new OpenLayers.Projection('EPSG:{{ EPSG_DISPLAY_PROJECTION }}');
+ OpenLayers.ImgPath = '{{ STATIC_URL }}chimere/img/';
+ var EPSG_PROJECTION = epsg_projection = new OpenLayers.Projection('EPSG:{{ EPSG_PROJECTION }}');
+ var CENTER_LONLAT = centerLonLat = new OpenLayers.LonLat{{ DEFAULT_CENTER }}.transform(epsg_display_projection, epsg_projection);
+ var map_layer = {{ MAP_LAYER|safe }};
+ var restricted_extent;
+ {% if area_name %}
+ var area_name = '{{ area_name }}';
+ {% endif %}
+ {% if RESTRICTED_EXTENT %}
+ restricted_extent = new OpenLayers.Bounds({{ RESTRICTED_EXTENT|join:"," }});
+ {% endif %}
+</script>
+
+
+
diff --git a/chimere/templates/chimere/blocks/map_params.html b/chimere/templates/chimere/blocks/map_params.html
new file mode 100644
index 0000000..81f0f0b
--- /dev/null
+++ b/chimere/templates/chimere/blocks/map_params.html
@@ -0,0 +1,17 @@
+{% load i18n %}
+<script type="text/javascript">
+ var chimere_init_options = {};
+ chimere_init_options["map_layers"] = [new OpenLayers.Layer.OSM.Mapnik('Mapnik')];
+ chimere_init_options['permalink_label'] = '{%trans "Permalink"%}';
+ {% if dynamic_categories %}chimere_init_options['dynamic_categories'] = 1;{% endif %}
+ {% if default_area %}
+ chimere_init_options["default_area"] = new Array({{default_area.upper_left_corner.x}}, {{default_area.upper_left_corner.y}}, {{default_area.lower_right_corner.x}}, {{default_area.lower_right_corner.y}});
+ {% endif %}
+ {% if p_zoom %}chimere_init_options["zoom"] = {{ p_zoom }};{% endif %}
+ {% if p_lat %}chimere_init_options["lat"] = {{ p_lat }};{% endif %}
+ {% if p_lon %}chimere_init_options["lon"] = {{ p_lon }};{% endif %}
+ {% if p_display_submited %}chimere_init_options["display_submited"] = {{ p_display_submited }};{% endif %}
+ chimere_init_options["checked_categories"] = {% if p_checked_categories %}[{{p_checked_categories}}]{% else %} {{ CHIMERE_DEFAULT_CATEGORIES }}{% endif %};
+ var p_current_feature{% if p_current_feature %} = {{ p_current_feature }}{% endif %};
+</script>
+
diff --git a/chimere/templates/chimere/blocks/welcome.html b/chimere/templates/chimere/blocks/welcome.html
new file mode 100644
index 0000000..f8547f1
--- /dev/null
+++ b/chimere/templates/chimere/blocks/welcome.html
@@ -0,0 +1,31 @@
+{% load i18n %}
+{% load sanitize %}
+<div id='welcome_button'><a href='javascript:show("welcome");'>
+ {% trans "Welcome message"%}</a></div>
+<div id='welcome' {% if not display %}style='display:none'{%endif%}>
+ <h2>{% trans "News"%}</h2>
+ <div id='detail_content'>
+ {% include "chimere/blocks/welcome_message.html" %}
+ <div class='news'>
+ {% if news_lst %}
+ {% for news in news_lst %}
+ <div class='info'>
+ {% if news.title %}
+ <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>
+ {% for property in news.getProperties %}
+ <p id='{{news.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4"|safe }}</p>
+ {% endfor %}
+ <p class='marker_link'><a href='{{ news.get_absolute_url }}'>{% trans "See it on the map"%}</a></p>
+ {% endif %}
+ </div>
+ {%endfor%}
+ {% endif %}
+ <div class='info'>
+ </div>
+ </div>
+ </div>
+ <div class='detail_footer'><a href='javascript:hide("welcome");'>{% trans "Close" %}</a></div>
+</div>
diff --git a/chimere/templates/chimere/blocks/welcome_message.html b/chimere/templates/chimere/blocks/welcome_message.html
new file mode 100644
index 0000000..e4fd734
--- /dev/null
+++ b/chimere/templates/chimere/blocks/welcome_message.html
@@ -0,0 +1 @@
+{# We leave it blank, if you wanna a message, override this template in you project #}
diff --git a/chimere/templates/category_detail.html b/chimere/templates/chimere/category_detail.html
index 0211989..0211989 100644
--- a/chimere/templates/category_detail.html
+++ b/chimere/templates/chimere/category_detail.html
diff --git a/chimere/templates/chimere/contactus.html b/chimere/templates/chimere/contactus.html
new file mode 100644
index 0000000..8cebe8f
--- /dev/null
+++ b/chimere/templates/chimere/contactus.html
@@ -0,0 +1,19 @@
+{% extends "chimere/base.html" %}
+{% load i18n %}
+{% block message_map %}{% endblock %}
+{% block message_edit%}{% endblock %}
+{% block content %}
+ {{ block.super }}
+ {% if message %}
+ <div class='warning'><p>{{message}}</p></div>
+ {% else %}
+ <fieldset class='edit'>
+ <p>{% trans "If you have some requests or remarks about this site you can leave them here." %}</p>
+ <form action="." method="post">
+ {{contact_form.as_p}}
+ <input type="submit" value="{% trans "Submit" %}" />
+ </form>
+ </fieldset>
+ {% endif %}
+{% endblock %}
+
diff --git a/chimere/templates/chimere/detail.html b/chimere/templates/chimere/detail.html
new file mode 100644
index 0000000..d4c9927
--- /dev/null
+++ b/chimere/templates/chimere/detail.html
@@ -0,0 +1,23 @@
+{% load i18n %}
+{% load sanitize %}
+<h2>{{ marker.name }}</h2>
+<div id='detail_content'>
+ {% if marker.picture %}<img src='{{STATIC_URL}}{{marker.picture}}' alt='{{marker.name}}'/>{%endif%}
+<div>
+ {% if dated %}
+ <p id='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 %}
+ {% for property in marker.getProperties %}
+ <p id='{{property.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4"|safe}}</p>
+ {% endfor %}
+ </div>{% if share_networks %}
+ {% if simple %}{% trans "Share on"%}{% for share_network in share_networks %}
+ <a href='{{share_network.1}}'>{{share_network.0}}</a>
+ {% endfor %}{%else%}
+ <ul id='share'>
+ <li>{% trans "Share"%}</li>{% for share_network in share_networks %}
+ <li><a href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li>
+ {% endfor %}</ul>{% endif %}
+{% endif %}
+</div>
diff --git a/chimere/templates/chimere/edit.html b/chimere/templates/chimere/edit.html
new file mode 100644
index 0000000..aa2ca08
--- /dev/null
+++ b/chimere/templates/chimere/edit.html
@@ -0,0 +1,72 @@
+{% extends "chimere/base.html" %}
+{% load i18n %}
+{% load adminmedia %}
+{% block extra_head %}
+ {% if dated %}
+ <!--script type="text/javascript" src="{{extra_url}}media/js/core.js"></script-->
+ <script type="text/javascript" src="{{ STATIC_URL }}chimere/js/utils.js"></script>
+ <script type="text/javascript">
+ window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
+ </script>
+ {% endif %}
+ {{ form.media }}
+ {{ block.super }}
+{% endblock %}
+
+{% block content %}
+ {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
+ <fieldset class='edit'>
+ <legend>{% trans "Add a new site" %}</legend>
+ <p>* {% trans "indicates a mandatory field" %}</p>
+ <form enctype="multipart/form-data" method='post' action='{{extra_url}}edit/'>
+ {% csrf_token %}
+ <div class="fieldWrapper">
+ <label for="id_name">{% trans "Site name"%} *</label>
+ {{ form.name.errors }}
+ {{ form.name }}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_subcategory">{% trans "Categories" %} *</label>
+ {{ form.categories.errors }}
+ {{ form.categories }}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_point">{% trans "Point"%} *</label>
+ {%if form.point.errors %}<ul class="errorlist"><li>{% trans "Select a location for this new site" %}</li></ul>{%endif%}
+ {{point_widget}}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_picture">{% trans "Image" %}</label>
+ {{ form.picture.errors }}
+ {{ form.picture }}
+ </div>
+ {% if dated %}
+ <div class="fieldWrapper">
+ <label for="id_start_date">{% trans "Start date" %}</label>
+ {{ form.start_date.errors }}
+ {{ form.start_date }}
+ <p class="help">{{ form.start_date.help_text }}</p>
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_end_date">{% trans "End date" %}</label>
+ {{ form.end_date.errors }}
+ {{ form.end_date }}
+ <p class="help">{{ form.end_date.help_text }}</p>
+ </div>
+ {% endif %}
+ {% for field in form %}
+ {% for property in properties %}
+ {% ifequal field.name property %}
+ <div class="fieldWrapper">
+ <label for="id_{{field.name}}">{% trans field.label %}</label>
+ {{ field.errors }}
+ {{ field }}
+ </div>
+ {%endifequal%}
+ {%endfor%}
+ {%endfor%}
+ <p><input type='submit' onclick='saveExtent();' value="{% trans 'Propose'%}"/></p>
+ </form>
+ </fieldset>
+ </div>
+{% endblock %}
diff --git a/chimere/templates/chimere/edit_route.html b/chimere/templates/chimere/edit_route.html
new file mode 100644
index 0000000..1fd7813
--- /dev/null
+++ b/chimere/templates/chimere/edit_route.html
@@ -0,0 +1,68 @@
+{% extends "chimere/base.html" %}
+{% load i18n %}
+{% load adminmedia %}
+{% block extra_head %}
+ {% if dated %}
+ <!-- script type="text/javascript" src="{{extra_url}}media/js/core.js"></script-->
+ <script type="text/javascript">
+ window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
+ </script>
+ {% endif %}
+ {{ block.super }}
+ {{ form.media }}
+{% endblock %}
+
+{% block content %}
+ {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
+ <fieldset class='edit'>
+ <legend>{% trans "Add a new route" %}</legend>
+ <p>* {% trans "indicates a mandatory field" %}</p>
+ <form enctype="multipart/form-data" method='post' action='{{extra_url}}edit_route/'>
+ {% csrf_token %}
+ <div class="fieldWrapper">
+ <label for="id_name">{% trans "Site name"%} *</label>
+ {{ form.name.errors }}
+ {{ form.name }}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_subcategory">{% trans "Categories" %} *</label>
+ {{ form.categories.errors }}
+ {{ form.categories }}
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_route">{% trans "Route"%} *</label>
+ {%if form.point.errors %}<ul class="errorlist"><li>{% trans "Select a location for this new site" %}</li></ul>{%endif%}
+ {{route_widget}}
+ </div>
+ <!--
+ <div class="fieldWrapper">
+ <label for="id_picture">{% trans "Image" %}</label>
+ {{ form.picture.errors }}
+ {{ form.picture }}
+ </div>-->
+ {% if dated %}
+ <div class="fieldWrapper">
+ <label for="id_start_date">{% trans "Start date" %}</label>
+ {{ form.start_date.errors }}
+ {{ form.start_date }}
+ <p class="help">{{ form.start_date.help_text }}</p>
+ </div>
+ <div class="fieldWrapper">
+ <label for="id_end_date">{% trans "End date" %}</label>
+ {{ form.end_date.errors }}
+ {{ form.end_date }}
+ <p class="help">{{ form.end_date.help_text }}</p>
+ </div>
+ {% endif %}
+ {%for field in form%}{%for property in properties%}{%ifequal field.name property%}
+ <div class="fieldWrapper">
+ <label for="id_{{field.name}}">{% trans field.label %}</label>
+ {{ field.errors }}
+ {{ field }}
+ </div>
+ {%endifequal%}{%endfor%}{%endfor%}
+ <p><input type='submit' onclick='saveExtent();' value="{% trans 'Propose'%}"/></p>
+ </form>
+ </fieldset>
+ </div>
+{% endblock %}
diff --git a/chimere/templates/chimere/main_map.html b/chimere/templates/chimere/main_map.html
new file mode 100644
index 0000000..ad612a4
--- /dev/null
+++ b/chimere/templates/chimere/main_map.html
@@ -0,0 +1,27 @@
+{% extends "chimere/base.html" %}
+{% load i18n unlocalize_point chimere_tags %}
+{% block message_edit %}{% endblock %}
+{% block sidebar %}
+ <div id='panel'>
+ <h2>{% trans "Topics"%}</h2>
+ <form method='post' name='frm_categories' id='frm_categories'>
+ <div id='categories'>
+ <!-- Categories are displayed in JS -->
+ </div>
+ </form>
+ </div>
+
+ {% if areas_visible %}
+ {% display_areas %}
+ {% endif %}
+ <div id='detail'></div>
+ <div id='category_detail'></div>
+ {% display_news news_visible %}
+{% endblock %}
+{% block content %}
+ <div id='map'></div>
+ {% map_params %}
+ <script type='text/javascript'><!--
+ $("#map").chimere(chimere_init_options);
+ // --></script>
+{% endblock %}
diff --git a/chimere/templates/chimere/main_map_simple.html b/chimere/templates/chimere/main_map_simple.html
new file mode 100644
index 0000000..621992f
--- /dev/null
+++ b/chimere/templates/chimere/main_map_simple.html
@@ -0,0 +1,22 @@
+{% extends "chimere/main_map.html" %}
+{% load i18n %}
+{% block body_class %}class='simple'{% endblock %}
+{% block body_id %}id='simple'{% endblock %}
+{% block menu %}{# no menu in simple mode #}{% endblock %}
+{% block message_edit %}{% endblock %}
+{% block sidebar %}
+ <div id='panel'>
+ <a href='#' onclick='showHide("categories")'>
+ <h2>{% trans "Topics"%}</h2>
+ </a>
+ <form method='post' name='frm_categories' id='frm_categories'>
+ <div id='categories' name='categories'></div>
+ </form>
+ </div>
+{% endblock %}
+{% block content %}
+ <script type='text/javascript'><!--
+ var simple = true;
+ // --></script>
+ {{ block.super }}
+{% endblock %}
diff --git a/chimere/templates/chimere/submited.html b/chimere/templates/chimere/submited.html
new file mode 100644
index 0000000..8d9179b
--- /dev/null
+++ b/chimere/templates/chimere/submited.html
@@ -0,0 +1,10 @@
+{% extends "chimere/base.html" %}
+{% load i18n %}
+{% block message_map %}{% endblock %}
+{% block content %}
+ {{ block.super }}
+ <fieldset class='edit'>
+ <p>{% trans "Your proposition has been submited. A moderator will treat your submission shortly. Thanks!" %}</p>
+ </fieldset>
+{% endblock %}
+
diff --git a/chimere/templates/upload_file.html b/chimere/templates/chimere/upload_file.html
index d08f723..d08f723 100644
--- a/chimere/templates/upload_file.html
+++ b/chimere/templates/chimere/upload_file.html
diff --git a/chimere/templates/welcome.html b/chimere/templates/chimere/welcome.html
index a3cd86e..a3cd86e 100644
--- a/chimere/templates/welcome.html
+++ b/chimere/templates/chimere/welcome.html
diff --git a/chimere/templates/contactus.html b/chimere/templates/contactus.html
deleted file mode 100644
index 7464c72..0000000
--- a/chimere/templates/contactus.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends "base_user.html" %}
-{% load i18n %}
-{% block message_map %}{% endblock %}
-{% block message_edit%}{% endblock %}
-{% block content %}{{ block.super }}
-<div id='content'>
-{% if message %}
-<div class='warning'><p>{{message}}</p></div>
-{% else %}
-<fieldset class='edit'>
-<p>{% trans "If you have some requests or remarks about this site you can leave them here." %}</p>
-<form action="" method="post">
-{{contact_form.as_p}}
-<input type="submit" value="{% trans "Submit" %}" />
-</form>
-</fieldset>
-{% endif %}
-</div>
-{% endblock %}
-
diff --git a/chimere/templates/detail.html b/chimere/templates/detail.html
deleted file mode 100644
index c35f664..0000000
--- a/chimere/templates/detail.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{% load i18n %}
-{% load sanitize %}
-<h2>{{ marker.name }}</h2>
-<div id='detail_content'>
-{% if marker.picture %}<img src='{{STATIC_URL}}{{marker.picture}}' alt='{{marker.name}}'/>{%endif%}
-<div>
-{% if dated %}
-<p id='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 %}
-{% for property in marker.getProperties %}
-<p id='{{property.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4"|safe}}</p>
-{% endfor %}
-</div>{% if share_networks %}
-{% if simple %}{% trans "Share on"%}{% for share_network in share_networks %}
-<a href='{{share_network.1}}'>{{share_network.0}}</a>
-{% endfor %}{%else%}
-<ul id='share'><li>{% trans "Share"%}</li>{% for share_network in share_networks %}
-<li><a href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li>
-{% endfor %}</ul>{% endif %}
-{% endif %}
-</div>
diff --git a/chimere/templates/edit.html b/chimere/templates/edit.html
deleted file mode 100644
index d37efa7..0000000
--- a/chimere/templates/edit.html
+++ /dev/null
@@ -1,68 +0,0 @@
-{% extends "base_user.html" %}
-{% load i18n %}
-{% load adminmedia %}
-{% block extra_head %}
-{% if dated %}<script type="text/javascript" src="{{extra_url}}admin/jsi18n"></script>
-<script type="text/javascript" src="{{extra_url}}media/js/core.js"></script>
-<script type="text/javascript">
-window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
-</script>
-<link rel="stylesheet" type="text/css" href="{{extra_url}}media/css/base.css"/>
-<link rel="stylesheet" type="text/css" href="{{extra_url}}media/css/widgets.css"/>
-{% endif %}{{ block.super }}
-{% endblock %}
-{% block message_map %}{% endblock %}
-{% block message_edit%}<div id='content'>{{block.super}}{% endblock %}
-
-{% block content %}{{ block.super }}
-{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
-<fieldset class='edit'>
-<legend>{% trans "Add a new site" %}</legend>
-<p>* {% trans "indicates a mandatory field" %}</p>
-<form enctype="multipart/form-data" method='post' action='{{extra_url}}edit/'>
-<div class="fieldWrapper">
- <label for="id_name">{% trans "Site name"%} *</label>
- {{ form.name.errors }}
- {{ form.name }}
-</div>
-<div class="fieldWrapper">
- <label for="id_subcategory">{% trans "Categories" %} *</label>
- {{ form.categories.errors }}
- {{ form.categories }}
-</div>
-<div class="fieldWrapper">
- <label for="id_point">{% trans "Point"%} *</label>
- {%if form.point.errors %}<ul class="errorlist"><li>{% trans "Select a location for this new site" %}</li></ul>{%endif%}
- {{point_widget}}
-</div>
-<div class="fieldWrapper">
- <label for="id_picture">{% trans "Image" %}</label>
- {{ form.picture.errors }}
- {{ form.picture }}
-</div>
-{% if dated %}
-<div class="fieldWrapper">
- <label for="id_start_date">{% trans "Start date" %}</label>
- {{ form.start_date.errors }}
- {{ form.start_date }}
- <p class="help">{{ form.start_date.help_text }}</p>
-</div>
-<div class="fieldWrapper">
- <label for="id_end_date">{% trans "End date" %}</label>
- {{ form.end_date.errors }}
- {{ form.end_date }}
- <p class="help">{{ form.end_date.help_text }}</p>
-</div>
-{% endif %}
-{%for field in form%}{%for property in properties%}{%ifequal field.name property%}
-<div class="fieldWrapper">
- <label for="id_{{field.name}}">{% trans field.label %}</label>
- {{ field.errors }}
- {{ field }}
-</div>
-{%endifequal%}{%endfor%}{%endfor%}
-<p><input type='submit' onclick='saveExtent();' value="{% trans 'Propose'%}"/></p>
-</form>
-</fieldset>
-</div>
-{% endblock %}
diff --git a/chimere/templates/edit_route.html b/chimere/templates/edit_route.html
deleted file mode 100644
index f7aa7e8..0000000
--- a/chimere/templates/edit_route.html
+++ /dev/null
@@ -1,68 +0,0 @@
-{% extends "base_user.html" %}
-{% load i18n %}
-{% load adminmedia %}
-{% block extra_head %}
-{% if dated %}<script type="text/javascript" src="{{extra_url}}admin/jsi18n"></script>
-<script type="text/javascript" src="{{extra_url}}media/js/core.js"></script>
-<script type="text/javascript">
-window.__admin_media_prefix__ = "{% filter escapejs %}{% admin_media_prefix %}{% endfilter %}";
-</script>
-<link rel="stylesheet" type="text/css" href="{{extra_url}}media/css/base.css"/>
-<link rel="stylesheet" type="text/css" href="{{extra_url}}media/css/widgets.css"/>
-{% endif %}{{ block.super }}
-{% endblock %}
-{% block message_map %}{% endblock %}
-{% block message_edit%}<div id='content'>{{block.super}}{% endblock %}
-{% block content %}{{ block.super }}
-{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
-<fieldset class='edit'>
-<legend>{% trans "Add a new route" %}</legend>
-<p>* {% trans "indicates a mandatory field" %}</p>
-<form enctype="multipart/form-data" method='post' action='{{extra_url}}edit_route/'>
-<div class="fieldWrapper">
- <label for="id_name">{% trans "Site name"%} *</label>
- {{ form.name.errors }}
- {{ form.name }}
-</div>
-<div class="fieldWrapper">
- <label for="id_subcategory">{% trans "Categories" %} *</label>
- {{ form.categories.errors }}
- {{ form.categories }}
-</div>
-<div class="fieldWrapper">
- <label for="id_route">{% trans "Route"%} *</label>
- {%if form.point.errors %}<ul class="errorlist"><li>{% trans "Select a location for this new site" %}</li></ul>{%endif%}
- {{route_widget}}
-</div>
-<!--
-<div class="fieldWrapper">
- <label for="id_picture">{% trans "Image" %}</label>
- {{ form.picture.errors }}
- {{ form.picture }}
-</div>-->
-{% if dated %}
-<div class="fieldWrapper">
- <label for="id_start_date">{% trans "Start date" %}</label>
- {{ form.start_date.errors }}
- {{ form.start_date }}
- <p class="help">{{ form.start_date.help_text }}</p>
-</div>
-<div class="fieldWrapper">
- <label for="id_end_date">{% trans "End date" %}</label>
- {{ form.end_date.errors }}
- {{ form.end_date }}
- <p class="help">{{ form.end_date.help_text }}</p>
-</div>
-{% endif %}
-{%for field in form%}{%for property in properties%}{%ifequal field.name property%}
-<div class="fieldWrapper">
- <label for="id_{{field.name}}">{% trans field.label %}</label>
- {{ field.errors }}
- {{ field }}
-</div>
-{%endifequal%}{%endfor%}{%endfor%}
-<p><input type='submit' onclick='saveExtent();' value="{% trans 'Propose'%}"/></p>
-</form>
-</fieldset>
-</div>
-{% endblock %}
diff --git a/chimere/templates/main_map.html b/chimere/templates/main_map.html
deleted file mode 100644
index b426c25..0000000
--- a/chimere/templates/main_map.html
+++ /dev/null
@@ -1,44 +0,0 @@
-{% extends "base_user.html" %}
-{% load i18n %}
-{% load unlocalize_point %}
-{% block message_edit %}{% endblock %}
-{% block sidebar %}{{ block.super }}
-<div id='panel'>
-<h2>{% trans "Topics"%}</h2>
-<form method='post' name='frm_categories' id='frm_categories'>
-<div id='categories'>
-{{categories|safe}}
-</div>
-
-</form>
-</div>
-{%if areas%}<div id='areas'>
-<h2>{% trans "Shortcuts"%}</h2>
-<ul>{% for area in areas%}
-<li><img class='zoom_image' alt='{% trans "Zoom to" %} {{area.name}}' src='{{STATIC_URL}}icons/zoom.png' onclick='zoomToArea({{area.upper_left_corner.x|unlocalize_point}}, {{area.upper_left_corner.y|unlocalize_point}}, {{area.lower_right_corner.x|unlocalize_point}}, {{area.lower_right_corner.y|unlocalize_point}}); loadGeoObjects();'/> {{area.name}}</li>{%endfor%}
-</ul>
-</div>{%endif%}
-
-<div id='detail'>
-</div>
-<div id='category_detail'>
-</div>
-
-<div id='welcome_button'><a href='javascript:show("welcome");'>{% trans "Welcome message"%}</a></div>
-{{welcome}}{% endblock %}
-{% block content %}{{ block.super }}<div id='map'></div>
-<script type='text/javascript'><!--
-var map_layer = {{map_layer|safe}};
-var permalink_label = '{%trans "Permalink"%}';
-var dynamic_categories{%if dynamic_categories %} = 1{%endif%};
-var default_area{%if default_area %} = new Array({{default_area.upper_left_corner.x}}, {{default_area.upper_left_corner.y}}, {{default_area.lower_right_corner.x}}, {{default_area.lower_right_corner.y}}){%endif%};
-var p_zoom{%if p_zoom %} = {{p_zoom}}{%endif%};
-var p_lat{%if p_lat %} = {{p_lat}}{%endif%};
-var p_lon{%if p_lon %} = {{p_lon}}{%endif%};
-var p_display_submited{%if p_display_submited %} = {{p_display_submited}}{%endif%};
-var p_checked_categories{%if p_checked_categories %} = [{{p_checked_categories}}];{%endif%}
-var p_current_feature{% if p_current_feature %} = {{p_current_feature}}{%endif%};
-init();
-// --> </script>{% endblock %}
-{% block footer %}<div id='map-footer'>{{ block.super }} - {% trans "Map"%} © <a href='http://openstreetmap.org/'>OpenStreetMap</a></div>
-{% endblock %}
diff --git a/chimere/templates/main_map_simple.html b/chimere/templates/main_map_simple.html
deleted file mode 100644
index d43436e..0000000
--- a/chimere/templates/main_map_simple.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends "main_map.html" %}
-{% load i18n %}
-{% block bodyhead %}<body class='simple'>{% endblock %}
-{% block actions %}{% endblock %}
-{% block message_edit %}{% endblock %}
-{% block sidebar %}
-<div id='panel'><a href='#' onclick='showHide("categories")'>
-<h2>{% trans "Topics"%}</h2></a>
-<form method='post' name='frm_categories' id='frm_categories'>
-<div id='categories' name='categories'>
-{{categories|safe}}
-</div>
-</form>
-</div>
-{% endblock %}
-{% block content %}<script type='text/javascript'><!--
-var simple = true;
-// --> </script>
-{{ block.super }}
-{% endblock %}
diff --git a/chimere/templates/submited.html b/chimere/templates/submited.html
deleted file mode 100644
index 200717e..0000000
--- a/chimere/templates/submited.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{% extends "base_user.html" %}
-{% load i18n %}
-{% block message_map %}{% endblock %}
-{% block message_edit%}<div id='content'>{{block.super}}{% endblock %}
-{% block content %}{{ block.super }}
-<fieldset class='edit'>
-<p>{% trans "Your proposition has been submited. A moderator will treat your submission shortly. Thanks!" %}</p>
-</fieldset>
-</div>
-{% endblock %}
-