diff --git a/app/assets/images/linux-presentation-day.png b/app/assets/images/linux-presentation-day.png new file mode 100644 index 00000000..bcca9db2 Binary files /dev/null and b/app/assets/images/linux-presentation-day.png differ diff --git a/app/views/events/show.html.haml b/app/views/events/show.html.haml index 29b42097..37d56786 100644 --- a/app/views/events/show.html.haml +++ b/app/views/events/show.html.haml @@ -5,6 +5,12 @@ %a(href='https://www.libre-en-fete.net') = image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete', style: 'vertical-align: middle' +- elsif @event.tags.any? { |t| t.name.include? 'linux-presentation-day' } + Cet événement s'inscrit dans le cadre de + %a(href='http://www.linux-presentation-day.org') + = image_tag 'linux-presentation-day.png', + width: '150', height: '75', alt: 'Linux presentation day', + style: 'vertical-align: middle' %h2 - if @event.locality? diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index cc419e6b..0bbab8ee 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -17,7 +17,7 @@ = csrf_meta_tags - sub = request.domain ? request.domain.split('.')[0] : '' - %body{ class: [sub, controller_name, action_name] } + %body{ class: [sub, controller_name, action_name, params[:tag]] } %header.top = image_tag 'baby_gnu_adl.png', alt: '', class: :logo diff --git a/app/views/pages/_search.haml b/app/views/pages/_search.haml index d2945b5a..6d89d029 100644 --- a/app/views/pages/_search.haml +++ b/app/views/pages/_search.haml @@ -2,8 +2,18 @@ .digest - if params[:tag].present? %span.tag - %em.fa.fa-tag - = params[:tag] + - if params[:tag].include? 'libre-en-fete' + %a(href='https://www.libre-en-fete.net') + = image_tag 'lef.png', width: '180', height: '60', + alt: 'Libre en Fete', style: 'vertical-align: middle' + - elsif params[:tag].include? 'linux-presentation-day' + %a(href='http://www.linux-presentation-day.org') + = image_tag 'linux-presentation-day.png', + width: '150', height: '75', alt: 'Linux presentation day', + style: 'vertical-align: middle' + - else + %em.fa.fa-tag + = params[:tag] %a(href="?tag=") %em.fa.fa-times diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index bf0af17a..0e5f7058 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -1,3 +1,15 @@ +- if params[:id].include? 'libre-en-fete' + Ces événements s'inscrivent dans le cadre de + %a(href='https://www.libre-en-fete.net') + = image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete', + style: 'vertical-align: middle' +- elsif params[:id].include? 'linux-presentation-day' + Ces événements s'inscrivent dans le cadre de + %a(href='http://www.linux-presentation-day.org') + = image_tag 'linux-presentation-day.png', + width: '150', height: '75', alt: 'Linux presentation day', + style: 'vertical-align: middle' + %h2 %em.fa.fa-tag = title params[:id] @@ -65,8 +77,6 @@ = link_to event do - if event.locality? %em.locality.fa-li.fa.fa-globe - - elsif event.tags.any? { |t| t.name.include? 'libre-en-fete' } - = image_tag 'lef-small.png', alt: 'LEF', width: 16, height: 16 %em.city{ title: event.address }= event.city = event.title .date= display_date event