summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/static/chimere/css/styles.css14
-rw-r--r--chimere/templates/chimere/blocks/map_menu.html17
-rw-r--r--chimere/templates/chimere/blocks/routing.html21
-rw-r--r--chimere/templates/chimere/main_map.html1
-rw-r--r--chimere/templatetags/chimere_tags.py5
5 files changed, 30 insertions, 28 deletions
diff --git a/chimere/static/chimere/css/styles.css b/chimere/static/chimere/css/styles.css
index 9133001..dec91e6 100644
--- a/chimere/static/chimere/css/styles.css
+++ b/chimere/static/chimere/css/styles.css
@@ -594,26 +594,18 @@ p.warning{
}
-#welcome_button,
+a#welcome_button,
+a#routing_button,
#permalink{
display: block;
- text-align:center;
margin:0.3em;
padding:0.2em;
-}
-
-a#welcome_button,
-#permalink{
+ width:100%;
font-size:14px;
text-align:center;
text-decoration:none;
}
-#welcome_button,
-#permalink{
- width:100%;
-}
-
/* forms */
table.inline-table{
diff --git a/chimere/templates/chimere/blocks/map_menu.html b/chimere/templates/chimere/blocks/map_menu.html
index e541c1e..38fb4a8 100644
--- a/chimere/templates/chimere/blocks/map_menu.html
+++ b/chimere/templates/chimere/blocks/map_menu.html
@@ -12,20 +12,3 @@
<li id='map_menu_center'>{% trans "Center the map here" %}</li>
</ul>
</div>
-
-{% if routing %}
-<div id='chimere_itinerary_panel'>
- <div id='chimere_itinerary'>
- </div>
-</div>
-<script language='javascript' type='text/javascript'>
-$(document).ready(function() {
- $('#chimere_itinerary_panel').dialog({
- autoOpen: false,
- position: [50, 50],
- title: "{% trans "Itinerary" %}",
- height: 300
- });
-});
-</script>
-{% endif%}
diff --git a/chimere/templates/chimere/blocks/routing.html b/chimere/templates/chimere/blocks/routing.html
new file mode 100644
index 0000000..226480b
--- /dev/null
+++ b/chimere/templates/chimere/blocks/routing.html
@@ -0,0 +1,21 @@
+{% load i18n %}
+{% if routing %}
+<a href='#' id='routing_button' class='ui-widget ui-button ui-state-default ui-corner-all'>{% trans "Itinerary"%}</a>
+<div id='chimere_itinerary_panel'>
+ <div id='chimere_itinerary'>
+ </div>
+</div>
+<script language='javascript' type='text/javascript'>
+$(document).ready(function() {
+ $('#chimere_itinerary_panel').dialog({
+ autoOpen: false,
+ position: [50, 50],
+ title: "{% trans "Itinerary" %}",
+ height: 300
+ });
+ $('#routing_button').click(function(){
+ $('#chimere_itinerary_panel').dialog('open');
+ });
+});
+</script>
+{% endif%}
diff --git a/chimere/templates/chimere/main_map.html b/chimere/templates/chimere/main_map.html
index ae6578f..8cb7da3 100644
--- a/chimere/templates/chimere/main_map.html
+++ b/chimere/templates/chimere/main_map.html
@@ -22,6 +22,7 @@
{% if areas_visible %}
{% display_areas %}
{% endif %}
+ {% routing %}
{% display_news news_visible %}
<div id='permalink' class='ui-widget ui-button ui-state-default ui-corner-all'></div>
</div>
diff --git a/chimere/templatetags/chimere_tags.py b/chimere/templatetags/chimere_tags.py
index 5256518..51e64bf 100644
--- a/chimere/templatetags/chimere_tags.py
+++ b/chimere/templatetags/chimere_tags.py
@@ -116,6 +116,11 @@ def map_menu(context):
context_data = {'routing':settings.CHIMERE_ENABLE_ROUTING}
return context_data
+@register.inclusion_tag('chimere/blocks/routing.html', takes_context=True)
+def routing(context):
+ context_data = {'routing':settings.CHIMERE_ENABLE_ROUTING}
+ return context_data
+
@register.inclusion_tag('chimere/blocks/map_params.html', takes_context=True)
def map_params(context):
context_data = {}