From: Jérémy Fabre Date: Wed, 26 Oct 2016 12:58:03 +0000 (+0200) Subject: Add image to search results (events and playlists), also add booking button to events X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d3345a02e4c1b43368803cae5d0aa594d58ba1a4;p=mezzo.git Add image to search results (events and playlists), also add booking button to events --- diff --git a/app/static/src/sass/modules/boxes/_search-box.scss b/app/static/src/sass/modules/boxes/_search-box.scss index 2b997881..8cf605fc 100644 --- a/app/static/src/sass/modules/boxes/_search-box.scss +++ b/app/static/src/sass/modules/boxes/_search-box.scss @@ -3,6 +3,7 @@ $module: ".search-box"; #{$module} { position: relative; + @include clearfix; @include margin-bottom(2); &__title { @@ -39,4 +40,99 @@ $module: ".search-box"; } + &__image-wrapper { + + float: left; + width: 20%; + display: block; + + & + #{$module}__right { + + width: 80%; + float: left; + @include padding-left(1); + + } + + @include mq($until: xs) { + display: none; + + & + #{$module}__right { + + width: 100%; + float: none; + @include padding-left(0); + + } + } + + } + + &__image { + + @include fluid-aspect(720 435); + + &--playlist { + + @include fluid-aspect(720 435); + + } + + &--video { + + &:after { + font-family: FontAwesome; + display: block; + content: "\f04b"; + background: white; + width: 50px; + height: 50px; + border-radius: 50px; + + font-size: 25px; + + position: absolute; + top: 50%; + left: 50%; + margin-top: -25px; + margin-left: -25px; + + line-height: 50px; + text-align: center; + text-indent: 3px; + + } + + } + + &--audio { + + &:after { + font-family: FontAwesome; + display: block; + content: "\f028"; + text-indent: 0px; + background: white; + width: 50px; + height: 50px; + border-radius: 50px; + + font-size: 25px; + + position: absolute; + top: 50%; + left: 50%; + margin-top: -25px; + margin-left: -25px; + + line-height: 50px; + text-align: center; + text-indent: 3px; + + } + + } + + } + } diff --git a/app/templates/agenda/includes/event_search.html b/app/templates/agenda/includes/event_search.html index 0acf5357..a933ff7c 100644 --- a/app/templates/agenda/includes/event_search.html +++ b/app/templates/agenda/includes/event_search.html @@ -10,9 +10,36 @@ {% block subtitle %}
{% include 'agenda/includes/event_date_line.html' %} + {% if event.prices.all.0|floatformat != '0' and event.prices.all|length > 0 and not is_archive %} + + {% trans "Reserve" %} + + {% endif %}
{% endblock %} +{% block image %} + {% with event.images.all|get_type:'card' as images %} + {% if images %} + +
+ +
+
+ {% else %} + {% with event.parent.images.all|get_type:'card' as images %} + {% if images %} + +
+ +
+
+ {% endif %} + {% endwith %} + {% endif %} + {% endwith %} +{% endblock %} + {% block tags %} {% keywords_for event as tags %} {% if event.departments.all.0 or tags %} diff --git a/app/templates/core/inc/search_card.html b/app/templates/core/inc/search_card.html index 4ff100a5..6235e83d 100644 --- a/app/templates/core/inc/search_card.html +++ b/app/templates/core/inc/search_card.html @@ -1,23 +1,28 @@