From e11eb00c1e19681448f8c64544324188eec9f4b6 Mon Sep 17 00:00:00 2001 From: echarp Date: Wed, 24 Apr 2019 21:10:22 +0200 Subject: [PATCH] Ref #143 The iconic flower is back in tag listings --- app/assets/stylesheets/tags.sass | 4 ++++ app/views/tags/_context.html.haml | 8 +++++--- app/views/tags/show.html.haml | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/tags.sass b/app/assets/stylesheets/tags.sass index 481ad568..941baf07 100644 --- a/app/assets/stylesheets/tags.sass +++ b/app/assets/stylesheets/tags.sass @@ -50,3 +50,7 @@ ul.ui-autocomplete li .ui-state-active margin: 0 background-color: #F0F8FF + +body.tags .event[class*='libre-en-fete-'] + h3:before, & > a:before + content: url(lef-small.png) diff --git a/app/views/tags/_context.html.haml b/app/views/tags/_context.html.haml index 266b73c6..42023789 100644 --- a/app/views/tags/_context.html.haml +++ b/app/views/tags/_context.html.haml @@ -1,13 +1,15 @@ -# Used in pages header, event.show and tag.show -- if tags.include? 'libre-en-fete' - = t '.link' if %w[show edit].include? action_name +- if tags.to_s.include? 'libre-en-fete' + - if controller_name != 'tags' && %w[show edit].include?(action_name) + = t '.link' %a(href='https://www.libre-en-fete.net') = image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en FĂȘte', style: 'vertical-align: middle' - elsif tags.include? 'linux-presentation-day' - = t '.link' if %w[show edit].include? action_name + - if controller_name != 'tags' && %w[show edit].include?(action_name) + = t '.link' %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' diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index 6108df15..a267c652 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -39,7 +39,7 @@ GeoJSON - @events_future.order('start_time asc').each do |event| - %article.event + %article.event{ class: event.tag_list } %h3 = link_to event do %em.city= event.city @@ -63,7 +63,7 @@ = t '.count', count: @events_past.count %ul.fa-ul - @events_past.order('start_time desc').each do |event| - %li + %li.event{ class: event.tag_list } = link_to event do - if event.locality? %em.locality.fa-li.fa.fa-globe