summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-06-04 20:26:29 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-06-04 20:26:29 +0200
commit5b908f8e667c411e7ec747c55564874b9ab4e85b (patch)
treea5e9c8196161f899e60a2155cf182b22a23f3325
parent7af3588c0ab756a491827f2cc17c6ab0a597a298 (diff)
parentcdb199be999cf84600a70335c4b0fe0406c6555e (diff)
downloadChimère - projet Saclay-5b908f8e667c411e7ec747c55564874b9ab4e85b.tar.bz2
Chimère - projet Saclay-5b908f8e667c411e7ec747c55564874b9ab4e85b.zip
Merge branch 'saclay-v2.2' into saclay-mobile-v2.2
Conflicts: static/saclay/css/saclay.css static/saclay/css/styles.css templates/chimere/main_map.html
-rw-r--r--import_filters/guyancourt.xslt (renamed from xslt/guyancourt.xslt)11
-rw-r--r--import_filters/magny-les-hameaux.xslt (renamed from xslt/magny-les-hameaux.xslt)4
-rw-r--r--import_filters/orsay.json1
-rw-r--r--import_filters/villiers-le-bacle-detail.xslt (renamed from xslt/villiers-le-bacle-detail.xslt)0
-rw-r--r--import_filters/villiers-le-bacle.xslt (renamed from xslt/villiers-le-bacle.xslt)0
-rw-r--r--settings.py55
-rw-r--r--static/saclay/css/saclay.css9
-rw-r--r--static/saclay/css/styles.css128
-rw-r--r--static/saclay/images/button-cat-three-off.pngbin0 -> 4039 bytes
-rw-r--r--static/saclay/images/button-cat-three-on.pngbin0 -> 3957 bytes
-rw-r--r--static/saclay/images/button-route-three-off.pngbin0 -> 3604 bytes
-rw-r--r--static/saclay/images/button-route-three-on.pngbin0 -> 3499 bytes
-rw-r--r--static/saclay/images/button-search-off.pngbin0 -> 3736 bytes
-rw-r--r--static/saclay/images/button-search-on.pngbin0 -> 3556 bytes
-rw-r--r--static/saclay/images/search.pngbin0 -> 686 bytes
-rw-r--r--static/saclay/images/subcategories/ress_offices_off.pngbin0 -> 3481 bytes
-rw-r--r--static/saclay/images/subcategories/ress_offices_on.pngbin0 -> 3541 bytes
-rw-r--r--static/saclay/js/interface.js2
-rwxr-xr-xstatic/saclay/js/search.js48
-rw-r--r--templates/chimere/base.html5
-rw-r--r--templates/chimere/blocks/map.html80
-rw-r--r--templates/chimere/blocks/share_bar.html2
-rw-r--r--templates/chimere/blocks/welcome.html61
-rw-r--r--templates/chimere/detail.html6
-rw-r--r--templates/chimere/main_map.html19
25 files changed, 324 insertions, 107 deletions
diff --git a/xslt/guyancourt.xslt b/import_filters/guyancourt.xslt
index 235879b..04ea5b1 100644
--- a/xslt/guyancourt.xslt
+++ b/import_filters/guyancourt.xslt
@@ -3,12 +3,13 @@
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<items>
- <xsl:for-each select="/rss/channel/*/item">
+ <xsl:for-each select="/nodes/node">
<item>
- <name>Ville de Guyancourt : <xsl:value-of select="title"/></name>
- <link><xsl:value-of select="link"/></link>
- <description><xsl:value-of select="description"/></description>
- <key>guyancourt-<xsl:value-of select="guid"/></key>
+ <name>Ville de Guyancourt : <xsl:value-of select="titre"/></name>
+ <link><xsl:value-of select="lien"/></link>
+ <description><xsl:value-of select="corps"/><br /><xsl:value-of select="contenu"/></description>
+ <date><xsl:value-of select="date"/></date>
+ <key>guyancourt-<xsl:value-of select="titre"/><xsl:value-of select="date"/></key>
</item>
</xsl:for-each>
</items>
diff --git a/xslt/magny-les-hameaux.xslt b/import_filters/magny-les-hameaux.xslt
index 3cb3786..afed5f1 100644
--- a/xslt/magny-les-hameaux.xslt
+++ b/import_filters/magny-les-hameaux.xslt
@@ -6,10 +6,10 @@
<xsl:for-each select="/nodes/node">
<item>
<date><xsl:value-of select="date"/></date>
- <name>Magny-les-Hameaux : <xsl:value-of select="titre"/></name>
+ <name>Ville de Magny-les-Hameaux : <xsl:value-of select="titre"/></name>
<category><xsl:value-of select="tiquette"/></category>
<link><xsl:value-of select="lien"/></link>
- <description><xsl:value-of select="corps"/></description>
+ <description><xsl:value-of select="body"/></description>
<key>magny-les-hameaux-<xsl:value-of select="titre"/>-<xsl:value-of select="date"/></key>
<lat><xsl:value-of select="latitude"/></lat>
<lon><xsl:value-of select="longitude"/></lon>
diff --git a/import_filters/orsay.json b/import_filters/orsay.json
new file mode 100644
index 0000000..40d2373
--- /dev/null
+++ b/import_filters/orsay.json
@@ -0,0 +1 @@
+{"title":"name", "id_agenda":"id", "content":"description", "date_start_evt":"start_date", "date_end_evt":"end_date", "adresse_localisation":"description", "prefix_name":"Vile d'Orsay :"}
diff --git a/xslt/villiers-le-bacle-detail.xslt b/import_filters/villiers-le-bacle-detail.xslt
index 9dc757d..9dc757d 100644
--- a/xslt/villiers-le-bacle-detail.xslt
+++ b/import_filters/villiers-le-bacle-detail.xslt
diff --git a/xslt/villiers-le-bacle.xslt b/import_filters/villiers-le-bacle.xslt
index 1c33955..1c33955 100644
--- a/xslt/villiers-le-bacle.xslt
+++ b/import_filters/villiers-le-bacle.xslt
diff --git a/settings.py b/settings.py
index 190a0b4..0a9ba06 100644
--- a/settings.py
+++ b/settings.py
@@ -30,11 +30,11 @@ JQUERY_CSS_URLS = []
OSM_CSS_URLS = ["http://www.openlayers.org/api/theme/default/style.css"]
GPSBABEL = '/usr/bin/gpsbabel'
-# simplify with an  error of 5 meters
+# simplify with an error of 5 meters
GPSBABEL_OPTIONS = 'simplify,crosstrack,error=0.005k'
# GPSBABEL_OPTIONS = 'simplify,count=100'
-# chimere specific ##
+# # chimere specific ##
CHIMERE_DEFAULT_ZOOM = 10
# center of the map
CHIMERE_DEFAULT_CENTER = (-1.679444, 48.114722)
@@ -58,6 +58,8 @@ CHIMERE_DAYS_BEFORE_EVENT = 30
CHIMERE_ALL_DATED_ARE_FRONT = True
# allow feeds
CHIMERE_FEEDS = True
+# display a directory of items
+CHIMERE_DIRECTORY = False
CHIMERE_ICON_WIDTH = 36
CHIMERE_ICON_HEIGHT = 42
@@ -91,17 +93,18 @@ CHIMERE_ENABLE_CLUSTERING = False
# enable routing in Chimère
CHIMERE_ENABLE_ROUTING = False
-CHIMERE_ROUTING_TRANSPORT = (('foot', _(u"Foot")),
- ('bicycle', _(u"Bicycle")),
- ('motorcar', _(u"Motorcar")),
- )
+CHIMERE_ROUTING_TRANSPORT = (
+ ('foot', _(u"Foot")),
+ ('bicycle', _(u"Bicycle")),
+ ('motorcar', _(u"Motorcar")),
+)
-CHIMERE_ROUTING_SPEEDS = {'foot': ((3, _(u"You are walking slowly")),
- (6, _(u"You are walking pretty quickly")),),
- 'bicycle': ((16, _(u"You are riding pretty slowly")),
- (22, _(u"You are riding pretty quickly"))
- )
- }
+CHIMERE_ROUTING_SPEEDS = {
+ 'foot': ((3, _(u"You are walking slowly")),
+ (6, _(u"You are walking pretty quickly")),),
+ 'bicycle': ((16, _(u"You are riding pretty slowly")),
+ (22, _(u"You are riding pretty quickly")),)
+}
# available routing engine: 'routino'
CHIMERE_ROUTING_ENGINE = {
@@ -121,6 +124,18 @@ NOMINATIM_URL = 'http://nominatim.openstreetmap.org/search'
CHIMERE_THUMBS_SCALE_HEIGHT = 250
CHIMERE_THUMBS_SCALE_WIDTH = None
+# search engine
+CHIMERE_SEARCH_ENGINE = False
+HAYSTACK_CONNECTIONS = {
+ 'default': {
+ 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
+ 'URL': 'http://127.0.0.1:8080/solr',
+ 'INCLUDE_SPELLING': True,
+ },
+}
+HAYSTACK_SEARCH_RESULTS_PER_PAGE = 12
+HAYSTACK_AUTOCOMPLETE = False
+
# length of short description
CHIMERE_SHORT_DESC_LENGTH = 400
@@ -188,7 +203,6 @@ MEDIA_URL = '/media/'
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
- # 'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
@@ -287,11 +301,25 @@ LOGGING = {
},
}
+CHIMERE_SEARCH_ENGINE = False
+# default haystack parameters when search engine is activated
+HAYSTACK_CONNECTIONS = {
+ 'default': {
+ 'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
+ 'URL': 'http://127.0.0.1:8080/solr'
+ },
+}
+HAYSTACK_SEARCH_RESULTS_PER_PAGE = 12
+HAYSTACK_AUTOCOMPLETE = False
+
try:
from local_settings import *
except ImportError, e:
print 'Unable to load local_settings.py:', e
+if CHIMERE_SEARCH_ENGINE:
+ INSTALLED_APPS.insert(INSTALLED_APPS.index('south'), 'haystack')
+
if DJANGO_EXTENSIONS:
INSTALLED_APPS.append('django_extensions')
@@ -303,7 +331,6 @@ if not JQUERY_CSS_URLS:
JQUERY_CSS_URLS = (STATIC_URL + 'jquery-ui/smoothness/jquery-ui.css',
STATIC_URL + 'jquery-ui/base/jquery.ui.all.css')
-
LOGGING['handlers']['logfile']['filename'] = LOGFILENAME
if 'CHIMERE_SHARE_NETWORKS' not in globals():
diff --git a/static/saclay/css/saclay.css b/static/saclay/css/saclay.css
index 9cbdea6..312a27e 100644
--- a/static/saclay/css/saclay.css
+++ b/static/saclay/css/saclay.css
@@ -624,3 +624,12 @@
#li_sub_68 .selected label{
background-image:url('../images/subcategories/cult_7_on.png');
}
+
+/*82 - Ressources pratiques - Offices de Tourisme et SI*/
+#li_sub_82 label{
+ background-image:url('../images/subcategories/ress_offices_off.png');
+}
+
+#li_sub_82 .selected label{
+ background-image:url('../images/subcategories/ress_offices_on.png');
+}
diff --git a/static/saclay/css/styles.css b/static/saclay/css/styles.css
index 4b00da4..4e6a92c 100644
--- a/static/saclay/css/styles.css
+++ b/static/saclay/css/styles.css
@@ -72,6 +72,10 @@ caption{
font-size:0.9em;
}
+#detail_footer a {
+ display: inline-block;
+}
+
/*
* Background colors
*/
@@ -447,6 +451,64 @@ a#ui-active-menuitem.ui-state-hover{
background-image:none;
}
+#search-box{
+ display:none;
+ left:7px;
+ top:10px;
+ width: 281px;
+}
+
+#haystack-search-page,
+#haystack-search{
+ width:35px;
+ height:28px;
+ background-image:url(../images/search.png);
+ background-repeat:no-repeat;
+ background-position:center;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ 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;
+}
+
+#search-listing ul{
+ padding:4px;
+}
+
+#search-listing ul li {
+ padding: 0;
+}
+
+ul.pager{
+ list-style:none;
+}
+
+ul.pager li{
+ display:block;
+ width:100%;
+}
+
+ul.pager .next{
+ text-align:right;
+}
+
+
#logos{
width:340px;
margin-left:auto;
@@ -757,6 +819,12 @@ ul#action{
margin-top:22px;
}
+#action-panel.three .action li {
+ padding: 0px;
+ height: 38px;
+ width: 92px;
+}
+
.action li,
.action li a,
.action li label{
@@ -903,9 +971,34 @@ ul#action{
background-repeat:no-repeat;
}
-#action-routing.state-active,
-#action-routing:hover{
- background-image:url(../images/button-route-on.png) ;
+.three #action-categories{
+ background-image:url(../images/button-cat-three-off.png) ;
+ margin-right:3px;
+}
+
+.three #action-categories.state-active,
+.three #action-categories:hover{
+ background-image:url(../images/button-cat-three-on.png) ;
+}
+
+.three #action-routing{
+ background-image:url(../images/button-route-three-off.png) ;
+}
+
+.three #action-routing.state-active,
+.three #action-routing:hover{
+ background-image:url(../images/button-route-three-on.png) ;
+}
+
+#action-search{
+ background-image:url(../images/button-search-off.png) ;
+ background-repeat:no-repeat;
+ margin-right:3px;
+}
+
+#action-search.state-active,
+#action-search:hover{
+ background-image:url(../images/button-search-on.png) ;
background-repeat:no-repeat;
}
@@ -1064,11 +1157,12 @@ div#action-panel{
background-image:url(../images/background-small.png) ;
background-repeat:repeat;
background-position:center;
+ border-right:1px solid;
}
div#panel{
position:absolute;
- width:281px;
+ width:282px;
z-index:10;
max-height:none;
padding:0;
@@ -1080,6 +1174,7 @@ div#panel{
background-repeat:repeat-x;
background-position:left bottom;
overflow-x:hidden;
+ border-right:1px solid;
}
/* share toolbar */
@@ -1095,12 +1190,19 @@ a.share_id_email_single{
font-size:0;
}
+ul.share {
+ display: inline;
+ text-align: center;
+ font-style: normal;
+ padding: 2px 0;
+}
+
#footer-panel{
text-align:center;
padding:3px;
bottom:0;
position:absolute;
- width:275px;
+ width:276px;
height:22px;
border-right:1px solid #999;
border-left:1px solid #999;
@@ -2039,3 +2141,19 @@ select#id_categories{
#ul_categories .subcategories#maincategory_8 label{
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;
+}
diff --git a/static/saclay/images/button-cat-three-off.png b/static/saclay/images/button-cat-three-off.png
new file mode 100644
index 0000000..9d728de
--- /dev/null
+++ b/static/saclay/images/button-cat-three-off.png
Binary files differ
diff --git a/static/saclay/images/button-cat-three-on.png b/static/saclay/images/button-cat-three-on.png
new file mode 100644
index 0000000..d9bcc7e
--- /dev/null
+++ b/static/saclay/images/button-cat-three-on.png
Binary files differ
diff --git a/static/saclay/images/button-route-three-off.png b/static/saclay/images/button-route-three-off.png
new file mode 100644
index 0000000..388fd9d
--- /dev/null
+++ b/static/saclay/images/button-route-three-off.png
Binary files differ
diff --git a/static/saclay/images/button-route-three-on.png b/static/saclay/images/button-route-three-on.png
new file mode 100644
index 0000000..9581525
--- /dev/null
+++ b/static/saclay/images/button-route-three-on.png
Binary files differ
diff --git a/static/saclay/images/button-search-off.png b/static/saclay/images/button-search-off.png
new file mode 100644
index 0000000..9188039
--- /dev/null
+++ b/static/saclay/images/button-search-off.png
Binary files differ
diff --git a/static/saclay/images/button-search-on.png b/static/saclay/images/button-search-on.png
new file mode 100644
index 0000000..b7ed487
--- /dev/null
+++ b/static/saclay/images/button-search-on.png
Binary files differ
diff --git a/static/saclay/images/search.png b/static/saclay/images/search.png
new file mode 100644
index 0000000..0eff19b
--- /dev/null
+++ b/static/saclay/images/search.png
Binary files differ
diff --git a/static/saclay/images/subcategories/ress_offices_off.png b/static/saclay/images/subcategories/ress_offices_off.png
new file mode 100644
index 0000000..f11c077
--- /dev/null
+++ b/static/saclay/images/subcategories/ress_offices_off.png
Binary files differ
diff --git a/static/saclay/images/subcategories/ress_offices_on.png b/static/saclay/images/subcategories/ress_offices_on.png
new file mode 100644
index 0000000..47f94fb
--- /dev/null
+++ b/static/saclay/images/subcategories/ress_offices_on.png
Binary files differ
diff --git a/static/saclay/js/interface.js b/static/saclay/js/interface.js
index e004ce4..ebfa527 100644
--- a/static/saclay/js/interface.js
+++ b/static/saclay/js/interface.js
@@ -162,6 +162,8 @@ $(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);
});
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 8f13830..a213980 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/map.html b/templates/chimere/blocks/map.html
index 6273576..037d5a8 100644
--- a/templates/chimere/blocks/map.html
+++ b/templates/chimere/blocks/map.html
@@ -35,11 +35,46 @@ $(function(){
}, false);
}
};
+ $('#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');
+ });
+
+ });
//fin lib ios
var routing_panel_open = function(){
$('#frm_categories').hide();
+ $('#search-box').hide();
$('#chimere_itinerary_panel').show();
$('#action-categories').removeClass('state-active');
+ $('#action-search').removeClass('state-active');
$('#action-routing').addClass('state-active');
};
@@ -47,46 +82,25 @@ $(function(){
var category_panel_open = function(){
$('#chimere_itinerary_panel').hide();
+ $('#search-box').hide();
$('#frm_categories').show();
$('#action-routing').removeClass('state-active');
+ $('#action-search').removeClass('state-active');
$('#action-categories').addClass('state-active');
};
$('#action-categories').click(category_panel_open);
- $('#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');
- });
-
- });
+ var search_panel_open = function(){
+ $('#chimere_itinerary_panel').hide();
+ $('#frm_categories').hide();
+ $('#search-box').show();
+ $('#action-routing').removeClass('state-active');
+ $('#action-categories').removeClass('state-active');
+ $('#action-search').addClass('state-active');
+ };
+
+ $('#action-search').click(search_panel_open);
{% if single_category %}
$(function() {$('#panel').hide()});{% endif %}
diff --git a/templates/chimere/blocks/share_bar.html b/templates/chimere/blocks/share_bar.html
index aaa9fc4..b23c9e2 100644
--- a/templates/chimere/blocks/share_bar.html
+++ b/templates/chimere/blocks/share_bar.html
@@ -8,7 +8,7 @@
{% if not email_only %}<li class='share-icon'><a href="#">{% trans "Share" %}</a></li>{% for share_network in share_networks %}
<li class='shared'><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 %}
- <li class='shared'><a href='{% url chimere:feeds-global %}'><img src='{{STATIC_URL}}chimere/img/feed.png' alt='Feeds'/></a></li>{%endif%}
+ {% if rss %}<li class='shared'><a href='{% url chimere:feeds-global %}'><img src='{{STATIC_URL}}chimere/img/feed.png' alt='Feeds'/></a></li>{% endif %}{%endif%}
</ul>{% endif %}
<script type='text/javascript'>
<!--
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/detail.html b/templates/chimere/detail.html
index 5d386e0..ebe2992 100644
--- a/templates/chimere/detail.html
+++ b/templates/chimere/detail.html
@@ -21,10 +21,10 @@
{% if marker.end_date %} - {{marker.end_date|date:"D d M 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>
+ <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 img img:src"|safe}}</div>
{% endif %}
{% 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>
+ <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 img img:src"|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>
@@ -44,7 +44,7 @@
<li><a href="{{modif_by_email}}">{% trans "Propose a modification" %}</a></li>
<li class='sep'>&ndash;</li>
</ul>
- {% share_bar marker.name %}
+ {% 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" %}
diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html
index 38c4bbe..9dce672 100644
--- a/templates/chimere/main_map.html
+++ b/templates/chimere/main_map.html
@@ -8,6 +8,9 @@
<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>
+{% if has_search %}
+<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'>
<!--
@@ -26,11 +29,13 @@
</div>
{% comment %}
<!-- SUPPRIME POUR LA VUE MOBILE
- <div id='action-panel'>
+ <div id='action-panel'{% if has_search %} class='three'{% endif %}>
<ul id='map-actions' class='action'>
<li id='action-categories' class='state-active'>
<label>{% trans "Categories" %}</label>
- </li>{% if itinerary_form %}
+ </li>{% if has_search %}<li id='action-search'>
+ <label>{% trans "Search" %}</label>
+ </li>{% endif %}{% if itinerary_form %}
<li id='action-routing'>
<label>{% trans "Routing" %}</label>
</li>{% endif %}
@@ -55,6 +60,7 @@
<div id='categories'>{# dynamic content #}
</div>
</form>
+ <div id='search-box'></div>
{% routing %}
</div>
<div id='edit-panel'>
@@ -108,6 +114,15 @@
<script type="text/javascript">
<!--
$("#main-map").show();
+ var has_search = {% if has_search %}true{% else %}false{% endif %};
+ // array to keep trace of already displayed items
+ var search_result = new Array();
+ var search_url = "/search/";
+ $(function(){
+ if (has_search){
+ load_search_box();
+ }
+ });
// -->
</script>
{% map_menu %}