This commit is contained in:
Nicolas Bally 2020-06-14 16:50:39 +02:00
parent 77198d7ba3
commit 9edf9a72ec
25 changed files with 148 additions and 82 deletions

View File

@ -8,7 +8,7 @@
#= require event_form #= require event_form
#= require bootstrap #= require bootstrap
#= require ./vendor/jquery.mask
# require vendor/jquery-sortable # require vendor/jquery-sortable
#= require vendor/jquery.event.drag.js #= require vendor/jquery.event.drag.js
#= require vendor/bootstrap-slider #= require vendor/bootstrap-slider

View File

@ -5652,18 +5652,21 @@ div.modeles_similaires {
font-family: 'Fugaz One', cursive; font-family: 'Fugaz One', cursive;
text-transform: uppercase; text-transform: uppercase;
} }
.absolute_logo {
position: absolute;
top: 0px;
right: 0px;
background-color: #fff;
padding: 5px;
img {
max-height: 35px;
width: auto;
}
}
} }
.absolute_logo {
position: absolute;
top: 0px;
right: 0px;
background-color: #fff;
padding: 5px;
img {
max-height: 35px;
width: auto;
}
}
.img_lien { .img_lien {
a { a {
position: relative; position: relative;
@ -10193,6 +10196,17 @@ a.sp-video {
background-color:#ffe500; background-color:#ffe500;
} }
&.new_btn_red{
background-color:#CC4B14;
}
&.new_btn_big{
padding:10px 20px;
}
} }
h1{ h1{
@ -10214,10 +10228,15 @@ a.sp-video {
.absolute_logo{ .absolute_logo{
background:white; background:white;
top:0; float:right;
right:0; padding:5px;
position:relative;
top:-5px;
right:-5px;
margin-left:5px;
img{ img{
height:30px; max-height:100px;
max-width:150px;
} }
} }
h3{ h3{
@ -10274,7 +10293,8 @@ a.sp-video {
margin-bottom:30px; margin-bottom:30px;
} }
.logo{ .logo{
height:40px; max-width:150px;
max-height:100px;
} }
.circuit_img{ .circuit_img{

View File

@ -4,7 +4,7 @@ class Public::CircuitsController < ApplicationController
def index def index
@circuits = Circuit.all @circuits = Circuit.order("name ASC").all
@circuits_active = true @circuits_active = true
end end

View File

@ -27,7 +27,7 @@ class Public::ParticularsController < ApplicationController
def edit def edit
@particular = current_p_customer.particulars.find(params[:id]) @particular = current_p_customer.particular
#@particular.force_validation = true #@particular.force_validation = true
end end

View File

@ -3,7 +3,7 @@ class MOdrFileProduct < ApplicationRecord
belongs_to :m_odr_product belongs_to :m_odr_product
belongs_to :m_odr_product_size belongs_to :m_odr_product_size
validates :qte, :presence => true validates :qte, :presence => true, numericality: { greater_than: 0}
before_save do before_save do
if self.m_odr_product_size if self.m_odr_product_size
self.m_odr_product = self.m_odr_product_size.m_odr_product self.m_odr_product = self.m_odr_product_size.m_odr_product

View File

@ -69,7 +69,7 @@ class PCustomer < ApplicationRecord
validates :email, :presence => true, :uniqueness => true validates :email, :presence => true, :uniqueness => true
validates :cgv, :presence => true, :if => :require_cgv validates :cgv, :presence => true, :if => :require_cgv
validates :rgpd, :presence => true, :if => :require_cgv #validates :rgpd, :presence => true, :if => :require_cgv
validates :past_id, :uniqueness => true, :if => :imported validates :past_id, :uniqueness => true, :if => :imported

View File

@ -14,5 +14,5 @@
%td Rib %td Rib
%td %td
-if @m_odr_prime.p_customer and @m_odr_prime.p_customer.valid_m_odr_rep_rib -if @m_odr_prime.p_customer and @m_odr_prime.p_customer.valid_m_odr_rep_rib
=@m_odr_prime.p_customer.valid_m_odr_rep_rib.iban =@m_odr_prime.p_customer.valid_m_odr_rep_rib.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
%br=@m_odr_prime.p_customer.valid_m_odr_rep_rib.bic %br=@m_odr_prime.p_customer.valid_m_odr_rep_rib.bic

View File

@ -3,7 +3,8 @@
.content .content
=f.inputs do =f.inputs do
= f.hidden_field :p_customer_id = f.hidden_field :p_customer_id
= f.input :iban, :label => "iban :" = f.input :iban, :label => "iban :" , :input_html => {:class => "iban_input"}
= f.input :bic, :label => "bic :" = f.input :bic, :label => "bic :"
%hr %hr
= f.input :admin_ok, :label => "Décision :", :collection => [["Validé",true], ["Refusé", false]], :as => :select = f.input :admin_ok, :label => "Décision :", :collection => [["Validé",true], ["Refusé", false]], :as => :select
@ -16,4 +17,7 @@
.actions=f.submit "sauvegarder", :class => "btn btn-primary" .actions=f.submit "sauvegarder", :class => "btn btn-primary"
:javascript
$('.iban_input').mask('SSAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AA', {placeholder: '____ ____ ____ ____ ____ ____ ____ ____ __'});

View File

@ -2,6 +2,10 @@
%tr#m_odr_rep_rib_row{:id => m_odr_rep_rib.id} %tr#m_odr_rep_rib_row{:id => m_odr_rep_rib.id}
-tr = {} -tr = {}
-tr[:iban] = capture do
%td
=m_odr_rep_rib.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
-tr[:p_customer] = capture do -tr[:p_customer] = capture do
%td %td
=link_to m_odr_rep_rib.p_customer.show_name, [:admin, m_odr_rep_rib.p_customer] if m_odr_rep_rib.p_customer =link_to m_odr_rep_rib.p_customer.show_name, [:admin, m_odr_rep_rib.p_customer] if m_odr_rep_rib.p_customer

View File

@ -103,7 +103,7 @@ RIB :
%tr %tr
%td IBAN %td IBAN
%td %td
=m_odr_rep_rib.iban =m_odr_rep_rib.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
%tr %tr
%td BIC %td BIC

View File

@ -1,6 +1,6 @@
%tr#p_bank_account{:id => p_bank_account.id} %tr#p_bank_account{:id => p_bank_account.id}
%td= p_bank_account.p_bank.name %td= p_bank_account.p_bank.name
%td= p_bank_account.iban %td= p_bank_account.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
%td= p_bank_account.bic %td= p_bank_account.bic
%td= p_bank_account.compta_cpt %td= p_bank_account.compta_cpt
%td= p_bank_account.compta_journ %td= p_bank_account.compta_journ

View File

@ -53,8 +53,8 @@
=raw '<meta property="twitter:description" content="'+((@description and @description != "") ? @description : "En savoir plus :").to_s+'"/>' =raw '<meta property="twitter:description" content="'+((@description and @description != "") ? @description : "En savoir plus :").to_s+'"/>'
=raw '<meta property="twitter:title" content="'+@twitter_title.to_s+'"/>' =raw '<meta property="twitter:title" content="'+@twitter_title.to_s+'"/>'
=raw '<meta property="twitter:site" content="@onevoiceanimal"/>' =raw '<meta property="twitter:site" content=""/>'
=raw '<meta property="twitter:creator" content="@onevoiceanimal"/>' =raw '<meta property="twitter:creator" content=""/>'
=raw '<meta property="twitter:url" content="'+@social_url+'"/>' =raw '<meta property="twitter:url" content="'+@social_url+'"/>'
@ -195,13 +195,11 @@
%h3.footer-section__title.ui-title-inner Liens utiles %h3.footer-section__title.ui-title-inner Liens utiles
%ul.footer-list.footer-list_columns.list-unstyled %ul.footer-list.footer-list_columns.list-unstyled
%li %li
%a{:accesskey => "3", :href => "https://www.mamotosurcircuit.com/4-plan-site.html", :title => "Plan du site"} Plan du site %a{:accesskey => "3", :href => "/fr/plan-site.html", :title => "Plan du site"} Plan du site
%li %li
%a{:href => "https://www.mamotosurcircuit.com/108-partenaires.html", :title => "Partenaires"} Partenaires %a{:accesskey => "8", :href => "/fr/mentions-legales.html", :title => "Mentions légales"} Mentions légales
%li %li
%a{:accesskey => "8", :href => "https://www.mamotosurcircuit.com/5-mentions-legales.html", :title => "Mentions légales"} Mentions légales %a{:accesskey => "8", :href => "/fr/conditions-generales-utilisation.html", :title => "Conditions générales d'utilisation"} Conditions générales d'utilisation
%li
%a{:accesskey => "8", :href => "https://www.mamotosurcircuit.com/123-conditions-generales-utilisation.html", :title => "Conditions générales d'utilisation"} Conditions générales d'utilisation
.col-md-4 .col-md-4
%section.footer-section %section.footer-section
%h3.footer-section__title.ui-title-inner Nous contacter %h3.footer-section__title.ui-title-inner Nous contacter

View File

@ -5,8 +5,9 @@
=link_to [:public, circuit], :class => "circuit" do =link_to [:public, circuit], :class => "circuit" do
-img = "" -img = ""
-img = circuit.logo.file.large.medium.url if circuit.logo
-img = circuit.image_file.file.large.medium.url if circuit.image_file -img = circuit.image_file.file.large.medium.url if circuit.image_file
.img{:style => ("background-image:url('#{img}');" if img)} .img{:style => ("background-image:url('#{img}');" if img).to_s+(" background-size:contain;" if !circuit.image_file ).to_s}
.desc .desc
@ -17,8 +18,14 @@
.titre_list .titre_list
%h3=circuit.name %h3=circuit.name
.details .details
=simple_format circuit.description -if circuit.description.size > 250
%p
=circuit.description.truncate(250)
%u
+ d'infos
-else
=simple_format circuit.description
.info_lien .info_lien
.block_info .block_info
=circuit.cp =circuit.cp

View File

@ -6,13 +6,7 @@
%h1 %h1
=@circuit.name =@circuit.name
%p.localisation
<img src="https://www.mamotosurcircuit.com/images/interface/picto_pointer.png">
=@circuit.address2
=@circuit.address3 if @circuit.address3?
=@circuit.cp
=@circuit.city
=@circuit.country
.clear .clear
@ -24,12 +18,26 @@
=simple_format @circuit.description =simple_format @circuit.description
%br %br
-if @circuit.website?
.right .right
=link_to "Site officiel", @circuit.website, :target => "_blank", :class => "new_btn" -if @circuit.website?
=link_to "Site officiel", @circuit.website, :target => "_blank", :class => "new_btn"
-if @circuit.facebook?
=link_to raw(ic(:'facebook-f')+"   Page Facebook"), @circuit.facebook, :target => "_blank", :class => "new_btn"
.clear .clear
.clear .clear
%br
%br
%p.localisation
<img src="https://www.mamotosurcircuit.com/images/interface/picto_pointer.png">
=@circuit.address2
=@circuit.address3 if @circuit.address3?
=@circuit.cp
=@circuit.city
=@circuit.country
.info_lien .info_lien

View File

@ -37,7 +37,7 @@
%br %br
%br %br
.right_roulage.right .right_roulage.right
=link_to "Réserver (site officiel)", m_event.link.to_s, :target => "_blank" =link_to "Réserver", m_event.link.to_s, :target => "_blank"
.clear .clear

View File

@ -1,7 +1,7 @@
%tr.m_odr_file_product_form.field %tr.m_odr_file_product_form.field
%td %td
= form.input :m_odr_product_size, :label => "Produit :", :collection => option_groups_from_collection_for_select(MOdrProduct.all, :m_odr_product_sizes, :name, :id, :name), :as => :select, :include_blank => false, :member_label => :member_label = form.input :m_odr_product_size, :label => "Produit :", :collection => option_groups_from_collection_for_select(MOdrProduct.all, :m_odr_product_sizes, :name, :id, :name), :as => :select, :include_blank => false, :member_label => :member_label, :include_blank => "Choisissez le profil et la dimension"
&nbsp; &nbsp;
%td{:style => "width:60px;"} %td{:style => "width:60px;"}
= form.input :qte, :label => "Qté :" = form.input :qte, :label => "Qté :"

View File

@ -1,5 +1,5 @@
%tr.m_odr_file_roulage_form.field %tr.m_odr_file_roulage_form.field
%td= form.input :date, :label => "Date :" , :as => :string , :input_html => {:autocomplete => "off", :class => "year_date_picker"} %td= form.input :date, :label => "Date de roulage :" , :as => :string , :input_html => {:autocomplete => "off", :class => "year_date_picker"}
=#%td=# form.input :m_event_id, :label => "Journée de roulage :", :as => :date, :collection => MEvent.all, :member_label => :member_label, :as => :select =#%td=# form.input :m_event_id, :label => "Journée de roulage :", :as => :date, :collection => MEvent.all, :member_label => :member_label, :as => :select

View File

@ -1,10 +1,10 @@
.center_content{:style => "max-width:700px;"} .center_content{:style => "max-width:700px;"}
-if @m_odr_file.m_odr_file_type_id == 1 -if @m_odr_file.m_odr_file_type_id == 1
%h1 Ajouter une facture de roulage %h1 Envoyer une facture de roulage
-elsif @m_odr_file.m_odr_file_type_id == 2 -elsif @m_odr_file.m_odr_file_type_id == 2
%h1 Ajouter une facture d'achat %h1 Envoyer une facture de pneus
=render :partial => "form" =render :partial => "form"
%br %br

View File

@ -14,5 +14,5 @@
%td Rib %td Rib
%td %td
-if @m_odr_prime.p_customer and @m_odr_prime.p_customer.valid_m_odr_rep_rib -if @m_odr_prime.p_customer and @m_odr_prime.p_customer.valid_m_odr_rep_rib
=@m_odr_prime.p_customer.valid_m_odr_rep_rib.iban =@m_odr_prime.p_customer.valid_m_odr_rep_rib.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
%br=@m_odr_prime.p_customer.valid_m_odr_rep_rib.bic %br=@m_odr_prime.p_customer.valid_m_odr_rep_rib.bic

View File

@ -3,7 +3,13 @@
.content .content
=f.inputs do =f.inputs do
= f.hidden_field :p_customer_id = f.hidden_field :p_customer_id
= f.input :iban, :label => "Iban :" = f.input :iban, :label => "Iban :" , :input_html => {:class => "iban_input"}
:javascript
$('.iban_input').mask('SSAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA AA', {
placeholder: '____ ____ ____ ____ ____ ____ ____ ____ __'
});
= f.input :bic, :label => "Bic :" = f.input :bic, :label => "Bic :"
.actions=f.submit "sauvegarder" #, :class => "btn btn-primary" .actions=f.submit "sauvegarder" #, :class => "btn btn-primary"

View File

@ -1,7 +1,7 @@
%tr#m_odr_rep_rib_row{:id => m_odr_rep_rib.id} %tr#m_odr_rep_rib_row{:id => m_odr_rep_rib.id}
%td %td
=m_odr_rep_rib.iban =m_odr_rep_rib.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
%td %td
=m_odr_rep_rib.bic =m_odr_rep_rib.bic
%td %td

View File

@ -67,7 +67,7 @@
.rib .rib
IBAN : IBAN :
=rib.iban =rib.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
%br %br
BIC : BIC :
=rib.bic =rib.bic
@ -84,7 +84,7 @@
.rib .rib
IBAN : IBAN :
=rib.iban =rib.iban.to_s.gsub(/(.{4})(?=.)/, '\1 \2')
%br %br
BIC : BIC :
=rib.bic =rib.bic
@ -97,17 +97,25 @@
RIB non renseigné RIB non renseigné
.rib= link_to "Ajouter mon rib", new_public_m_odr_rep_rib_path() .rib= link_to "Ajouter mon rib", new_public_m_odr_rep_rib_path()
.clear
.doc_pannel
%br
%br
.right .right
=c = current_p_customer.m_odr_primes.where(:state => "Virement envoyé").count
-if c > 1
primes obtenues sur 5 pour 2020
-else
prime obtenue sur 5 pour 2020
%h3 Mes primes %h3
Mes primes :
%span{:style => "font-size:16px;"}
=c = current_p_customer.m_odr_primes.where(:state => "Virement envoyé").count
-if c > 1
primes obtenues sur 5 pour 2020
-else
prime obtenue sur 5 pour 2020
-if current_p_customer.m_odr_primes.count > 0 -if current_p_customer.m_odr_primes.count > 0
%table.table %table.table
=render current_p_customer.m_odr_primes =render current_p_customer.m_odr_primes
@ -129,8 +137,9 @@
Vous n'avez pas encore déposé de facture d'achat Vous n'avez pas encore déposé de facture d'achat
.align_center .align_center
= link_to 'Envoyer une facture d\'achat', new_public_m_odr_file_path(:m_odr_file_type_id => 2), :class => "new_btn" = link_to 'Envoyer une facture de pneus', new_public_m_odr_file_path(:m_odr_file_type_id => 2), :class => "new_btn"
.doc_pannel %br
%br
%h3 Mes factures de roulage %h3 Mes factures de roulage
-if m_odr_files = current_p_customer.m_odr_files.where(:m_odr_file_type_id => 1) and m_odr_files.count > 0 -if m_odr_files = current_p_customer.m_odr_files.where(:m_odr_file_type_id => 1) and m_odr_files.count > 0
%table.table %table.table
@ -142,8 +151,6 @@
.align_center .align_center
= link_to 'Envoyer une facture de roulage', new_public_m_odr_file_path(:m_odr_file_type_id => 1), :class => "new_btn" = link_to 'Envoyer une facture de roulage', new_public_m_odr_file_path(:m_odr_file_type_id => 1), :class => "new_btn"
=link_to "Découvrir les avantages du Dunlop Sponsor Program", "/fr/primes.html"
%br %br
%br %br
%br %br

View File

@ -16,13 +16,7 @@
%br %br
=@organisateur.name =@organisateur.name
%p.localisation{:style => "text-align:center !important;"}
=#@organisateur.address2
=#@organisateur.address3 if @organisateur.address3?
=@organisateur.cp
=@organisateur.city
=@organisateur.country
.clear .clear
%br %br
@ -45,9 +39,17 @@
-if @organisateur.facebook? -if @organisateur.facebook?
=link_to "Page Facebook", @organisateur.facebook, :target => "_blank", :class => "new_btn" =link_to raw(ic(:'facebook-f')+"   Page Facebook"), @organisateur.facebook, :target => "_blank", :class => "new_btn"
%p.localisation{:style => "text-align:center !important;"}
=#@organisateur.address2
=#@organisateur.address3 if @organisateur.address3?
=@organisateur.cp
=@organisateur.city
=@organisateur.country
.clear .clear
.clear .clear

View File

@ -31,7 +31,7 @@
%p{:style => "text-align:center"} %p{:style => "text-align:center"}
= submit_tag "Se connecter", :class => "btn btn-primary" = submit_tag "Se connecter", :class => "new_btn new_btn_red new_btn_big"
%p{:style => "text-align:center"} %p{:style => "text-align:center"}
=link_to qit("lost-password","Mot de passe perdu ?"), password_reset_public_p_customer_auths_path(:for_order => params[:for_order]), :class => "shop" =link_to qit("lost-password","Mot de passe perdu ?"), password_reset_public_p_customer_auths_path(:for_order => params[:for_order]), :class => "shop"
@ -43,5 +43,5 @@
%br %br
%br %br
%center %center
=link_to "Créer mon compte", new_public_p_customer_path ,:class => "new_btn" =link_to "Créer mon compte", new_public_p_customer_path ,:class => "new_btn new_btn_red new_btn_big"
=#render :partial => "public/p_customers/new_form" =#render :partial => "public/p_customers/new_form"

View File

@ -5,10 +5,10 @@
=f.inputs do =f.inputs do
=f.hidden_field :valid_public =f.hidden_field :valid_public
=f.input :parent_code, :label => "Code ambassadeur :" =f.input :parent_code, :label => "Code ambassadeur"
=f.input :email, :label => "Email :" =f.input :email, :label => "Email"
=f.input :password, :label => "Mot de passe :", :as => :password =f.input :password, :label => "Mot de passe", :as => :password
=f.semantic_fields_for :particulars do |form| =f.semantic_fields_for :particulars do |form|
=render :partial => "public/particulars/inner_form", :locals => {:form => form} =render :partial => "public/particulars/inner_form", :locals => {:form => form}
@ -21,8 +21,18 @@
.col-sm-4 .col-sm-4
= f.input :circuit_3_id, :label => "Circuit préféré 3 :", :include_blank => true, :collection => Circuit.all, :as => :select, :member_label => :member_label = f.input :circuit_3_id, :label => "Circuit préféré 3 :", :include_blank => true, :collection => Circuit.all, :as => :select, :member_label => :member_label
=f.input :cgv, :label => "Je reconnais avoir pris connaissance des conditions générales d'utilisation du site" =f.input :cgv, :label => raw("Je reconnais avoir pris connaissance des <a href='/fr/conditions-generales-utilisation.html' target='_blank' >conditions générales d'utilisation</a> du site")
=f.input :rgpd, :label => "J'accepte que mes coordonnées soient transmises à Dunlop et ses partenaires afin de pouvoir bénéficier de toutes les primes et offres présentes sur le site" =f.input :rgpd, :label => "J'accepte que mes coordonnées soient transmises à Dunlop et ses partenaires afin de pouvoir bénéficier de toutes les primes et offres présentes sur le site"
%br
=f.submit "Créer mon compte", :class => "btn btn-primary" %center=f.submit "Créer mon compte", :class => "new_btn new_btn_red new_btn_big"
:scss
.control-label{
input{
position:relative;
top:5px;
}
}