This commit is contained in:
Nicolas Bally 2020-06-24 15:13:44 +02:00
parent 2a5e3969ee
commit e7c0e126cc
44 changed files with 493 additions and 130 deletions

View File

@ -695,3 +695,6 @@ $(document).on "click", "#menu_item_informations h4", ->
return return

View File

@ -1242,7 +1242,6 @@ body {
.avantage { .avantage {
background-image: url(http://mamotosurcircuit.com/images/interface/slide5.jpg); background-image: url(http://mamotosurcircuit.com/images/interface/slide5.jpg);
background-size: cover; background-size: cover;
background-position: 0px -100px;
padding: 70px 0px; padding: 70px 0px;
position: relative; position: relative;
text-align: center; text-align: center;
@ -10226,6 +10225,8 @@ a.sp-video {
background:black; background:black;
display:block; display:block;
min-height:180px;
.absolute_logo{ .absolute_logo{
background:white; background:white;
float:right; float:right;
@ -10293,8 +10294,15 @@ a.sp-video {
margin-bottom:30px; margin-bottom:30px;
} }
.logo{ .logo{
max-width:150px; max-width:250px;
max-height:100px; max-height:100px;
position:absolute;
right:10px;
top:-30px;
background:white;
padding:20px ;
box-shadow:0 0 5px rgba(0,0,0,0.5);
} }
.circuit_img{ .circuit_img{
@ -10304,11 +10312,12 @@ a.sp-video {
} }
.info_lien{ .info_lien{
text-align:right; text-align:left;
background:black; background:black;
color:white; color:white;
padding:10px 20px; padding:10px 20px;
margin-bottom:30px; margin-bottom:30px;
min-height:50px;
} }
} }
@ -10320,7 +10329,7 @@ a.sp-video {
margin:20px 0; margin:20px 0;
background:black; background:black;
display:block; display:block;
min-height:180px;
.info_lien{ .info_lien{
color:#cc4b14 color:#cc4b14

View File

@ -0,0 +1,76 @@
# -*- encoding : utf-8 -*-
class Admin::DepartementFrancesController < ApplicationController
layout "admin"
before_action :auth_admin
before_action :admin_space
def admin_space
@admin_space = "default"
end
def index
@departement_frances = DepartementFrance.all
@departement_frances = sort_by_sorting(@departement_frances, "id DESC")
respond_to do |format|
format.html{
params[:search][:per_page] = params[:search][:per_page] || 100
per_page = params[:search][:per_page]
page = (params[:page] and params[:page] != "") ? params[:page] : 1
@departement_frances = @departement_frances.page(page).per(per_page)
}
end
end
def show
@departement_france = DepartementFrance.find(params[:id])
end
def new
@departement_france = DepartementFrance.new
end
def edit
@departement_france = DepartementFrance.find(params[:id])
end
def create
@departement_france = DepartementFrance.new(params.require(:departement_france).permit!)
if @departement_france.save
else
render action: "new"
end
end
def update
@departement_france = DepartementFrance.find(params[:id])
if @departement_france.update_attributes(params.require(:departement_france).permit!)
else
render action: "edit"
end
end
def destroy
@departement_france = DepartementFrance.find(params[:id])
@departement_france.destroy
end
end

View File

@ -6,6 +6,26 @@ class Public::CircuitsController < ApplicationController
def index def index
@circuits = Circuit.order("name ASC").all @circuits = Circuit.order("name ASC").all
@circuits_active = true @circuits_active = true
if params[:search][:circuit_region_id].to_s != ""
@circuits = @circuits.where(:circuit_region_id => params[:search][:circuit_region_id])
end
if params[:search][:name].to_s != ""
@circuits = @circuits.where("name LIKE ? or city LIKE ? or cp LIKE ?","#{params[:search][:name]}%","#{params[:search][:name]}%","#{params[:search][:name]}%")
end
respond_to do |format|
format.html{
params[:search][:per_page] = params[:search][:per_page] || 10
per_page = params[:search][:per_page]
page = (params[:page] and params[:page] != "") ? params[:page] : 1
@circuits = @circuits.page(page).per(per_page)
}
end
end end

View File

@ -21,6 +21,10 @@ class Public::MOdrFilesController < ApplicationController
if @m_odr_file.m_odr_file_type_id == 2 if @m_odr_file.m_odr_file_type_id == 2
@m_odr_file.m_odr_file_products.build @m_odr_file.m_odr_file_products.build
@m_odr_file.m_odr_file_products.build
else
@m_odr_file.m_odr_file_roulages.build
end end
end end

View File

@ -4,8 +4,20 @@ class Public::OrganisateursController < ApplicationController
def index def index
@organisateurs = Organisateur.all @organisateurs = Organisateur.order(:name).all
@organisateurs_active = true @organisateurs_active = true
respond_to do |format|
format.html{
params[:search][:per_page] = params[:search][:per_page] || 10
per_page = params[:search][:per_page]
page = (params[:page] and params[:page] != "") ? params[:page] : 1
@organisateurs = @organisateurs.page(page).per(per_page)
}
end
end end

View File

@ -0,0 +1,3 @@
class DepartementFrance < ApplicationRecord
acts_as_csv_import :fields => [:num_dep, :dep_name , :region_name , :num_dep_format]
end

View File

@ -21,6 +21,12 @@ class MOdrFile < ApplicationRecord
before_create { generate_token() } before_create { generate_token() }
validates :buy_at, :presence => true, :if => :buy_at_needed?
def buy_at_needed?
true if self.m_odr_file_type_id == 2
end
after_save do after_save do
#self.p_customer.generate_prime if self.p_customer #self.p_customer.generate_prime if self.p_customer

View File

@ -3,7 +3,9 @@ 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, numericality: { greater_than: 0} #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

@ -196,7 +196,7 @@ class PCustomer < ApplicationRecord
def generate_prime def generate_prime
MOdrFileRoulage.joins(:m_odr_file).where("m_odr_file_roulages.nbr_primes_not_useds > 0").where(:m_odr_files => {:p_customer_id => self.id, :admin_ok => true}).order("date ASC").all.each do |mofr| MOdrFileRoulage.joins(:m_odr_file).where("m_odr_file_roulages.nbr_primes_useds = 0").where(:m_odr_files => {:p_customer_id => self.id, :admin_ok => true}).order("date ASC").all.each do |mofr|
mofr.generate_prime mofr.generate_prime
end end
end end

View File

@ -5,6 +5,15 @@
%td %td
=circuit.description.truncate(100) =circuit.description.truncate(100)
-tr[:cp] = capture do
%td
=d = circuit.cp.to_s[0..1]
-dep = DepartementFrance.where(:num_dep => d).first
-if dep and !circuit.circuit_region
-circuit.circuit_region = CircuitRegion.where(:name => dep.region_name).first
- circuit.save if circuit.circuit_region
-tr[:actions] = capture do -tr[:actions] = capture do
%td.actions %td.actions
= link_to i(:"trash-o"), [:admin, circuit], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true = link_to i(:"trash-o"), [:admin, circuit], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true

View File

@ -0,0 +1,16 @@
%tr#departement_france_row{:id => departement_france.id}
-tr = {}
-tr[:actions] = capture do
%td.actions
= link_to i(:"trash-o"), [:admin, departement_france], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
= link_to i(:pencil), edit_admin_departement_france_path(departement_france), :remote => true
= link_to i(:eye), admin_departement_france_path(departement_france), :remote => true
=render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => departement_france}

View File

@ -0,0 +1,15 @@
=semantic_form_for [:admin, @departement_france], :remote => true do |f|
.content
=f.inputs do
= f.input :num_dep, :label => "num_dep :"
= f.input :dep_name, :label => "dep_name :"
= f.input :region_name, :label => "region_name :"
= f.input :num_dep_format, :label => "num_dep_format :"
.actions=f.submit "sauvegarder", :class => "btn btn-primary"

View File

@ -0,0 +1,2 @@
$('#departement_frances_rows').prepend("<%= escape_javascript(render(@departement_france))%>");
close_pane_hover();

View File

@ -0,0 +1 @@
$('#departement_france_row_<%= @departement_france.id %>').remove();

View File

@ -0,0 +1 @@
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);

View File

@ -0,0 +1,15 @@
.qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_departement_france_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1
.qi_search_row
=form_tag "", :method => "get", :onsubmit => "" do
=render :partial => "qi/qi_ordered_table_search_footer", :locals => {:collection_object => @departement_frances}
=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @departement_frances}

View File

@ -0,0 +1 @@
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);

View File

@ -0,0 +1,10 @@
.qi_header
%h1
%span
.qi_row
.qi_pannel.qi_plain.padding
=debug @departement_france

View File

@ -0,0 +1,2 @@
$('#departement_france_row_<%= @departement_france.id %>').replaceWith("<%= escape_javascript(render(@departement_france))%>");
close_pane_hover();

View File

@ -6,7 +6,7 @@
= f.input :name, :label => "Nom de l'import :" = f.input :name, :label => "Nom de l'import :"
= f.input :file, :label => "file :" = f.input :file, :label => "file :"
= f.input :table_name, :label => "Table :" , :as => :select, :collection => ["p_customers", "circuits", "organisateurs", "m_odr_product_sizes", "m_odr_places", "circuit_regions", "m_events"] = f.input :table_name, :label => "Table :" , :as => :select, :collection => ["p_customers", "circuits", "organisateurs", "m_odr_product_sizes", "m_odr_places", "circuit_regions", "m_events", "departement_frances"]
-if f.object.id -if f.object.id
%table.import_csv_champs_form %table.import_csv_champs_form

View File

@ -10,6 +10,20 @@
%td %td
=m_odr_file.m_odr_file_type.name =m_odr_file.m_odr_file_type.name
-tr[:nbr_primes] = capture do
%td
=m_odr_file.m_odr_file_roulages.count if m_odr_file.m_odr_file_type_id == 1
-tr[:nbr_primes_useds] = capture do
%td
=MOdrPrime.where(:m_odr_file_roulage_id => m_odr_file.m_odr_file_roulages.ids).count if m_odr_file.m_odr_file_type_id == 1
-tr[:nbr_primes_not_useds] = capture do
%td
=(m_odr_file.m_odr_file_roulages.count - MOdrPrime.where(:m_odr_file_roulage_id => m_odr_file.m_odr_file_roulages.ids).count) if m_odr_file.m_odr_file_type_id == 1
-tr[:admin_ok] = capture do -tr[:admin_ok] = capture do
%td %td
-if m_odr_file.admin_ok -if m_odr_file.admin_ok

View File

@ -13,6 +13,12 @@
="-" ="-"
=p_customer.show_name =p_customer.show_name
-tr[:mlm_token] = capture do
%td
-if p_customer.ambassadeur
=p_customer.mlm_token
-tr[:p_commercial] = capture do -tr[:p_commercial] = capture do
%td %td

View File

@ -322,3 +322,11 @@
:javascript
$('.qi_search_row form input').keypress(function (e) {
if (e.which == 13) {
$(this).closest('form').submit();
return false; //<---- Add this line
}
});

View File

@ -1,66 +1,46 @@
-if @admin -if @admin
plan du site plan du site
-else -else
=raw "</div>" %h1 Plan du site
.plan_sub
.inner
=link_to qit("Médiathèque"), search_path(:media => true)
=link_to qit("Presse"), search_path(:press => true)
=link_to qit("Documentation"), search_path(:doc => true)
=link_to qit("Boutique"), "/fr/boutique.html"
=raw "<div class='main row-fluid'>"
.plan_body .plan_body
%ul
-MenuItem.where(:parent_id => nil, :menu_id => 1).order(:position).each do |menu_item|
-description = ""
-description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
-if menu_item_link(menu_item) and menu_item_link(menu_item) != ""
-MenuItem.where(:parent_id => nil, :menu_id => 2).order(:position).each do |menu_item| %li=menu_item_link(menu_item)
-description = ""
-description = menu_item.menu_content.description if menu_item.menu_content and menu_item.menu_content_type == "Page"
-if menu_item_link(menu_item) and menu_item_link(menu_item) != ""
%h3 %ul
=menu_item_link(menu_item) -menu_item.children.each do |menu_item|
-if menu_item_link(menu_item) and menu_item_link(menu_item) != ""
-MenuItem.where(:id => menu_item.id).each do |menu_item| %li=menu_item_link(menu_item)
.plan_sub_menu{:class => "plan_sub_"+menu_item.id.to_s }
%li=link_to "Trouvez votre journée", public_m_events_path
.inner %li
=link_to "Circuits", public_circuits_path, :class => ("active" if @circuits_active)
%li
=link_to "Organisateurs", public_organisateurs_path, :class => ("active" if @organisateurs_active)
%li
%a{:href => "https://www.dunlop.eu/fr_fr/motorcycle/dealers/find-a-dealer.html", :target => "_blank", :title => "Distributeurs"}
%span Distributeurs
%ul %li=link_to "Mon compte", public_my_account_path
-MenuItem.where(:parent_id => menu_item.id).order(:position).each do |menu_item|
-menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
-name = menu_item_lang.name %li
-if menu_item_lang.enabled == true and menu_item_lang.visible == true #and menu_item.menu_content.page_type_id == 4 %a{:accesskey => "3", :href => "/fr/plan-site.html", :title => "Plan du site"} Plan du site
%li
%a{:accesskey => "8", :href => "/fr/mentions-legales.html", :title => "Mentions légales"} Mentions légales
%li
%a{:accesskey => "8", :href => "/fr/conditions-generales-utilisation.html", :title => "Conditions générales d'utilisation"} Conditions générales d'utilisation
%li %br
=link_to @one_voice_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug) , :class => "chapitre_link "+("active" if @menu_item and menu_item.id == @menu_item.id).to_s do %br
=menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).name %br
=">"
%ul
-MenuItem.where(:parent_id => menu_item.id).order(:position).each do |menu_item|
-menu_item_lang = menu_item.menu_item_langs.find_by_lang_site_id(@lang.id)
-name = menu_item_lang.name
-if menu_item_lang.enabled == true and menu_item_lang.visible == true and menu_item.menu_content.page_type_id == 2
%li
=link_to @one_voice_host.to_s+menu_item_path(:url => menu_item_lang.url, :lang => @lang.slug) , :class => "chapitre_link "+("active" if @menu_item and menu_item.id == @menu_item.id).to_s do
=menu_item.menu_item_langs.find_by_lang_site_id(@lang.id).name
=">"
%h3=link_to "blog", articles_path(:lang => @lang.slug)

View File

@ -1,4 +1,32 @@
.recherche_filtre
-params[:search] = params[:search] || []
-params[:search][:m_event_type_title] = params[:search][:m_event_type_title] || []
.centre_filtre
=link_to image_tag('https://www.mamotosurcircuit.com/images/interface/btn_inscription.png'), public_my_account_path(), :class => "ins"
%h4 Trouvez votre circuit
=form_tag "", :method => "get", :onsubmit => "" do
.right{:style => "position:relative;top:10px;"}
=submit_tag "Rechercher", :class => "submit"
%p
.select.inline_large_input=select_tag "search[circuit_region_id]", options_for_select([["Région",""]]+CircuitRegion.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:circuit_region_id]), :class => ""
=text_field_tag "search[name]", params[:search][:name],:class => "form-control inline_input", :placeholder => "Nom"
.clear
.center_content .center_content
%center %center
%h1 Circuits %h1 Circuits
=render @circuits =render @circuits
.prevnext= paginate @circuits

View File

@ -1,11 +1,32 @@
.center_content .center_content
.circuit_show .circuit_show
-if @circuit.logo
.right
=image_tag(@circuit.logo.file.large.medium.url, :class => "logo" )
%h1 %h1
=@circuit.name =@circuit.name
.info_lien
-if @circuit.logo
.right
=image_tag(@circuit.logo.file.large.medium.url, :class => "logo" )
-if @circuit.longueur?
.block_info
%img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_flag.png"}/
=@circuit.longueur
-if @circuit.nbr_courbes?
.block_info
%img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_nombre_virages.png"}/
=@circuit.nbr_courbes
-if @circuit.longueur_ligne?
.block_info
%img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_longueur_circuit.png"}/
=@circuit.longueur_ligne
.clear .clear
@ -24,7 +45,7 @@
=link_to "Site officiel", @circuit.website, :target => "_blank", :class => "new_btn" =link_to "Site officiel", @circuit.website, :target => "_blank", :class => "new_btn"
-if @circuit.facebook? -if @circuit.facebook?
=link_to raw(ic(:'facebook-f')+"   Page Facebook"), @circuit.facebook, :target => "_blank", :class => "new_btn" =link_to raw(ic(:'facebook-f')), @circuit.facebook, :target => "_blank", :class => "new_btn"
.clear .clear
@ -38,25 +59,8 @@
=@circuit.cp =@circuit.cp
=@circuit.city =@circuit.city
=@circuit.country =@circuit.country
.info_lien
-if @circuit.longueur?
.block_info
%img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_flag.png"}/
=@circuit.longueur
-if @circuit.nbr_courbes?
.block_info
%img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_nombre_virages.png"}/
=@circuit.nbr_courbes
-if @circuit.longueur_ligne?
.block_info
%img{:src => "https://www.mamotosurcircuit.com/images/interface/picto_longueur_circuit.png"}/
=@circuit.longueur_ligne
-@m_events = MEvent.where("start_at >= ? or end_at >= ?", Date.today.beginning_of_day, Date.today.beginning_of_day).where(:circuit_id => @circuit.id) -@m_events = MEvent.where("start_at >= ? or end_at >= ?", Date.today.beginning_of_day, Date.today.beginning_of_day).where(:circuit_id => @circuit.id)
-if @m_events.count > 0 -if @m_events.count > 0
%h3 Les prochaines journées : %h3 Les prochaines journées :

View File

@ -4,7 +4,7 @@
.qi_pannel.qi_plain.padding .qi_pannel.qi_plain.padding
=f.inputs do =f.inputs do
= f.input :file, :label => "Fichier :"
= f.hidden_field :m_odr_file_type_id = f.hidden_field :m_odr_file_type_id
@ -12,16 +12,17 @@
-if f.object.m_odr_file_type_id == 2 -if f.object.m_odr_file_type_id == 2
%table.m_odr_file_products_form.form-table{:style => "width:100%;"} %table.m_odr_file_products_form.form-table{:style => "width:100%;"}
= f.input :buy_at, :label => "Date de l'achat",:as => :string, :input_html => {:autocomplete => "off", :class => "year_date_picker"} = f.input :buy_at, :label => "Date de l'achat :",:as => :string, :input_html => {:autocomplete => "off", :class => "year_date_picker"}
-if true
%p= public_link_to_add_fields ic(:plus)+" Ajouter un ou plusieurs pneus", f, :m_odr_file_products
=f.semantic_fields_for :m_odr_file_products do |form| =f.semantic_fields_for :m_odr_file_products do |form|
=render :partial => "public/m_odr_file_products/form", :locals => {:form => form} =render :partial => "public/m_odr_file_products/form", :locals => {:form => form}
-if true
%p= public_link_to_add_fields ic(:plus)+" Ajouter un ou plusieurs pneus", f, :m_odr_file_products
%br %br
@ -31,13 +32,16 @@
-else -else
%table.m_odr_file_roulages_form.form-table{:style => "width:100%;"} %table.m_odr_file_roulages_form.form-table{:style => "width:100%;"}
=f.semantic_fields_for :m_odr_file_roulages do |form|
=render :partial => "public/m_odr_file_roulages/form", :locals => {:form => form}
-if true -if true
%p= public_link_to_add_fields ic(:plus)+" Ajouter une journée de roulage", f, :m_odr_file_roulages %p= public_link_to_add_fields ic(:plus)+" Ajouter une journée de roulage", f, :m_odr_file_roulages
=f.semantic_fields_for :m_odr_file_roulages do |form|
=render :partial => "public/m_odr_file_roulages/form", :locals => {:form => form}
= f.input :file, :label => "Fichier :"
%center=f.submit "sauvegarder", :class => "btn btn-primary" %center=f.submit "sauvegarder", :class => "btn btn-primary"

View File

@ -19,7 +19,8 @@
%p Des avantages pour vous et votre moto %p Des avantages pour vous et votre moto
%a{:href => "/fr/primes.html"} Le programme %a{:href => "/fr/primes.html"} Le programme
%br %br
.block_intro .block_intro{:style => "position:relative;"}
=image_tag "/Sticker_mockup_mmsc.png", :style => "position:absolute;top:10px;right:0px;width:280px;"
%h3 %h3
Devenez membre Devenez membre
%br %br
@ -63,3 +64,24 @@
%img.img_av_hover{:src => "https://www.mamotosurcircuit.com/images/interface/infosexclu_left_white.png"}/ %img.img_av_hover{:src => "https://www.mamotosurcircuit.com/images/interface/infosexclu_left_white.png"}/
%h5 Des informations exclusives %h5 Des informations exclusives
%p Les coulisses de l'exploit %p Les coulisses de l'exploit
#paragraphe339.paragraphe{:style => "padding:0;margin:0;"}
%a{:name => "paragraphe339"}
.num_programme
.center_programme
.block_num
%span.chiffre
=PCustomer.where(:enabled => true).count
%span.label-chiffre Membres
.block_num
%span.chiffre
=MEvent.count
%span.label-chiffre Dates
.block_num
%span.chiffre
=Circuit.count
%span.label-chiffre Circuits
.block_num
%span.chiffre
=Organisateur.count
%span.label-chiffre Organisateurs

View File

@ -22,7 +22,8 @@
-else -else
%span.orange %span.orange
=ic :flag =ic :flag
Remplissez votre adresse pour recevoir vos stickers Vérifiez vos coordonnées pour recevoir votre planche de stickers
-particular = current_p_customer.particular -particular = current_p_customer.particular
@ -49,6 +50,14 @@
%p %p
=link_to "Modifier mes coordonnées", edit_public_particular_path(current_p_customer.particular) =link_to "Modifier mes coordonnées", edit_public_particular_path(current_p_customer.particular)
%p
-if current_p_customer.sticker
%br
%span.green
=ic :flag
Planche de stickers envoyée
@ -99,30 +108,40 @@
.clear .clear
%br
%br
.right
-c = current_p_customer.m_odr_primes.where(:state => "Virement envoyé").count
%h3 -if c > 0
Mes primes : %br
%br
%span{:style => "font-size:16px;"} %h3
=c = current_p_customer.m_odr_primes.where(:state => "Virement envoyé").count Mes primes :
-if c > 1 %br
primes obtenues sur 5 pour 2020 %span{:style => "font-size:16px;"}
-else -if c == 5
prime obtenue sur 5 pour 2020 %span.green
=ic :flag
-if current_p_customer.m_odr_primes.count > 0 -else
%table.table %span.orange
=render current_p_customer.m_odr_primes =ic :flag
-else =c
.empty -if c > 1
Pour obtenir des primes déposez vos factures d'achat et de roulage primes obtenues sur 5 pour 2020
-else
prime obtenue sur 5 pour 2020
-if current_p_customer.m_odr_primes.count > 0
%table.table
=render current_p_customer.m_odr_primes
-else
.empty
Pour obtenir des primes déposez vos factures d'achat et de roulage
.doc_pannel .doc_pannel

View File

@ -11,7 +11,14 @@
.titre_list .titre_list
%h3=organisateur.name %h3=organisateur.name
.details .details
=simple_format organisateur.description -if organisateur.description.size > 300
%p
=organisateur.description.truncate(300)
%u
+ d'infos
-else
=simple_format organisateur.description
.info_lien .info_lien
.block_info .block_info

View File

@ -3,3 +3,6 @@
%h1 Organisateurs %h1 Organisateurs
=render @organisateurs =render @organisateurs
.prevnext= paginate @organisateurs

View File

@ -39,7 +39,7 @@
-if @organisateur.facebook? -if @organisateur.facebook?
=link_to raw(ic(:'facebook-f')+"   Page Facebook"), @organisateur.facebook, :target => "_blank", :class => "new_btn" =link_to raw(ic(:'facebook-f')+""), @organisateur.facebook, :target => "_blank", :class => "new_btn"
%p.localisation{:style => "text-align:center !important;"} %p.localisation{:style => "text-align:center !important;"}

View File

@ -27,6 +27,10 @@
%br %br
%center=f.submit "Créer mon compte", :class => "new_btn new_btn_red new_btn_big" %center=f.submit "Créer mon compte", :class => "new_btn new_btn_red new_btn_big"
%br
%p.rgpd
Conformément à la loi « informatique et libertés » du 6 janvier 1978 ainsi qu'à la législation sur la protection des données personnelles (RGPD), vous bénéficiez d'un droit d'accès, de rectification, de portabilité et d'effacement. Pour exercer ces droits d'accès et de rectification, cliquez sur la rubrique Mon Compte de ce site web. Pour obtenir des informations vous concernant, contactez-nous par email, voie postale ou téléphone.
:scss :scss
.control-label{ .control-label{
@ -36,3 +40,8 @@
} }
} }
.rgpd{
text-align:justify;
font-size:0.90em;
}

