summaryrefslogtreecommitdiff
path: root/templates/chimere
diff options
context:
space:
mode:
Diffstat (limited to 'templates/chimere')
-rw-r--r--templates/chimere/base.html16
-rw-r--r--templates/chimere/blocks/map.html48
-rw-r--r--templates/chimere/blocks/map_menu.html14
-rw-r--r--templates/chimere/blocks/submited.html2
-rw-r--r--templates/chimere/blocks/welcome.html37
-rw-r--r--templates/chimere/detail.html7
-rw-r--r--templates/chimere/main_map_simple.html120
7 files changed, 224 insertions, 20 deletions
diff --git a/templates/chimere/base.html b/templates/chimere/base.html
index bab159f..b24f070 100644
--- a/templates/chimere/base.html
+++ b/templates/chimere/base.html
@@ -14,6 +14,22 @@
<script src="{{ STATIC_URL }}saclay/js/mobile.chimere.js" type="text/javascript"></script>{%endif%}
{% if css_area %}
<link rel="stylesheet" href="{{ css_area }}" />{% endif %}
+
+<!-- Piwik -->
+<script type="text/javascript">
+ var _paq = _paq || [];
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://piwik.proxience.net/";
+ _paq.push(['setTrackerUrl', u+'piwik.php']);
+ _paq.push(['setSiteId', 3]);
+ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript';
+ g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<noscript><p><img src="https://piwik.proxience.net/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript>
+<!-- End Piwik Code -->
{% endblock %}
{% block header %}
<noscript>
diff --git a/templates/chimere/blocks/map.html b/templates/chimere/blocks/map.html
index fe5ea06..6273576 100644
--- a/templates/chimere/blocks/map.html
+++ b/templates/chimere/blocks/map.html
@@ -25,6 +25,17 @@ $(function(){
</div>
<script type="text/javascript">
<!--
+ //LIB iOS
+ var connectWebViewJavascriptBridge = function(callback) {
+ if (window.WebViewJavascriptBridge) {
+ callback(WebViewJavascriptBridge);
+ } else {
+ document.addEventListener('WebViewJavascriptBridgeReady', function() {
+ callback(WebViewJavascriptBridge);
+ }, false);
+ }
+ };
+ //fin lib ios
var routing_panel_open = function(){
$('#frm_categories').hide();
$('#chimere_itinerary_panel').show();
@@ -43,8 +54,39 @@ $(function(){
$('#action-categories').click(category_panel_open);
- $('#sidebar-handler-hide').click(function(){$('#sidebar').hide();});
- $('#sidebar-handler-show').click(function(){$('#sidebar').show();});
+ $('#sidebar-handler-hide').click(function(){
+ $('#sidebar').hide();
+ // Added for mobile - START //
+ //iOS
+ connectWebViewJavascriptBridge(
+ function(bridge) {
+ if(!bridge){
+ bridge.init(function(message, responseCallback) {
+ if (responseCallback) {
+ responseCallback("Right back atcha");
+ }
+ });
+ }
+ bridge.send('sidebarHide');
+ });
+ });
+ $('#sidebar-handler-show').click(function(){
+ $('#sidebar').show();
+ // Added for mobile - START //
+ //iOS
+ connectWebViewJavascriptBridge(
+ function(bridge) {
+ if(!bridge){
+ bridge.init(function(message, responseCallback) {
+ if (responseCallback) {
+ responseCallback("Right back atcha");
+ }
+ });
+ }
+ bridge.send('sidebarShow');
+ });
+
+ });
{% if single_category %}
$(function() {$('#panel').hide()});{% endif %}
@@ -135,6 +177,8 @@ $(function(){
$('#maps').chimere('zoom', {'area':{{zoom}} });
{% endif %}
+ $('#{{map_id}}').chimere('addJSON', "{{STATIC_URL}}saclay/json/limites.json");
+
// init layer selection
$(function() {
{% for layer_name, js, def in map_layers %}
diff --git a/templates/chimere/blocks/map_menu.html b/templates/chimere/blocks/map_menu.html
new file mode 100644
index 0000000..38fb4a8
--- /dev/null
+++ b/templates/chimere/blocks/map_menu.html
@@ -0,0 +1,14 @@
+{% load i18n %}
+<div id='chimere_map_menu'>
+ <ul>
+ {% if routing %}
+ <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>
+ <li id='map_menu_clear' class='routing_item'>{% trans "Clear the itinerary" context "routing" %}</li>
+ {% endif%}
+ <li id='map_menu_zoomin'>{% trans "Zoom in" %}</li>
+ <li id='map_menu_zoomout'>{% trans "Zoom out" %}</li>
+ <li id='map_menu_center'>{% trans "Center the map here" %}</li>
+ </ul>
+</div>
diff --git a/templates/chimere/blocks/submited.html b/templates/chimere/blocks/submited.html
index d571f75..5e72617 100644
--- a/templates/chimere/blocks/submited.html
+++ b/templates/chimere/blocks/submited.html
@@ -2,7 +2,7 @@
<div class='edit' id='submited-window'>
<p><strong>Merci pour votre contribution au projet !</strong></p>
-<p>En proposant un nouvel élément, vous contribuez à enrichir la carte avec des données libres. Une fois validée, votre contribution sera disponible selon les termes de la licence <a href='https://creativecommons.org/licenses/by-sa/3.0/fr/'>Creative Commons Paternité - Pas d’Utilisation Commerciale 2.0 France</a>. Vous devez être l’auteur des éléments que vous nous faites partager ou bien vous être assuré de l’accord de leur auteur pour cette mise à disposition. Ceci concerne les textes, photos et tout contenu multimedia.</p>
+<p>En proposant un nouvel élément, vous contribuez à enrichir la carte avec des données libres. Une fois validée, votre contribution sera disponible selon les termes de la licence <a href='https://creativecommons.org/licenses/by-nc/2.0/fr/'>Creative Commons Paternité - Pas d’Utilisation Commerciale 2.0 France</a>. Vous devez être l’auteur des éléments que vous nous faites partager ou bien vous être assuré de l’accord de leur auteur pour cette mise à disposition. Ceci concerne les textes, photos et tout contenu multimedia.</p>
{% if contact_email %}<p>N’hésitez pas à nous contacter pour toute question : <a href='mailto:{{contact_email}}'>{{contact_email}}</a>.</p>{% endif%}
</div>
<script type='text/javascript'>
diff --git a/templates/chimere/blocks/welcome.html b/templates/chimere/blocks/welcome.html
index ae83180..8d7add2 100644
--- a/templates/chimere/blocks/welcome.html
+++ b/templates/chimere/blocks/welcome.html
@@ -7,7 +7,9 @@ $(function(){
$('#welcome video').each(function(index){$(this).pause()});
$('#welcome audio').each(function(index){$(this).pause()});
$("#welcome").dialog({width:826, height:410, dialogClass:'welcome-dialog'
- {% if not display %}, autoOpen:false{% endif %}});
+ {% if not display %}, autoOpen:false{% endif %},
+ open: function () { $("#welcome_content").scrollTop(0); }
+ });
});
// -->
</script>
@@ -15,11 +17,44 @@ $(function(){
<div class='title'>
<h2>{{title}}</h2>
</div>
+ {% comment %} <img src='{{STATIC_URL}}saclay/images/popup/welcome_header.png' alt='Welcome header'/> {% endcomment %}
<div id='welcome_message'>
<div id='welcome_content'>
{{welcome_message|safe}}
</div>
+ <div id='logos'>
+ <a href='http://www.paris-malaquais.archi.fr/'><img alt='Paris Malaquais link' src='{{STATIC_URL}}saclay/images/popup/welcome_logo-paris-malaquais.png'/></a><a href='http://www.terreetcite.org/'><img alt='Terre et cité link' src='{{STATIC_URL}}saclay/images/popup/welcome_logo-terre-et-cite.png'/></a><a href='http://www.groupechronos.org/'><img alt='Chronos link' src='{{STATIC_URL}}saclay/images/popup/welcome_logo-chronos.png'/></a>
+ </div>
</div>
+ {% comment %} <div class='welcome-col'>
+ <div class='news'>
+ {% if news_lst %}
+ {% for news in news_lst %}
+ <div class='info'>
+ {% if news.title %}
+ <h4>{{news.title}} &ndash; {{ news.date }}</h4>
+ {{news.short_desc|safe}}
+ {% else %}
+ <h4>{{news.name}} &ndash; {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h4>
+ {% if news.description %}
+ {{news.short_desc|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}...
+ {% endif %}
+ {% endif %}
+ <p class='marker_link'>
+ {% if news.point %}
+ <a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a> -
+ {% endif %}
+ <a href='#' class='get_more_information'>{% trans "More informations"%}</a>
+ {% if news.url %}
+ - <a href='{{news.url}}'>{% trans "Go to the event website"%}</a>
+ {% endif %}
+ </p>
+ </div>
+ {%endfor%}
+ {% endif %}
+ </div>
+ <div class='footer'><a href='#' class='get_more_information'>{% trans "See all news" %}</a></div>
+ </div>{% endcomment %}
</div>
<script type='text/javascript'>
<!--
diff --git a/templates/chimere/detail.html b/templates/chimere/detail.html
index 4d9348b..c0f9d64 100644
--- a/templates/chimere/detail.html
+++ b/templates/chimere/detail.html
@@ -17,8 +17,8 @@
{%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>
+ <p id='detail_start_date'><label>{% trans "Date:" %}</label> <span>{{marker.start_date|date:"l d F Y"}}
+ {% if marker.end_date %} - {{marker.end_date|date:"l d F Y"}}</p>{% endif %}</span>
{% endif %}
{% if marker.description %}
<div id='description_long_{{marker.pk}}' class='description'>{{ marker.description|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}</div>
@@ -26,6 +26,9 @@
{% for property in marker.getProperties %}{% if property.value %}
<div class='properties' id='{{property.propertymodel.getAttrName}}'><strong>{{property.propertymodel.name}}</strong> : {% if 'http://' in property.value or 'https://' in property.value %}<a href='{{ property.value|sanitize:""}}'>{%endif%}{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}{% if 'http://' in property.value or 'https://' in property.value %}</a>{%endif%}</div>
{%endif%}{% endfor %}
+ {% if marker.origin %}
+ <div class='origin'><label>Source :</label> {{marker.origin|safe}}</div>
+ {% endif %}
</div>
</div>
<div id='detail_footer'>
diff --git a/templates/chimere/main_map_simple.html b/templates/chimere/main_map_simple.html
index 552d309..a14ea3f 100644
--- a/templates/chimere/main_map_simple.html
+++ b/templates/chimere/main_map_simple.html
@@ -1,24 +1,116 @@
-{% 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 %}
+{% extends "chimere/base.html" %}
+{% load i18n unlocalize_point chimere_tags %}
+{% block extra_head %}
+{% head_jquery %}
+{% head_chimere %}
+{% head_jme %}
+{% head_form %}
+<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}saclay/js/SaclayCloud.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}saclay/js/jquery.form.js" type="text/javascript"></script>
+
+<script type='text/javascript' language='javascript'>
+ <!--
+ var default_error_message = "{% trans "Error while loading the page... Refresh the page. If the problem persist contact the webmaster." %}";
+ var edit_url = "{% url edit %}";
+ var edit_event_url = "{% url edit-event %}";
+ var edit_route_url = "{% url edit-route %}";
+ // -->
+</script>
+<script src="{{ STATIC_URL }}saclay/js/interface.js" type="text/javascript"></script>
+{{ block.super }}
+{% endblock %}
{% block message_edit %}{% endblock %}
{% block sidebar %}
<div class='sidebar-handler' id='sidebar-handler-hide'>
</div>
+ <div id='action-panel'>
+ <ul id='map-actions' class='action'>
+ <li id='action-categories' class='state-active'>
+ <label>{% trans "Categories" %}</label>
+ </li>{% if itinerary_form %}
+ <li id='action-routing'>
+ <label>{% trans "Routing" %}</label>
+ </li>{% endif %}
+ </ul>
+ <ul id='edit-actions' class='action'>
+ <li id='action-edit-marker' class='state-active'>
+ <label>{% trans "Location" %}</label>
+ </li>
+ <li id='action-edit-route'>
+ <label>{% trans "Wander" %}</label>
+ </li>
+ <li id='action-edit-event'>
+ <label>{% trans "Event" %}</label>
+ </li>
+ </ul>
+ </div>
<div id='panel'>
- <a>
- <h2>{% trans "Categories"%}</h2>
- </a>
- <form method='post' name='frm_categories' id='frm_categories'>
- <div id='categories' name='categories'></div>
- </form>
+ <div id='map-panel'>
+ <form action='.' method='post' name='frm_categories' id='frm_categories'>
+ <div id='categories'>{# dynamic content #}
+ </div>
+ </form>
+ {% routing %}
+ </div>
+ <div id='edit-panel'>
+ <div id='frm-edit-marker'>{# dynamic content #}
+ </div>
+ <div id='frm-edit-route'>{# dynamic content #}
+ </div>
+ <div id='frm-edit-event'>{# dynamic content #}
+ </div>
+ </div>
+ </div>
+ <div class='footer' id='footer-panel'>
+ {% if contact_email %}<a href='mailto:{{contact_email}}' id='contactus'>{% trans "contact us" %}</a> | {% endif %}
+ <a href='{% url chimere:extra_page '' 'legal' %}' id='page-legal' class='dyn-page'>{% trans "terms of service, credits" %}</a>
</div>
{% endblock %}
{% block content %}
- <script type='text/javascript'><!--
- var simple = true;
- // --></script>
+ <div id='category_description'>
+ </div>
+ <script type='text/javascript'>
+ $(function(){
+ $('#category_description').dialog({'autoOpen':false, width:630,
+ 'dialogClass':'no-titlebar'});
+ });
+ </script>
+ <div class='sidebar-handler' id='sidebar-handler-show'>
+ </div>
+ <div id='detail' class='ui-widget ui-corner-all'></div>
+ {% if not itinerary_form %}<div class='map_button'>
+ <a href='#' id='button-move-map' class='toggle-button toggle-button-active' onclick='toggleDrawOff();return false;'>
+ {% trans "Move on the map" %}
+ </a>
+ <a href='#' id='button-draw-map' class='toggle-button toggle-button-inactive' onclick='toggleDrawOn();return false;'>
+ {% trans "Draw" %}
+ </a>
+ </div>{% endif %}
+ <div id='permalink'></div>
+ {% if simple %}
+ {% display_welcome 0 %}
+ {%else%}
+ {% display_welcome news_visible %}
+ {% endif %}
+ {% display_news news_visible %}
{{ block.super }}
+ <div id='map-shadow'></div>
+ <div id='default-message'></div>
+<script type="text/javascript">
+ <!--
+ $("#main-map").show();
+ // -->
+</script>
+ {% map_menu %}
+ {% map 'main-map' %}
+ <div id='chimere_message'></div>
+ <script type='text/javascript'>
+ $(function(){$('#chimere_message').dialog({'autoOpen':false,
+ dialogClass:'no-titlebar-simple', position:'right bottom',
+ resizable: false});});
+ </script>
+{% endblock %}
+{% block footer %}
+ <p class='map-footer'>{% include "chimere/blocks/footer.html" %}</p>
{% endblock %}