From 9fa5bd664647b76b66df86a804e466bfeaf4decb Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 15 Jul 2020 14:31:05 +0200 Subject: [PATCH] drapeaux --- app/views/public/organisateurs/_organisateur.html.haml | 9 +++++++-- app/views/public/organisateurs/show.html.haml | 9 ++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/views/public/organisateurs/_organisateur.html.haml b/app/views/public/organisateurs/_organisateur.html.haml index 7d61b9d..dde299f 100644 --- a/app/views/public/organisateurs/_organisateur.html.haml +++ b/app/views/public/organisateurs/_organisateur.html.haml @@ -22,11 +22,16 @@ .info_lien .block_info + + + -if organisateur.country? and organisateur.country.to_s == "FR" + =image_tag "/countries/#{organisateur.country.downcase}.png", :class => "country_icon" =organisateur.cp =organisateur.city + -if organisateur.country? and organisateur.country.to_s != "FR" ="-" =image_tag "/countries/#{organisateur.country.downcase}.png", :class => "country_icon" - =ISO3166::Country[organisateur.country].translations["fr"] + =country = ISO3166::Country[organisateur.country].translations["fr"] - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/public/organisateurs/show.html.haml b/app/views/public/organisateurs/show.html.haml index 1c851c4..18f982f 100644 --- a/app/views/public/organisateurs/show.html.haml +++ b/app/views/public/organisateurs/show.html.haml @@ -47,7 +47,14 @@ =@organisateur.cp =@organisateur.city - =@organisateur.country + + + -if @organisateur.country? and @organisateur.country.to_s != "FR" + ="-" + + =image_tag "/countries/#{@organisateur.country.downcase}.png", :class => "country_icon" + + = ISO3166::Country[@organisateur.country].translations["fr"] .clear .clear