View File

@ -1,5 +1,16 @@
Rails.application.routes.draw do Rails.application.routes.draw do
namespace :admin do
resources :departement_frances do
member do
end
collection do
end
end
end
namespace :admin do namespace :admin do
resources :mail_type_cats do resources :mail_type_cats do
member do member do

View File

@ -0,0 +1,12 @@
class CreateDepartementFrances < ActiveRecord::Migration[6.0]
def change
create_table :departement_frances do |t|
t.string :num_dep
t.string :dep_name
t.string :region_name
t.string :num_dep_format
t.timestamps
end
end
end

View File

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_06_11_051849) do ActiveRecord::Schema.define(version: 2020_06_24_105128) do
create_table "accounting_zones", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| create_table "accounting_zones", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
t.string "name" t.string "name"
@ -319,6 +319,15 @@ ActiveRecord::Schema.define(version: 2020_06_11_051849) do
t.index ["square_image_file_id"], name: "index_data_files_on_square_image_file_id" t.index ["square_image_file_id"], name: "index_data_files_on_square_image_file_id"
end end
create_table "departement_frances", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
t.string "num_dep"
t.string "dep_name"
t.string "region_name"
t.string "num_dep_format"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
create_table "download_contents", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t| create_table "download_contents", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
t.string "title" t.string "title"
t.string "style" t.string "style"

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

13
test/fixtures/departement_frances.yml vendored Normal file
View File

@ -0,0 +1,13 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one:
num_dep: MyString
dep_name: MyString
region_name: MyString
num_dep_format: MyString
two:
num_dep: MyString
dep_name: MyString
region_name: MyString
num_dep_format: MyString

View File

@ -0,0 +1,7 @@
require 'test_helper'
class DepartementFranceTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end