summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValérie-Emma Leroux <emma@iggdrasil.net>2016-09-19 13:45:34 +0200
committerValérie-Emma Leroux <emma@iggdrasil.net>2016-09-19 13:45:34 +0200
commit501530b36bd2bfde0f9d6f29f69fba868272f7a3 (patch)
treefbb82d0b2906b50de4eb65aba9f61dfdab8f0225
parent996fda6af4b0ad431e32187dc2ad59a49f66b089 (diff)
parent0b4867c720c9a2dc49996ed1a45580138a749caa (diff)
downloadChimère - projet Saclay-501530b36bd2bfde0f9d6f29f69fba868272f7a3.tar.bz2
Chimère - projet Saclay-501530b36bd2bfde0f9d6f29f69fba868272f7a3.zip
Merge branch 'saclay-v2.2' of git.iggdrasil.net:/srv/git/chimere_saclay into saclay-v2.2
-rw-r--r--import_filters/ot-massy.xslt28
-rw-r--r--static/saclay/css/styles.css53
-rw-r--r--static/saclay/images/button-suggestion.pngbin0 -> 6719 bytes
-rw-r--r--static/saclay/js/interface.js4
-rwxr-xr-xstatic/saclay/js/search.js48
-rw-r--r--templates/chimere/base.html5
-rw-r--r--templates/chimere/blocks/alternate_multimedia.html2
-rw-r--r--templates/chimere/blocks/welcome.html61
-rw-r--r--templates/chimere/main_map.html3
9 files changed, 160 insertions, 44 deletions
diff --git a/import_filters/ot-massy.xslt b/import_filters/ot-massy.xslt
new file mode 100644
index 0000000..762e768
--- /dev/null
+++ b/import_filters/ot-massy.xslt
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.caravelis.com/webservice/data" xmlns:tif="http://www.tourinfrance.net/Tourinfrance3/" xmlns:fmp="http://www.filemaker.com/fmpdsoresult" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
+<xsl:output method="xml" indent="yes"/>
+ <xsl:template match="/">
+ <items>
+ <xsl:apply-templates select="/a:listeoi/a:ois/tif:oi" />
+ </items>
+ </xsl:template>
+
+ <xsl:template match="tif:oi">
+ <item>
+ <name>Office de tourisme de Massy : <xsl:value-of select="tif:dublincore/dc:title"/></name>
+ <xsl:for-each select="tif:multimedia/tif:detailmultimedia[@libelle='Image']">
+ <image><xsl:value-of select="tif:url"/></image>
+ </xsl:for-each>
+ <description>
+ <xsl:value-of select="tif:dublincore/dc:subject"/>
+ <br /><xsl:value-of select="tif:dublincore/dc:description"/></description>
+ <start_date><xsl:value-of select="tif:periodes/tif:detailperiode/tif:dates/tif:detaildates/tif:datedebut"/></start_date>
+ <end_date><xsl:value-of select="tif:periodes/tif:detailperiode/tif:dates/tif:detaildates/tif:datefin"/></end_date>
+ <key>OT-massy-<xsl:value-of select="tif:dublincore/dc:identifier"/></key>
+ <lat><xsl:value-of select="tif:geolocalisations/tif:detailgeolocalisation/tif:zone/tif:points/tif:detailpoint/tif:coordonnees/tif:detailcoordonnees/tif:latitude"/></lat>
+ <lon><xsl:value-of select="tif:geolocalisations/tif:detailgeolocalisation/tif:zone/tif:points/tif:detailpoint/tif:coordonnees/tif:detailcoordonnees/tif:longitude"/></lon>
+ </item>
+ </xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/static/saclay/css/styles.css b/static/saclay/css/styles.css
index 6046bb2..39db464 100644
--- a/static/saclay/css/styles.css
+++ b/static/saclay/css/styles.css
@@ -418,6 +418,12 @@ h3.warn{
background-color:#e0e0d8;
}
+.media-img{
+ max-height: 200px;
+ max-width: 300px;
+}
+
+
#submited-window{
background-image:url(../images/popup/thanks_title.png) ;
background-repeat:no-repeat;
@@ -452,6 +458,7 @@ a#ui-active-menuitem.ui-state-hover{
width: 281px;
}
+#haystack-search-page,
#haystack-search{
width:35px;
height:28px;
@@ -463,6 +470,19 @@ a#ui-active-menuitem.ui-state-hover{
vertical-align:top;
}
+#haystack-search-page .action-label,
+#haystack-search .action-label{
+ display: none;
+}
+
+#id_welcome_search{
+ height: 20px;
+}
+
+.welcome-dialog p.welcome-search{
+ padding: 10px 0 20px 0;
+}
+
#search-listing img{
vertical-align:middle;
}
@@ -1745,6 +1765,10 @@ div.cloud h4{
background-position:center bottom;
}
+.cloud .description img{
+ max-width: 300px;
+}
+
.close_img{
display:block;
overflow:hidden;
@@ -2118,3 +2142,32 @@ select#id_categories{
color:#d38fac;
}
+#welcome h3, #welcome h4,
+#welcome{
+ font-family: 'Numans', sans-serif;
+ text-align: center;
+ color: #999;
+ font-weight: 300;
+}
+
+#welcome h3{
+ font-size: 50px;
+}
+
+#welcome h4{
+ font-size: 30px;
+}
+
+
+a#page-feedback{
+ display: block;
+ position: absolute;
+ bottom: 50px;
+ right: 0;
+ z-index: 100;
+ background-image:url('../images/button-suggestion.png');
+ height: 130px;
+ width: 40px;
+ font-size: 0;
+ color: 0;
+}
diff --git a/static/saclay/images/button-suggestion.png b/static/saclay/images/button-suggestion.png
new file mode 100644
index 0000000..84b5a73
--- /dev/null
+++ b/static/saclay/images/button-suggestion.png
Binary files differ
diff --git a/static/saclay/js/interface.js b/static/saclay/js/interface.js
index e004ce4..ba14b15 100644
--- a/static/saclay/js/interface.js
+++ b/static/saclay/js/interface.js
@@ -162,6 +162,10 @@ $(function(){
$('input[name="transport"]').change(change_routing_transport);
$('input[name="speed"]').change(change_routing_speed);
$('#id_speed').change(change_routing_speed);
+
+ $('#haystack-search-page').click(welcome_search);
+ $(".olControlSimplePanZoom").css('right', '80px');
+ $(".olControlSimplePanZoom").css('left', 'auto');
});
function change_routing_speed(){
diff --git a/static/saclay/js/search.js b/static/saclay/js/search.js
new file mode 100755
index 0000000..27e9a3a
--- /dev/null
+++ b/static/saclay/js/search.js
@@ -0,0 +1,48 @@
+function load_search_box(){
+ if (!search_url) return;
+ $.ajax({url: search_url}).done(function( data ) {
+ $("#search-box").html(data);
+ });
+}
+
+function haystack_search(evt, page){
+ search_result = new Array();
+ $('#categories').find('#ul_categories > li > input').attr("checked", false);
+ if (!$('#id_q').val()){
+ $('.ac-results').remove();
+ $('#search-result').html('').show('slow');
+ return false;
+ }
+
+ var c_url = search_url + "?q=" + $('#id_q').val();
+ if (page){
+ c_url += '&page=' + page;
+ }
+ $.get(c_url).done(function( data ) {
+ $('.ac-results').remove();
+ $('#search-result').html(data).show('slow');
+ });
+ return false;
+}
+
+function welcome_search(){
+ if ($("#welcome").is(":visible") && $("#id_welcome_search").val()) {
+ $("#id_q").val($("#id_welcome_search").val());
+ $("#action-search").click();
+ $('#welcome').dialog('close');
+ $("#haystack-search").click();
+ return true;
+ }
+}
+
+// disable enter
+$(window).keydown(function(event){
+ if (event.keyCode == 13) {
+ event.preventDefault();
+ if (!welcome_search()){
+ $("#haystack-search").click();
+ }
+ return false;
+ }
+});
+
diff --git a/templates/chimere/base.html b/templates/chimere/base.html
index b24f070..5f88092 100644
--- a/templates/chimere/base.html
+++ b/templates/chimere/base.html
@@ -1,6 +1,7 @@
{% extends "base.html" %}
{% load chimere_tags i18n %}
{% block extra_head %}
+<link href='https://fonts.googleapis.com/css?family=Numans' rel='stylesheet' type='text/css'/>
<link rel="shortcut icon" href="{{ STATIC_URL }}saclay/images/favicon.png"/>
<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/styles.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/print.css" media='print'/>
@@ -21,14 +22,14 @@
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
- var u="https://piwik.proxience.net/";
+ var u="https://stats.iggdrasil.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>
+<noscript><p><img src="https://stats.iggdrasil.net/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{% endblock %}
{% block header %}
diff --git a/templates/chimere/blocks/alternate_multimedia.html b/templates/chimere/blocks/alternate_multimedia.html
index d535d7b..61c42c3 100644
--- a/templates/chimere/blocks/alternate_multimedia.html
+++ b/templates/chimere/blocks/alternate_multimedia.html
@@ -36,7 +36,7 @@
</div>{%endcomment%}
<div class="fieldWrapper">
<label for="multimedia_name">{% trans "Name" %}</label>
- <input type='text' id='multimedia_name' name='multimedia_name'>
+ <input type='text' id='multimedia_name' name='multimedia_name' value=" ">
</div>
<div class="fieldWrapper">
<input type='radio' value='image' id='media_type_image' name="multimedia_type"> <label for='media_type_image'>{% trans "Image" %}</label>
diff --git a/templates/chimere/blocks/welcome.html b/templates/chimere/blocks/welcome.html
index 8d7add2..aa5d7f1 100644
--- a/templates/chimere/blocks/welcome.html
+++ b/templates/chimere/blocks/welcome.html
@@ -6,7 +6,7 @@ $(function(){
$('#welcome div.media-player').jmeEmbedControls();
$('#welcome video').each(function(index){$(this).pause()});
$('#welcome audio').each(function(index){$(this).pause()});
- $("#welcome").dialog({width:826, height:410, dialogClass:'welcome-dialog'
+ $("#welcome").dialog({width:550, height:300, dialogClass:'welcome-dialog'
{% if not display %}, autoOpen:false{% endif %},
open: function () { $("#welcome_content").scrollTop(0); }
});
@@ -14,47 +14,28 @@ $(function(){
// -->
</script>
<div id='welcome' style='display:none'>
- <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>
+ <h3>Trouvez</h3>
+ <p>un concert, du fromage de chèvre, une randonnée</p>
+
+ <p class='welcome-search'>
+ <input id="id_welcome_search" name='__welcome_search__' autocomplete="off" type="text">
+ <button type="button" id='haystack-search-page' class="btn btn-default"><span class="action-label">Rechercher </span><span class="glyphicon glyphicon-search"></span></button>
+ </p>
+
+
+ <h4>L'agenda du Plateau en 1 clic</h4>
+ <p>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RH'><img src='http://saclay.carte-ouverte.org/media/icons/event_reunions.png' title='Réunions publiques' alt='Réunions publiques'/></a>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RI'><img src='http://saclay.carte-ouverte.org/media/icons/event_conf.png' title='Conférences et projections' alt='Conférences et projections'/></a>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RJ'><img src='http://saclay.carte-ouverte.org/media/icons/event_expos.png' title='Expositions et visites' alt='Expositions et visites'/></a>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RO'><img src='http://saclay.carte-ouverte.org/media/icons/event_spectacle.png' title='Spectacles' alt='Spectacles'/></a>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RN'><img src='http://saclay.carte-ouverte.org/media/icons/event_forma_ateliers.png' title='Formations et ateliers' alt='Formations et ateliers'/></a>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RM'><img src='http://saclay.carte-ouverte.org/media/icons/event_brocante.png' title='Brocante et marchés artisanaux' alt='Brocante et marchés artisanaux'/></a>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RL'><img src='http://saclay.carte-ouverte.org/media/icons/event_rando.png' title='Randonnées' alt='Randonnées'/></a>
+ <a href='http://saclay.carte-ouverte.org/saclay/ty/RK'><img src='http://saclay.carte-ouverte.org/media/icons/event_sports.png' title='Manifestations sportives' alt='Manifestations sportives'/></a>
+ </p>
</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/main_map.html b/templates/chimere/main_map.html
index 2acbba5..28beea9 100644
--- a/templates/chimere/main_map.html
+++ b/templates/chimere/main_map.html
@@ -9,7 +9,7 @@
<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>
{% if has_search %}
-<script src="{{ STATIC_URL }}chimere/js/search.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}saclay/js/search.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}chimere/js/search-autocomplete.js" type="text/javascript"></script>{% endif %}
<script type='text/javascript' language='javascript'>
@@ -103,6 +103,7 @@
{{ block.super }}
<div id='map-shadow'></div>
<div id='default-message'></div>
+ <a href='{% url chimere:extra_page '' 'feedback' %}' id='page-feedback' class='dyn-page'>Suggestions</a>
<script type="text/javascript">
<!--
$("#main-map").show();