diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee index c57146a..10cab4e 100644 --- a/app/assets/javascripts/public.js.coffee +++ b/app/assets/javascripts/public.js.coffee @@ -120,12 +120,6 @@ $(document).ready -> @resize = () -> - petition_margin = (($(".petition_3 .bandeau").height()-$(".petition_3 .petition").height())/ 2 - 30) - - if petition_margin < 0 - petition_margin = 0 - - $(".petition_3 .petition").css('margin-top': petition_margin+'px') top = $("#menu_top_container").outerHeight() diff --git a/app/assets/stylesheets/pages/_public_menu_items.scss b/app/assets/stylesheets/pages/_public_menu_items.scss index 8e5c2d7..76589cd 100644 --- a/app/assets/stylesheets/pages/_public_menu_items.scss +++ b/app/assets/stylesheets/pages/_public_menu_items.scss @@ -34,6 +34,8 @@ .numbers{ background-color: #cc4b14; padding: 30px 0px; + + } .center_programme { @@ -273,5 +275,16 @@ } .numbers { padding: 30px 20px; + + text-align:center; + + .chiffre{ + font-size:25px ; + } + .label-chiffre{ + font-size:20px ; + padding-left:3px !important; + + } } } diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index 3017571..75653c5 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -8385,8 +8385,8 @@ img{ .no-mobile{ display:none; } - - + + .columns{ float:none; width:auto !important; @@ -8450,8 +8450,8 @@ img{ } .right_intro{ - text-align:left; - padding:5px 30px; + + padding:0; } @@ -8567,6 +8567,124 @@ img{ } } + + .inline_check_boxes{ + span{ + display:block; + } + + strong{ + display:block; + margin-bottom:5px; + } + } + + .row_home, .right_intro{ + text-align:center; + } + + + + .row1{ + .block_intro:last-child{ + padding-bottom:0 !important; + } + } + + .row2{ + .block_intro:first-child{ + padding-top:0 !important; + } + } + + .circuit{ + + h3{ + text-align:center; + display:block; + } + .absolute_logo{ + float: none; + text-align:center; + margin: 10px auto; + display: block; + position: static; + height: 100px; + margin-top: 20px; + + padding:0; + + img{ + vertical-align: middle; + } + + + } + + .block_info{ + display:block; + text-align:center; + padding-bottom:5px; + margin-right:0; + } + + } + + .circuit_show{ + .localisation{ + display:block; + text-align:center; + span{ + display:block; + } + } + + .circuit_img{ + width:auto; + float:none; + margin-bottom:20px; + } + + .info_lien{ + margin-bottom:0; + } + + .block_info{ + display:block; + text-align:center; + padding-bottom:5px; + margin-right:0; + } + + + .right{ + float:none; + text-align:center; + } + } + + + + .primes{ + .render_block{ + padding:0 15px; + .new_btn{ + margin-bottom:10px; + } + + img{ + width:auto !important; + margin:0 !important; + } + } + } + + .m_event{ + .right_roulage{ + text-align:center; + float:none; + } + } } .country_icon{ diff --git a/app/models/m_odr_product_size.rb b/app/models/m_odr_product_size.rb index 64c829a..21d7000 100644 --- a/app/models/m_odr_product_size.rb +++ b/app/models/m_odr_product_size.rb @@ -3,6 +3,8 @@ class MOdrProductSize < ApplicationRecord acts_as_csv_import :fields => [:name, :m_odr_product_id, :position, :sap] + default_scope { order(name: :asc) } + def member_label if self.m_odr_product "#{self.m_odr_product.name} - #{self.name} - #{self.position}" diff --git a/app/views/public/circuits/_circuit.html.haml b/app/views/public/circuits/_circuit.html.haml index c26d979..89d476e 100644 --- a/app/views/public/circuits/_circuit.html.haml +++ b/app/views/public/circuits/_circuit.html.haml @@ -13,7 +13,7 @@ .desc -if circuit.logo .absolute_logo - =image_tag (circuit.logo.file.large.medium.url ) + =image_tag(circuit.logo.file.large.medium.url, :class => "vertical_center") .titre_list %h3=circuit.name diff --git a/app/views/public/circuits/show.html.haml b/app/views/public/circuits/show.html.haml index 8b18e65..877009a 100644 --- a/app/views/public/circuits/show.html.haml +++ b/app/views/public/circuits/show.html.haml @@ -51,16 +51,18 @@ =# =@circuit.address2 =@circuit.address3 if @circuit.address3? - =@circuit.cp - =@circuit.city + %span + =@circuit.cp + + =@circuit.city - -if @circuit.country? and @circuit.country.to_s != "FR" - ="-" + -if @circuit.country? and @circuit.country.to_s != "FR" + ="-" - =image_tag "/countries/#{@circuit.country.downcase}.png", :class => "country_icon" + =image_tag "/countries/#{@circuit.country.downcase}.png", :class => "country_icon" - = ISO3166::Country[@circuit.country].translations["fr"] + = ISO3166::Country[@circuit.country].translations["fr"] .clear .clear diff --git a/app/views/public/m_events/_m_event.html.haml b/app/views/public/m_events/_m_event.html.haml index 8148ef0..241ccd3 100644 --- a/app/views/public/m_events/_m_event.html.haml +++ b/app/views/public/m_events/_m_event.html.haml @@ -29,11 +29,24 @@ Organisé par %strong=link_to m_event.organisateur.name, public_organisateur_path(:id => m_event.organisateur.slug), :target => "_blank" if m_event.organisateur - -if m_event.description? - %br - =link_to "+ d'infos", "#", :onclick => "$(this).next('.details').toggle();return false;" - .details{:style => "display:none;"}=simple_format m_event.description - + .no-mobile + -if m_event.description? + %br + =link_to "+ d'infos", "#", :onclick => "$(this).next('.details').toggle();return false;" + .details{:style => "display:none;"}=simple_format m_event.description + + .mobile-block.mobile_resp + .details + -if m_event.description.size > 80 + %p + =simple_format m_event.description.truncate(80) + + =link_to "+ d'infos", "#", :onclick => "$(this).closest('.desc').find('.mobile_detail').show();$(this).closest('.desc').find('.mobile_resp').hide();return false;" + -else + =simple_format m_event.description + + .mobile_detail{:style => "display:none;"} + .details=simple_format m_event.description %br %br .right_roulage.right diff --git a/app/views/public/m_events/_search.html.haml b/app/views/public/m_events/_search.html.haml index f86f367..421e9ce 100644 --- a/app/views/public/m_events/_search.html.haml +++ b/app/views/public/m_events/_search.html.haml @@ -35,9 +35,9 @@ -["Ecole / Stage de pilotage", "Roulage encadré", "Roulage libre"] .each do |pdt| - - = check_box_tag :"search[m_event_type_title][]", pdt, (true if params[:search][:m_event_type_title].include?(pdt.to_s)), {:id => "p_document_type_ids_#{pdt.to_slug}"} - = label_tag "p_document_type_ids_"+pdt.to_slug, pdt + %span + = check_box_tag :"search[m_event_type_title][]", pdt, (true if params[:search][:m_event_type_title].include?(pdt.to_s)), {:id => "p_document_type_ids_#{pdt.to_slug}"} + = label_tag "p_document_type_ids_"+pdt.to_slug, pdt .clear diff --git a/app/views/public/my_account/index.html.haml b/app/views/public/my_account/index.html.haml index e4a6877..ccd248b 100644 --- a/app/views/public/my_account/index.html.haml +++ b/app/views/public/my_account/index.html.haml @@ -130,8 +130,8 @@ - -c = current_p_customer.m_odr_primes.where(:state => ["En attente de roulage", "Virement envoyé"]).count - -ca = current_p_customer.m_odr_primes.where(:state => ["En attente de roulage"]).count + -c = current_p_customer.m_odr_primes.where(:state => ["En attente de roulage", "Virement envoyé"]).where("created_at >= ? or created_at <= ?", Date.today.beginning_of_year, Date.today.end_of_year).count + -ca = current_p_customer.m_odr_primes.where(:state => ["En attente de roulage"]).where("created_at >= ? or created_at <= ?", Date.today.beginning_of_year, Date.today.end_of_year).count -if c > 0 %br %br @@ -150,9 +150,11 @@ =c -if c > 1 - primes obtenues sur 5 pour 2020 + primes obtenues sur 5 pour + = Date.today.year -else - prime obtenue sur 5 pour 2020 + prime obtenue sur 5 pour + = Date.today.year -if ca > 1 (dont @@ -165,7 +167,7 @@ -if current_p_customer.m_odr_primes.count > 0 %table.table - =render current_p_customer.m_odr_primes + =render current_p_customer.m_odr_primes.where("created_at >= ? or created_at <= ?", Date.today.beginning_of_year, Date.today.end_of_year) -else .empty