summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/saclay/css/styles-saclay.css18
-rw-r--r--static/saclay/js/interface.js1
-rw-r--r--templates/chimere/blocks/actions.html9
-rw-r--r--templates/chimere/blocks/routing.html10
-rw-r--r--templates/chimere/blocks/share_bar.html19
-rw-r--r--templates/chimere/detail.html13
6 files changed, 52 insertions, 18 deletions
diff --git a/static/saclay/css/styles-saclay.css b/static/saclay/css/styles-saclay.css
index 5ff5370..f9efc95 100644
--- a/static/saclay/css/styles-saclay.css
+++ b/static/saclay/css/styles-saclay.css
@@ -414,6 +414,24 @@ div#panel{
border-top-width:0;
}
+#chimere_itinerary h4{
+ line-height:22px;
+}
+
+ul#roadmap_toolbar, ul#roadmap_toolbar li{
+ padding:0;
+}
+
+ul#roadmap_toolbar a img{
+ vertical-align:bottom;
+}
+
+
+ul#roadmap_toolbar, ul#roadmap_toolbar ul, ul#roadmap_toolbar li{
+ display:inline;
+ list-style-type:none;
+}
+
#footer-panel{
text-align:center;
padding:0.2em;
diff --git a/static/saclay/js/interface.js b/static/saclay/js/interface.js
index 3587382..2659f99 100644
--- a/static/saclay/js/interface.js
+++ b/static/saclay/js/interface.js
@@ -169,6 +169,7 @@ function display_feature_detail(data, settings){
return false;
});
$(document).ready(function(){
+ share_link_update();
$("a[rel^='prettyPhoto']").prettyPhoto({
show_title: false,
social_tools: ''
diff --git a/templates/chimere/blocks/actions.html b/templates/chimere/blocks/actions.html
index 4f583d9..d2deed7 100644
--- a/templates/chimere/blocks/actions.html
+++ b/templates/chimere/blocks/actions.html
@@ -1,4 +1,4 @@
-{% load i18n %}
+{% load i18n chimere_tags %}
<div id="topbar">
<ul id='action' class='action'>
<li id='action-carte' class='ui-widget ui-button ui-state-default ui-corner-all ui-state-active'>
@@ -18,9 +18,8 @@
</ul>
<ul id='action-3' class='action'>
<li><a href='#' class='print-page'><img src='{{STATIC_URL}}chimere/img/printer.png'/></a></li>
- <li><a href="#" class='share-icon'><img src="{{STATIC_URL}}chimere/img/share-icon.png" alt="{% trans 'Share' %}"/></a></li>{% for share_network in share_networks %}
- <li class='shared' style='display:none'><a href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li>
- {% endfor %}
- <li><a href='{% url chimere:feeds-global %}'><img src='{{STATIC_URL}}chimere/img/feed.png'/></a></li>
+ <li>
+ {% share_bar %}
+ </li>
</ul>
</div>
diff --git a/templates/chimere/blocks/routing.html b/templates/chimere/blocks/routing.html
index bd1745a..7908a15 100644
--- a/templates/chimere/blocks/routing.html
+++ b/templates/chimere/blocks/routing.html
@@ -1,4 +1,4 @@
-{% load i18n %}
+{% load i18n chimere_tags %}
{% if routing %}
{{itinerary_form.media}}
<div id='chimere_itinerary_panel'>
@@ -16,7 +16,13 @@
</div>
<div id='chimere_itinerary'>
<hr/>
- <h4>{% trans "Roadmap" %}</h4>
+ <h4>{% trans "Roadmap" %}
+ <ul id='roadmap_toolbar'>
+ <li><a href='#' class='print-page'><img src='{{STATIC_URL}}chimere/img/printer.png'/></a></li>
+ <li>
+ {% share_bar %}
+ </li>
+ </ul></h4>
<div class='itinerary_label' id='total_label_div'>
<span>Temps de parcours : </span><span id='chimere_total_label'></span>
</div>
diff --git a/templates/chimere/blocks/share_bar.html b/templates/chimere/blocks/share_bar.html
new file mode 100644
index 0000000..ee66b13
--- /dev/null
+++ b/templates/chimere/blocks/share_bar.html
@@ -0,0 +1,19 @@
+{% load i18n %}
+ {% 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 class='share'>
+ <li><a href="#" class='share-icon'><img src="{{STATIC_URL}}chimere/img/share-icon.png" alt="{% trans 'Share' %}"/></a></li>{% for share_network in share_networks %}
+ <li class='shared' style='display:none'><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li>
+ {% endfor %}</ul>
+ <ul class='share'>
+ <li><a href='{% url chimere:feeds-global %}'><img src='{{STATIC_URL}}chimere/img/feed.png'/></a></li>
+ </ul>{% endif %}
+ <script type='text/javascript'>
+ $(function(){
+ share_link_update();
+ });
+ </script>
+ {% endif %}
+
diff --git a/templates/chimere/detail.html b/templates/chimere/detail.html
index 3958fbc..ca2a31d 100644
--- a/templates/chimere/detail.html
+++ b/templates/chimere/detail.html
@@ -42,25 +42,16 @@
<a class='detail_zoomin' href='#'>{% trans "Zoom in" %}</a>
<a class='detail_zoomout' href='#'>{% trans "Zoom out" %}</a>
</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 class='share'>
<li><a href="{{modif_by_email}}">{% trans "Propose a modification" %}</a></li>
<li class='sep'>&ndash;</li>
- <li><a href="#" class='share-icon'><img src="{{STATIC_URL}}chimere/img/share-icon.png" alt="{% trans 'Share' %}"/></a></li>{% for share_network in share_networks %}
- <li class='shared' style='display:none'><a href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li>
- {% endfor %}
- <li class='sep'>&ndash;</li>
- <li><a href='{% url chimere:feeds-global %}'><img src='{{STATIC_URL}}chimere/img/feed.png'/></a></li>
- </ul>{% endif %}
+ </ul>
+ {% share_bar marker.name %}
{% comment %}
<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 a modification" %}
</a>
{% endcomment %}
- {% endif %}
</div>
{% if marker.multimedia_items %}
<div id='gallery-{{marker.pk}}' class='gallery'>