From 221c6b7dbd2ee6bfd334419ea3945f177103cd58 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sun, 10 Nov 2013 13:42:44 +0100 Subject: [PATCH] [IMP] Event improvement in views bzr revid: fp@openerp.com-20131110124244-n85z3usyj7laak33 --- addons/website/static/src/css/website.css | 21 ++++++ addons/website/static/src/css/website.sass | 18 +++++ addons/website_event/controllers/main.py | 5 +- addons/website_event/views/website_event.xml | 69 ++++++++++++++------ 4 files changed, 92 insertions(+), 21 deletions(-) diff --git a/addons/website/static/src/css/website.css b/addons/website/static/src/css/website.css index d93d789d0b4..eb530b0036d 100644 --- a/addons/website/static/src/css/website.css +++ b/addons/website/static/src/css/website.css @@ -443,3 +443,24 @@ a[data-publish][data-publish='on']:hover .css_published { .logo-img { width: 220px; } + +.oe_demo { + position: relative; +} +.oe_demo img { + width: 100%; +} +.oe_demo div { + position: absolute; + left: 0; + background-color: rgba(0, 0, 0, 0.4); + opacity: 0.85; + bottom: 0px; + width: 100%; + padding: 7px; + color: white; + font-weight: bold; +} +.oe_demo div a { + color: white; +} diff --git a/addons/website/static/src/css/website.sass b/addons/website/static/src/css/website.sass index b5b2476dd17..9855b20c313 100644 --- a/addons/website/static/src/css/website.sass +++ b/addons/website/static/src/css/website.sass @@ -336,3 +336,21 @@ a[data-publish] .logo-img width: 220px + + +.oe_demo + position: relative + img + width: 100% + div + position: absolute + left: 0 + background-color: rgba(0,0,0,0.4) + opacity: 0.85 + bottom: 0px + width: 100% + padding: 7px + color: white + font-weight: bold + a + color: white diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py index 853cb24db50..f13d41c9c31 100644 --- a/addons/website_event/controllers/main.py +++ b/addons/website_event/controllers/main.py @@ -79,13 +79,14 @@ class website_event(http.Controller): ] # search domains - current_date = dates[0][1] + current_date = None current_type = None current_country = None for date in dates: if searches["date"] == date[0]: domain_search["date"] = date[2] - current_date = date[1] + if date[0] != 'all': + current_date = date[1] if searches["type"] != 'all': current_type = type_obj.browse(cr, uid, int(searches['type']), context=context) domain_search["type"] = [("type", "=", int(searches["type"]))] diff --git a/addons/website_event/views/website_event.xml b/addons/website_event/views/website_event.xml index abfa6232cf0..5e78e0f5926 100644 --- a/addons/website_event/views/website_event.xml +++ b/addons/website_event/views/website_event.xml @@ -13,21 +13,20 @@ -