suite
This commit is contained in:
parent
a6aa1f6074
commit
ff95aa77ae
@ -45,6 +45,16 @@ $(document).ready ->
|
||||
).focus();
|
||||
|
||||
|
||||
|
||||
$(document).on 'click', 'input.year_date_picker', ->
|
||||
$(this).datetimepicker(
|
||||
language: 'fr'
|
||||
pickTime: false
|
||||
minDate: (new Date(new Date().getFullYear(), 0, 1))
|
||||
maxDate: (new Date(new Date().getFullYear(), 11, 31))
|
||||
).focus();
|
||||
|
||||
|
||||
$(document).on 'click', 'input.timepicker', ->
|
||||
$(this).datetimepicker(
|
||||
use24hours: true
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
@import "fontawesome/v4-shims";
|
||||
@import "fontawesome/regular";
|
||||
@import "fontawesome/brands";
|
||||
|
||||
@import "fontawesome/solid";
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
@import "fontawesome/v4-shims";
|
||||
@import "fontawesome/regular";
|
||||
@import "fontawesome/solid";
|
||||
@import "fontawesome/brands";
|
||||
|
||||
@import "qi_grids";
|
||||
|
||||
@ -1897,9 +1898,10 @@ body {
|
||||
opacity: 0.6;
|
||||
padding: 0px 10px;
|
||||
font-size: 15px;
|
||||
padding-right:0px;
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
}
|
||||
.header-topbarbox-1 {
|
||||
@ -3374,12 +3376,16 @@ select {
|
||||
border-bottom: 1px solid #000;
|
||||
font-family: "Roboto Condensed", sans-serif;
|
||||
text-transform: uppercase;
|
||||
&:hover {
|
||||
&:hover, &.active {
|
||||
border-bottom: 1px solid #fd0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.social-links{
|
||||
font-family: "Roboto Condensed", sans-serif;
|
||||
}
|
||||
.menu-sub {
|
||||
position: absolute;
|
||||
top: 49px;
|
||||
@ -3434,9 +3440,7 @@ select {
|
||||
#contenu {
|
||||
padding: 0px;
|
||||
width: 100%;
|
||||
h2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
}
|
||||
#ariane {
|
||||
display: none;
|
||||
@ -7149,10 +7153,7 @@ div.modeles_similaires {
|
||||
border-color: #5e605f;
|
||||
}
|
||||
}
|
||||
.green {
|
||||
font-size: 24px;
|
||||
color: #CC4B14;
|
||||
}
|
||||
|
||||
.inline_check {
|
||||
display: inline-block;
|
||||
width: 22%;
|
||||
@ -10013,14 +10014,11 @@ a.sp-video {
|
||||
text-transform:uppercase;
|
||||
color:black;
|
||||
}
|
||||
.img{
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
img{
|
||||
|
||||
width:160px;
|
||||
background:white no-repeat center;
|
||||
background-size:contain;
|
||||
margin:5px;
|
||||
float:left;
|
||||
}
|
||||
h3{
|
||||
font-weight:bold;
|
||||
@ -10174,8 +10172,8 @@ a.sp-video {
|
||||
.new_btn{
|
||||
color: #fff !important;
|
||||
background-color: #000000;
|
||||
font-size: 20px !important;
|
||||
padding: 7px 50px;
|
||||
font-size: 16px !important;
|
||||
padding: 5px 20px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
font-weight: normal !important;
|
||||
@ -10183,10 +10181,19 @@ a.sp-video {
|
||||
-webkit-transition: 0.5s all ease;
|
||||
font-family: 'Fugaz One', cursive;
|
||||
text-transform: uppercase;
|
||||
|
||||
&:hover{
|
||||
background-color:#ffe500;
|
||||
color:black !important;
|
||||
}
|
||||
|
||||
&.yellow{
|
||||
background-color:#ffe500;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
h1{
|
||||
font-family: 'Montserrat' !important;
|
||||
font-size: 30px;
|
||||
font-weight: 700;
|
||||
color: #111111;
|
||||
@ -10375,3 +10382,70 @@ a.sp-video {
|
||||
margin-bottom:30px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.green{
|
||||
color:green;
|
||||
}
|
||||
|
||||
.orange{
|
||||
color:orange;
|
||||
}
|
||||
|
||||
.red{
|
||||
color:red;
|
||||
}
|
||||
|
||||
td.state{
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
h1{
|
||||
font-weight: normal !important;
|
||||
|
||||
text-align:center;
|
||||
font-family: 'Fugaz One', cursive;
|
||||
text-transform: uppercase;
|
||||
margin:20px 0px;
|
||||
|
||||
}
|
||||
|
||||
h3{
|
||||
font-weight: normal !important;
|
||||
|
||||
|
||||
font-family: 'Fugaz One', cursive;
|
||||
text-transform: uppercase;
|
||||
margin:20px 0px;
|
||||
|
||||
}
|
||||
|
||||
.marg_top{
|
||||
margin-top:20px;
|
||||
}
|
||||
|
||||
|
||||
.doc_pannel{
|
||||
background:rgba(0,0,0,0.05);
|
||||
|
||||
border-top:4px solid #fd0;
|
||||
padding:20px;
|
||||
padding-bottom:30px;
|
||||
.empty{
|
||||
color:rgba(0,0,0,0.5);
|
||||
text-align:center;
|
||||
padding-bottom:20px;
|
||||
}
|
||||
margin:30px 0;
|
||||
h3{
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.align_center{
|
||||
text-align:center;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ class Admin::ImportCsvsController < ApplicationController
|
||||
before_action :admin_space
|
||||
|
||||
def admin_space
|
||||
@admin_space = "default"
|
||||
@admin_space = "preferences"
|
||||
end
|
||||
|
||||
def index
|
||||
|
76
app/controllers/admin/mail_type_cats_controller.rb
Normal file
76
app/controllers/admin/mail_type_cats_controller.rb
Normal file
@ -0,0 +1,76 @@
|
||||
# -*- encoding : utf-8 -*-
|
||||
|
||||
class Admin::MailTypeCatsController < ApplicationController
|
||||
layout "admin"
|
||||
before_action :auth_admin
|
||||
|
||||
before_action :admin_space
|
||||
|
||||
def admin_space
|
||||
@admin_space = "default"
|
||||
end
|
||||
|
||||
def index
|
||||
@mail_type_cats = MailTypeCat.all
|
||||
|
||||
@mail_type_cats = sort_by_sorting(@mail_type_cats, "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
|
||||
@mail_type_cats = @mail_type_cats.page(page).per(per_page)
|
||||
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@mail_type_cat = MailTypeCat.find(params[:id])
|
||||
|
||||
end
|
||||
|
||||
def new
|
||||
@mail_type_cat = MailTypeCat.new
|
||||
|
||||
end
|
||||
|
||||
def edit
|
||||
@mail_type_cat = MailTypeCat.find(params[:id])
|
||||
|
||||
end
|
||||
|
||||
def create
|
||||
@mail_type_cat = MailTypeCat.new(params.require(:mail_type_cat).permit!)
|
||||
|
||||
if @mail_type_cat.save
|
||||
|
||||
else
|
||||
render action: "new"
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
def update
|
||||
@mail_type_cat = MailTypeCat.find(params[:id])
|
||||
|
||||
|
||||
if @mail_type_cat.update_attributes(params.require(:mail_type_cat).permit!)
|
||||
|
||||
else
|
||||
render action: "edit"
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
def destroy
|
||||
@mail_type_cat = MailTypeCat.find(params[:id])
|
||||
@mail_type_cat.destroy
|
||||
|
||||
end
|
||||
end
|
@ -7,7 +7,7 @@ class Admin::MailTypesController < ApplicationController
|
||||
before_action :admin_space
|
||||
|
||||
def admin_space
|
||||
@admin_space = "stocks"
|
||||
@admin_space = "preferences"
|
||||
end
|
||||
|
||||
def index
|
||||
|
@ -5,13 +5,13 @@ class Public::CircuitsController < ApplicationController
|
||||
|
||||
def index
|
||||
@circuits = Circuit.all
|
||||
|
||||
@circuits_active = true
|
||||
end
|
||||
|
||||
|
||||
def show
|
||||
@circuit = Circuit.find(params[:id])
|
||||
|
||||
@circuits_active = true
|
||||
end
|
||||
|
||||
|
||||
|
@ -5,13 +5,13 @@ class Public::OrganisateursController < ApplicationController
|
||||
|
||||
def index
|
||||
@organisateurs = Organisateur.all
|
||||
|
||||
@organisateurs_active = true
|
||||
end
|
||||
|
||||
|
||||
def show
|
||||
@organisateur = Organisateur.find(params[:id])
|
||||
|
||||
@organisateurs_active = true
|
||||
end
|
||||
|
||||
|
||||
|
@ -4,6 +4,23 @@ class Public::PCustomerAuthsController < ApplicationController
|
||||
|
||||
before_action :auth_p_customer, :only => [:index, :edit_password]
|
||||
|
||||
|
||||
def valid_account
|
||||
@p_customer = PCustomer.find_by_mlm_token(params[:token])
|
||||
|
||||
if !@p_customer.enabled
|
||||
@p_customer.enabled = true
|
||||
|
||||
@p_customer.save
|
||||
|
||||
mail_hist = MailHist.auto_generate_mail(:fr, "confirmation-inscription", @p_customer.email, {:arguments => {:nbr_inscrits => PCustomer.count}, :p_customer => @p_customer})
|
||||
end
|
||||
|
||||
|
||||
redirect_to public_my_account_path(), :notice => "Votre email a été validé, merci !"
|
||||
end
|
||||
|
||||
|
||||
def index
|
||||
|
||||
#current_p_customer.consolide_operations
|
||||
|
@ -18,6 +18,9 @@ class Public::PCustomersController < ApplicationController
|
||||
#@p_customer.particulars << Particular.new(:pro => true, :skip_validation => true)
|
||||
@p_customer.valid_public = true
|
||||
@p_customer.require_cgv = true
|
||||
|
||||
@p_customer.enabled = false
|
||||
|
||||
if @p_customer.save
|
||||
|
||||
@p_customer.last_sign_in_at = Time.now
|
||||
@ -26,7 +29,10 @@ class Public::PCustomersController < ApplicationController
|
||||
|
||||
cookies[:p_customer_auth_token] = @p_customer.auth_token
|
||||
|
||||
mail_hist = MailHist.generate_mail(:fr, MailType.find_or_create("new_account"), @p_customer.email, {:arguments => {:email => @p_customer.email}, :p_customer => @p_customer, :element => @p_customer})
|
||||
|
||||
mail_hist = MailHist.auto_generate_mail(:fr, "confirmer-inscription", @p_customer.email, {:arguments => {:lien => valid_account_public_p_customer_auths_url(:token => @p_customer.mlm_token) }, :p_customer => @p_customer})
|
||||
|
||||
#mail_hist = MailHist.generate_mail(:fr, MailType.find_or_create("new_account"), @p_customer.email, {:arguments => {:email => @p_customer.email}, :p_customer => @p_customer, :element => @p_customer})
|
||||
|
||||
|
||||
redirect_to public_my_account_path
|
||||
|
@ -36,11 +36,7 @@ class Public::ParticularsController < ApplicationController
|
||||
|
||||
|
||||
if @particular.save
|
||||
if params[:for_order]
|
||||
redirect_to particulars_public_p_orders_path()
|
||||
elsif
|
||||
redirect_to public_particulars_path
|
||||
end
|
||||
redirect_to public_my_account_path
|
||||
|
||||
|
||||
else
|
||||
@ -57,11 +53,7 @@ class Public::ParticularsController < ApplicationController
|
||||
|
||||
if @particular.update_attributes(params.require(:particular).permit!)
|
||||
|
||||
if params[:for_order]
|
||||
redirect_to particulars_public_p_orders_path()
|
||||
elsif
|
||||
redirect_to public_particulars_path
|
||||
end
|
||||
redirect_to public_my_account_path
|
||||
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ module TranslationHelper
|
||||
|
||||
def state_helper(value)
|
||||
value = value.to_s
|
||||
if ["brouillon","Reçue","A traiter"].include?(value)
|
||||
if ["brouillon","Reçue","A traiter", "En cours de vérification", "Manque RIB"].include?(value)
|
||||
r = '<span class="badge badge-pill badge-warning">'+value+'</span>'
|
||||
elsif ["Virement envoyé", "Validé"].include?(value)
|
||||
r = '<span class="badge badge-success">'+value+'</span>'
|
||||
|
@ -26,5 +26,18 @@ class MEvent < ApplicationRecord
|
||||
end
|
||||
|
||||
|
||||
acts_as_csv_import :fields => [:m_event_type_title, :start_at, :end_at, :title, :description, :link, :encadrant, :imp_circuit_name, :imp_circuit_organisateur ]
|
||||
|
||||
|
||||
before_validation do
|
||||
if self.imp_circuit_organisateur? and !self.organisateur
|
||||
self.organisateur = Organisateur.where(:name => self.imp_circuit_organisateur).first
|
||||
|
||||
end
|
||||
|
||||
if self.imp_circuit_name? and !self.circuit
|
||||
self.circuit = Circuit.where(:name => self.imp_circuit_name).first
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -39,7 +39,7 @@ class MOdrFile < ApplicationRecord
|
||||
elsif self.m_odr_file_type_id == 2
|
||||
nbr_pneus = 0
|
||||
self.m_odr_file_products.each do |mofp|
|
||||
nbr_pneus += mofp.qte
|
||||
nbr_pneus += mofp.qte.to_i
|
||||
end
|
||||
|
||||
self.nbr_pneus = nbr_pneus
|
||||
|
@ -3,6 +3,7 @@ class MOdrFileProduct < ApplicationRecord
|
||||
belongs_to :m_odr_product
|
||||
belongs_to :m_odr_product_size
|
||||
|
||||
validates :qte, :presence => true
|
||||
before_save do
|
||||
if self.m_odr_product_size
|
||||
self.m_odr_product = self.m_odr_product_size.m_odr_product
|
||||
|
@ -54,7 +54,14 @@ class MailHist < ApplicationRecord
|
||||
|
||||
|
||||
|
||||
arguments = @arguments
|
||||
arguments = @arguments || {}
|
||||
|
||||
if @p_customer and @p_customer.particular
|
||||
arguments[:civilite] = @p_customer.particular.civilite
|
||||
arguments[:nom] = @p_customer.particular.name
|
||||
arguments[:prenom] = @p_customer.particular.firstname
|
||||
|
||||
end
|
||||
|
||||
|
||||
s = @mail_content.subject.to_s
|
||||
|
@ -5,6 +5,8 @@ class MailType < ApplicationRecord
|
||||
|
||||
accepts_nested_attributes_for :mail_contents
|
||||
|
||||
belongs_to :mail_type_cat
|
||||
|
||||
|
||||
|
||||
acts_as_sorting :fields => {
|
||||
@ -31,4 +33,18 @@ class MailType < ApplicationRecord
|
||||
end
|
||||
|
||||
|
||||
def lang(slug)
|
||||
self.mail_contents.where(:lang_site => LangSite.where(:slug => slug.to_s).first).first
|
||||
|
||||
|
||||
end
|
||||
|
||||
def default_title
|
||||
self.lang(:fr).subject
|
||||
end
|
||||
|
||||
def default_message
|
||||
self.lang(:fr).message.to_s.truncate(100)
|
||||
end
|
||||
|
||||
end
|
||||
|
2
app/models/mail_type_cat.rb
Normal file
2
app/models/mail_type_cat.rb
Normal file
@ -0,0 +1,2 @@
|
||||
class MailTypeCat < ApplicationRecord
|
||||
end
|
@ -1,5 +1,7 @@
|
||||
class PCustomer < ApplicationRecord
|
||||
|
||||
acts_as_tree
|
||||
|
||||
has_many :price_documents
|
||||
|
||||
has_many :particulars, :as => :owner, :dependent => :destroy
|
||||
@ -68,10 +70,22 @@ class PCustomer < ApplicationRecord
|
||||
|
||||
validates :cgv, :presence => true, :if => :require_cgv
|
||||
validates :rgpd, :presence => true, :if => :require_cgv
|
||||
|
||||
|
||||
attr_accessor :actual_password, :valid_last_password, :valid_public, :generate_mdp, :valid_pswd_confirmation, :require_cgv
|
||||
|
||||
NBR_ROULAGES = ["Entre 1 et 2", "Entre 3 et 5", "Entre 6 et 8", "Entre 9 et 10", "> 10", "Pas pour l'instant"]
|
||||
|
||||
def particular_ok?
|
||||
|
||||
if self.particular and self.particular.address_2? and self.particular.cp? and self.particular.city? and self.particular.country?
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def valid_m_odr_rep_rib
|
||||
self.m_odr_rep_ribs.where(:admin_ok => true).order("id DESC").first
|
||||
end
|
||||
@ -149,14 +163,13 @@ class PCustomer < ApplicationRecord
|
||||
|
||||
def self.qi_table_order
|
||||
{
|
||||
:show_name => "RNom",
|
||||
:code => {:name => "Code", :reorder => true},
|
||||
:show_name => "Nom",
|
||||
:mlm_token => {:name => "Code ambassadeur", :reorder => true},
|
||||
#:created_at => {:name => "Date création", :reorder => true},
|
||||
:enabled => "Etat",
|
||||
:p_commercial => "Commercial",
|
||||
:p_customer_cat => "Catégorie",
|
||||
:enabled => "Actif ?",
|
||||
:parent => "Ambassadeur",
|
||||
:particular => "Ville",
|
||||
:market_discount => "Remise marché"
|
||||
:actions => "Actions"
|
||||
|
||||
}
|
||||
#, :sort_name => "code"
|
||||
@ -192,8 +205,16 @@ class PCustomer < ApplicationRecord
|
||||
end
|
||||
|
||||
|
||||
def self.find_parrain(token)
|
||||
|
||||
|
||||
if token != ""
|
||||
self.find_by_mlm_token(token.upcase)
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
before_validation do
|
||||
|
||||
@ -201,6 +222,21 @@ class PCustomer < ApplicationRecord
|
||||
|
||||
generate_mlm_token
|
||||
|
||||
|
||||
if !self.id
|
||||
if self.parent_code?
|
||||
|
||||
if mlm_parent = PCustomer.find_parrain(self.parent_code)
|
||||
self.parent_id = mlm_parent.id
|
||||
self.parent_at_create = true
|
||||
else
|
||||
errors.add(:parent_code, "Ce code ambassadeur n'est pas valide, merci de vérifier son exactitude. ")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
if self.comptant
|
||||
|
||||
if self.acompte
|
||||
@ -348,24 +384,14 @@ class PCustomer < ApplicationRecord
|
||||
self.show_name
|
||||
end
|
||||
|
||||
def show_name
|
||||
if self.particular
|
||||
n = ""
|
||||
n += self.mlm_token+" "
|
||||
n += self.particular.organisation+" " if self.particular.organisation?
|
||||
n += self.particular.name+" " if self.particular.name?
|
||||
n += self.particular.firstname+" " if self.particular.firstname?
|
||||
return n
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def show_name
|
||||
if self.particular
|
||||
n = ""
|
||||
n += self.particular.organisation+" " if self.particular.organisation?
|
||||
n += self.particular.name+" " if self.particular.name?
|
||||
|
||||
n += self.particular.firstname+" " if self.particular.firstname?
|
||||
n += self.particular.name+" " if self.particular.name?
|
||||
return n
|
||||
end
|
||||
end
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
%li= link_to "Gestion des permissions", admin_admin_permissions_path
|
||||
|
||||
%li= link_to "Gestion des mails types", admin_mail_types_path
|
||||
|
||||
-if false
|
||||
%li= link_to "Zones de vente", admin_accounting_zones_path
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
%tr.m_odr_product_remise_form.field
|
||||
%td{:style => "width:200px;"}= form.input :champ, :label => false, :as => :select, :collection => @import_csv.table_name.classify.constantize.import_csv_fields.map{|a| a.to_s}
|
||||
|
||||
|
||||
-if !form.object.header? and @import_csv.import_csv_headers.all.map{|a| a.name}.include?(form.object.champ)
|
||||
-form.object.header = form.object.champ
|
||||
|
||||
%td{:style => "width:200px;"}= form.input :header, :label => false, :as => :select, :collection => @import_csv.import_csv_headers.all.map{|a| a.name}
|
||||
%td{:style => "width:200px;"}= form.input :value, :label => false, :placeholder => "Valeure fixe"
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
%tr#import_csv_champ_row{:id => import_csv_champ.id}
|
||||
-tr = {}
|
||||
|
||||
-tr[:actions] = capture do
|
||||
%td.actions
|
||||
= link_to i(:"trash-o"), [:admin, import_csv_champ], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
|
||||
= link_to i(:pencil), edit_admin_import_csv_champ_path(import_csv_champ), :remote => true
|
||||
= link_to i(:eye), admin_import_csv_champ_path(import_csv_champ), :remote => true
|
||||
|
||||
|
||||
|
||||
=render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => import_csv_champ}
|
||||
|
||||
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
$('#import_csv_champs_rows').prepend("<%= escape_javascript(render(@import_csv_champ))%>");
|
||||
close_pane_hover();
|
@ -1 +0,0 @@
|
||||
$('#import_csv_champ_row_<%= @import_csv_champ.id %>').remove();
|
@ -1,2 +0,0 @@
|
||||
$('#import_csv_champ_row_<%= @import_csv_champ.id %>').replaceWith("<%= escape_javascript(render(@import_csv_champ))%>");
|
||||
close_pane_hover();
|
@ -6,7 +6,7 @@
|
||||
= f.input :name, :label => "Nom de l'import :"
|
||||
= f.input :file, :label => "file :"
|
||||
|
||||
= f.input :table_name, :label => "Table :" , :as => :select, :collection => ["circuits", "organisateurs", "m_odr_product_sizes", "m_odr_places", "circuit_regions"]
|
||||
= f.input :table_name, :label => "Table :" , :as => :select, :collection => ["circuits", "organisateurs", "m_odr_product_sizes", "m_odr_places", "circuit_regions", "m_events"]
|
||||
|
||||
-if f.object.id
|
||||
%table.import_csv_champs_form
|
||||
|
@ -10,6 +10,3 @@
|
||||
|
||||
|
||||
=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @import_csvs}
|
||||
|
||||
|
||||
|
||||
|
12
app/views/admin/mail_type_cats/_form.html.haml
Normal file
12
app/views/admin/mail_type_cats/_form.html.haml
Normal file
@ -0,0 +1,12 @@
|
||||
=semantic_form_for [:admin, @mail_type_cat], :remote => true do |f|
|
||||
|
||||
.content
|
||||
=f.inputs do
|
||||
= f.input :name, :label => "name :"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.actions=f.submit "sauvegarder", :class => "btn btn-primary"
|
||||
|
16
app/views/admin/mail_type_cats/_mail_type_cat.html.haml
Normal file
16
app/views/admin/mail_type_cats/_mail_type_cat.html.haml
Normal file
@ -0,0 +1,16 @@
|
||||
%tr#mail_type_cat_row{:id => mail_type_cat.id}
|
||||
-tr = {}
|
||||
|
||||
-tr[:actions] = capture do
|
||||
%td.actions
|
||||
= link_to i(:"trash-o"), [:admin, mail_type_cat], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
|
||||
= link_to i(:pencil), edit_admin_mail_type_cat_path(mail_type_cat), :remote => true
|
||||
= link_to i(:eye), admin_mail_type_cat_path(mail_type_cat), :remote => true
|
||||
|
||||
|
||||
|
||||
=render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => mail_type_cat}
|
||||
|
||||
|
||||
|
||||
|
2
app/views/admin/mail_type_cats/create.js.erb
Normal file
2
app/views/admin/mail_type_cats/create.js.erb
Normal file
@ -0,0 +1,2 @@
|
||||
$('#mail_type_cats_rows').prepend("<%= escape_javascript(render(@mail_type_cat))%>");
|
||||
close_pane_hover();
|
1
app/views/admin/mail_type_cats/destroy.js.erb
Normal file
1
app/views/admin/mail_type_cats/destroy.js.erb
Normal file
@ -0,0 +1 @@
|
||||
$('#mail_type_cat_row_<%= @mail_type_cat.id %>').remove();
|
@ -1,15 +1,15 @@
|
||||
.qi_header
|
||||
.right= link_to ic(:plus)+' Ajouter', new_admin_import_csv_champ_path(), :class => "btn btn-primary btn-ap-add", :remote => true
|
||||
.right= link_to ic(:plus)+' Ajouter', new_admin_mail_type_cat_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 => @import_csv_champs}
|
||||
=render :partial => "qi/qi_ordered_table_search_footer", :locals => {:collection_object => @mail_type_cats}
|
||||
|
||||
|
||||
=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @import_csv_champs}
|
||||
=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @mail_type_cats}
|
||||
|
||||
|
||||
|
@ -7,4 +7,4 @@
|
||||
|
||||
.qi_row
|
||||
.qi_pannel.qi_plain.padding
|
||||
=debug @import_csv_champ
|
||||
=debug @mail_type_cat
|
2
app/views/admin/mail_type_cats/update.js.erb
Normal file
2
app/views/admin/mail_type_cats/update.js.erb
Normal file
@ -0,0 +1,2 @@
|
||||
$('#mail_type_cat_row_<%= @mail_type_cat.id %>').replaceWith("<%= escape_javascript(render(@mail_type_cat))%>");
|
||||
close_pane_hover();
|
@ -2,7 +2,7 @@
|
||||
|
||||
.content
|
||||
|
||||
|
||||
= form.input :mail_type_cat, :label => "Catégorie mail type :"
|
||||
=form.input :slug, :label => "Référence mail :"
|
||||
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
-form.object.mail_contents.build(:lang_site_id => ls.id, :content_type => "text")
|
||||
|
||||
=form.semantic_fields_for :mail_contents do |form|
|
||||
|
||||
|
||||
= form.input :subject
|
||||
= form.input :message
|
||||
= form.hidden_field :lang_site_id
|
||||
|
@ -4,12 +4,15 @@
|
||||
-tr[:enabled] = capture do
|
||||
%td
|
||||
-if p_customer.enabled
|
||||
Actif
|
||||
-else
|
||||
%span.red
|
||||
=ic :lock
|
||||
Oui
|
||||
|
||||
-tr[:parent] = capture do
|
||||
%td
|
||||
-if p_customer.parent
|
||||
=p_customer.parent.mlm_token
|
||||
="-"
|
||||
=p_customer.show_name
|
||||
|
||||
=p_customer.disabled_raison
|
||||
|
||||
-tr[:p_commercial] = capture do
|
||||
%td
|
||||
@ -25,29 +28,7 @@
|
||||
= p_customer.particular.city
|
||||
= p_customer.particular.country
|
||||
|
||||
-tr[:market_discount] = capture do
|
||||
%td
|
||||
-if p_customer.market_discount
|
||||
=p_customer.market_discount.percent
|
||||
="%"
|
||||
|
||||
|
||||
-if !@qi_table_orders
|
||||
=render :partial => "qi/qi_ordered_table_head", :locals => {:qi_ordered_table_name => p_product.class.to_s.tableize, :qi_ordered_table_model => p_product.class}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-@qi_table_orders[:p_customers].each do |key,value|
|
||||
-if tr[:"#{key}"]
|
||||
=raw tr[:"#{key}"]
|
||||
-elsif (p_customer.respond_to?(key))
|
||||
%td
|
||||
=p_customer.send(key.to_s)
|
||||
|
||||
|
||||
|
||||
-tr[:actions] = capture do
|
||||
%td.actions
|
||||
-if params[:offre].to_s == "true"
|
||||
-if p_customer.enabled
|
||||
@ -65,3 +46,8 @@
|
||||
-if current_admin.has_permission?("customers-s")
|
||||
= link_to i(:eye), admin_p_customer_path(p_customer)
|
||||
|
||||
=render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => p_customer}
|
||||
|
||||
|
||||
|
||||
|
@ -108,6 +108,23 @@
|
||||
.header-topbarbox-1
|
||||
.header-topbarbox-2
|
||||
%ul.social-links
|
||||
|
||||
-if current_p_customer
|
||||
=link_to ic(:"power-off")+" Déconnexion", logout_public_p_customer_auths_path()
|
||||
|
||||
|
||||
%li
|
||||
-if current_p_customer
|
||||
=link_to public_my_account_path do
|
||||
=ic(:user)
|
||||
Mon compte :
|
||||
=current_p_customer.particular.firstname
|
||||
=current_p_customer.particular.name
|
||||
|
||||
-else
|
||||
=link_to ic(:user)+" Mon compte", public_my_account_path
|
||||
|
||||
|
||||
%li
|
||||
%a{:href => "https://www.facebook.com/mamotosurcircuit/", :target => "_blank"}
|
||||
=ic :"facebook-f"
|
||||
@ -121,23 +138,6 @@
|
||||
#position-menu
|
||||
#menu_haut.WithCarousel
|
||||
%ul
|
||||
-if false
|
||||
%li.PGS_PRIMES.sousmenu
|
||||
%a{:href => "https://www.mamotosurcircuit.com/136-primes.html", :title => "Primes"}
|
||||
%span Primes
|
||||
/ [if gt IE 6]><!
|
||||
%a.extend{:href => "#"}
|
||||
%i.fa.fa-chevron-down
|
||||
/ <![endif]
|
||||
%ul.menu-sub
|
||||
%li
|
||||
%a{:href => "https://www.mamotosurcircuit.com/135-dunlop.html", :title => "Dunlop"}
|
||||
%span Dunlop
|
||||
%li
|
||||
%a{:href => "https://www.mamotosurcircuit.com/137-stickers.html", :title => "Stickers"}
|
||||
%span Stickers
|
||||
/[if lte IE 6] </a>
|
||||
|
||||
|
||||
|
||||
-MenuItem.where(:parent_id => nil, :menu_id => 1).order(:position).each do |menu_item|
|
||||
@ -146,21 +146,21 @@
|
||||
=menu_item_link(menu_item)
|
||||
|
||||
|
||||
-if false
|
||||
%li.PGS_ROULAGE
|
||||
=link_to "Trouvez votre journée", public_m_events_path
|
||||
|
||||
|
||||
%li.PGS_ANNUAIRE_CIRCUIT
|
||||
=link_to "Circuits", public_circuits_path
|
||||
=link_to "Circuits", public_circuits_path, :class => ("active" if @circuits_active)
|
||||
%li.PGS_ANNUAIRE_ORGA
|
||||
=link_to "Organisateurs", public_organisateurs_path
|
||||
=link_to "Organisateurs", public_organisateurs_path, :class => ("active" if @organisateurs_active)
|
||||
|
||||
%li.PGS_DISTRIBUTEUR
|
||||
%a{:href => "https://www.dunlop.eu/fr_fr/motorcycle/dealers/find-a-dealer.html", :target => "_blank", :title => "Distributeurs"}
|
||||
%span Distributeurs
|
||||
|
||||
%li.PGS_COMPTE
|
||||
=link_to "Mon compte", public_my_account_path
|
||||
|
||||
|
||||
|
||||
%button.navbar-toggle.collapsed.btn-menu{"aria-controls" => "navbar", "aria-expanded" => "false", "data-target" => "#navbar", "data-toggle" => "collapse", :type => "button"}
|
||||
@ -204,7 +204,7 @@
|
||||
%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
|
||||
%section.footer-section
|
||||
%h3.footer-section__title.ui-title-inner Nous situer
|
||||
%h3.footer-section__title.ui-title-inner Nous contacter
|
||||
.footer-contact
|
||||
%i.icon.icon-xs.fa.fa-envelope-o
|
||||
%a{:href => "mailto:contact@mamotosurcircuit.com"} contact@mamotosurcircuit.com
|
||||
|
@ -2,11 +2,15 @@
|
||||
.m_event
|
||||
-img = ""
|
||||
-img = m_event.organisateur.logo.file.large.medium.url if m_event.organisateur and m_event.organisateur.logo
|
||||
.img{:style => ("background-image:url('#{img}');" if img)}
|
||||
|
||||
=image_tag img
|
||||
.desc
|
||||
.head
|
||||
%h3
|
||||
=m_event.title
|
||||
=link_to m_event.m_event_type_title, public_m_events_path(:search => {:m_event_type_title => [m_event.m_event_type_title]})
|
||||
="-"
|
||||
=link_to m_event.circuit.name, public_m_events_path(:search => {:circuit_id => m_event.circuit.id})
|
||||
|
||||
%span.date
|
||||
-if m_event.start_at.to_date == m_event.end_at.to_date
|
||||
le
|
||||
@ -16,21 +20,21 @@
|
||||
=l m_event.start_at, :format => :date
|
||||
au
|
||||
=l m_event.end_at, :format => :date
|
||||
.circuit_name
|
||||
%strong Circuit :
|
||||
=link_to m_event.circuit.name, public_m_events_path(:search => {:circuit_id => m_event.circuit.id})
|
||||
|
||||
.details=simple_format m_event.description
|
||||
|
||||
.right_roulage.right
|
||||
=link_to "Détail", m_event.link.to_s, :target => "_blank"
|
||||
.type
|
||||
%strong Type :
|
||||
=link_to m_event.m_event_type_title, public_m_events_path(:search => {:m_event_type_title => [m_event.m_event_type_title]})
|
||||
|
||||
.organisateur_name
|
||||
%strong Organisateur :
|
||||
=link_to m_event.organisateur.name, public_organisateur_path(m_event.organisateur), :target => "_blank" if m_event.organisateur
|
||||
Organisé par
|
||||
%strong=link_to m_event.organisateur.name, public_organisateur_path(m_event.organisateur), :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
|
||||
|
||||
%br
|
||||
%br
|
||||
.right_roulage.right
|
||||
=link_to "Réserver (site officiel)", m_event.link.to_s, :target => "_blank"
|
||||
|
||||
|
||||
.clear
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
%tr.m_odr_file_roulage_form.field
|
||||
%td= form.input :date, :label => "date :" , :as => :date
|
||||
%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 :date, :label => "Date :" , :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.actions=link_to_remove_fields ic(:"trash-o"), form
|
@ -7,18 +7,17 @@
|
||||
|
||||
= f.input :file, :label => "Fichier :"
|
||||
|
||||
= f.input :buy_at, :label => "Date de la facture :", :as => :date
|
||||
|
||||
= f.hidden_field :m_odr_file_type_id
|
||||
|
||||
|
||||
-if f.object.m_odr_file_type_id == 2
|
||||
%table.m_odr_file_products_form.form-table
|
||||
= f.input :buy_at, :label => "Date de l'achat", :as => :date
|
||||
= f.input :m_odr_place, :label => "Revendeur :", :as => :date, :collection => MOdrPlace.all, :member_label => :member_label, :as => :select
|
||||
= 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 produit", f, :m_odr_file_products
|
||||
%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|
|
||||
=render :partial => "public/m_odr_file_products/form", :locals => {:form => form}
|
||||
@ -30,12 +29,14 @@
|
||||
=f.semantic_fields_for :m_odr_file_roulages do |form|
|
||||
=render :partial => "public/m_odr_file_roulages/form", :locals => {:form => form}
|
||||
|
||||
-if false
|
||||
%p= link_to_add_fields ic(:plus)+" Ajouter une date de roulage", f, :m_odr_file_roulages
|
||||
-if true
|
||||
%p= public_link_to_add_fields ic(:plus)+" Ajouter une journée de roulage", f, :m_odr_file_roulages
|
||||
|
||||
|
||||
|
||||
|
||||
.large_actions
|
||||
.actions=f.submit "sauvegarder", :class => "btn btn-primary"
|
||||
%br
|
||||
%br
|
||||
|
@ -8,7 +8,7 @@
|
||||
=link_to ic(:download)+" Télécharger le document", download_admin_m_odr_file_path(m_odr_file, :disposition => "attachment")
|
||||
|
||||
|
||||
%td
|
||||
%td.state
|
||||
-if m_odr_file.admin_ok
|
||||
=state_helper("Validé")
|
||||
-elsif m_odr_file.admin_ok == false
|
||||
|
@ -3,6 +3,6 @@
|
||||
=l m_odr_prime.created_at, :format => :date
|
||||
%td
|
||||
=number_to_currency m_odr_prime.amount
|
||||
%td
|
||||
%td.state
|
||||
=state_helper(m_odr_prime.state)
|
||||
|
||||
|
@ -29,15 +29,15 @@
|
||||
.block_avantage
|
||||
%a{:href => "/fr/primes.html"}
|
||||
.container_picto
|
||||
%img.img_av{:src => "https://www.mamotosurcircuit.com/images/interface/pneu_left_2.png"}/
|
||||
%img.img_av_hover{:src => "https://www.mamotosurcircuit.com/images/interface/pneu_left_2_white.png"}/
|
||||
%img.img_av{:src => "https://www.mamotosurcircuit.com/images/interface/bonus_left.png"}/
|
||||
%img.img_av_hover{:src => "https://www.mamotosurcircuit.com/images/interface/bonus_left_white.png"}/
|
||||
%h5 Prime de roulage pneus Dunlop
|
||||
%p Achetez, roulez et soyez remboursé
|
||||
.block_avantage
|
||||
%a{:href => public_my_account_path()}
|
||||
.container_picto
|
||||
%img.img_av{:src => "https://www.mamotosurcircuit.com/images/interface/bonus_left.png"}/
|
||||
%img.img_av_hover{:src => "https://www.mamotosurcircuit.com/images/interface/bonus_left_white.png"}/
|
||||
%img.img_av{:src => "https://www.mamotosurcircuit.com/images/interface/pneu_left_2.png"}/
|
||||
%img.img_av_hover{:src => "https://www.mamotosurcircuit.com/images/interface/pneu_left_2_white.png"}/
|
||||
%h5 Des stickers
|
||||
%p Inscrivez-vous et recevez gratuitement vos stickers
|
||||
.block_avantage
|
||||
|
@ -1,64 +1,146 @@
|
||||
|
||||
.center_content
|
||||
%a{:accesskey => "s", :href => "#contenu", :name => "contenu"}
|
||||
|
||||
#contenu_scroller
|
||||
#paragraphe292.paragraphe
|
||||
%a{:name => "paragraphe292"}
|
||||
.panel_user
|
||||
.nav_user
|
||||
%h3 Mon compte
|
||||
.link_nav
|
||||
=link_to ic(:"user")+" me déconnecter", logout_public_p_customer_auths_path(), :class => "disconnect"
|
||||
.new_compte
|
||||
%h4
|
||||
Bonjour
|
||||
%span{:style => "font-weight:300;"}=current_p_customer.show_name
|
||||
.nav_user_full
|
||||
%div
|
||||
%a{:href => "https://www.mamotosurcircuit.com/104--195-mon-compte.html"}
|
||||
%span Mes demandes de prime
|
||||
= link_to 'Envoyer une facture de roulage', new_public_m_odr_file_path(:m_odr_file_type_id => 1)
|
||||
= link_to 'Envoyer une facture d\'achat', new_public_m_odr_file_path(:m_odr_file_type_id => 2)
|
||||
= link_to "Suivre mes demandes de prime", public_m_odr_files_path
|
||||
-if current_p_customer.m_odr_rep_ribs.count > 0
|
||||
= link_to "Modifier mon rib", edit_public_m_odr_rep_rib_path(current_p_customer.m_odr_rep_ribs.first)
|
||||
|
||||
%h1 Mon compte
|
||||
|
||||
.right
|
||||
=link_to ic(:lock)+" Modifier mon mot de passe", edit_password_public_p_customer_auths_path()
|
||||
|
||||
.clear
|
||||
.row
|
||||
.col-md-6
|
||||
%h3 Mes informations personnelles
|
||||
.particular_div
|
||||
%p
|
||||
-if current_p_customer.particular_ok?
|
||||
%span.green
|
||||
=ic :flag
|
||||
Adresse remplie
|
||||
-else
|
||||
= link_to "Ajouter mon rib", new_public_m_odr_rep_rib_path()
|
||||
%span.orange
|
||||
=ic :flag
|
||||
Remplissez votre adresse pour recevoir vos stickers
|
||||
|
||||
|
||||
-particular = current_p_customer.particular
|
||||
-if particular
|
||||
=particular.firstname
|
||||
=particular.name
|
||||
%br
|
||||
-if particular.address_2?
|
||||
|
||||
=particular.address_2
|
||||
%br
|
||||
-if particular.address_3?
|
||||
|
||||
=particular.address_3
|
||||
%br
|
||||
-if particular.cp? or particular.city? or particular.country?
|
||||
|
||||
=particular.cp
|
||||
|
||||
=particular.city
|
||||
|
||||
=particular.country
|
||||
%br
|
||||
%p
|
||||
=link_to "Modifier mes coordonnées", edit_public_particular_path(current_p_customer.particular)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.col-md-6
|
||||
%h3 Mon rib
|
||||
.rib
|
||||
-if current_p_customer.valid_m_odr_rep_rib
|
||||
%p
|
||||
%span.green
|
||||
=ic :flag
|
||||
RIB validé
|
||||
-rib = current_p_customer.valid_m_odr_rep_rib
|
||||
|
||||
.rib
|
||||
IBAN :
|
||||
=rib.iban
|
||||
%br
|
||||
BIC :
|
||||
=rib.bic
|
||||
%br
|
||||
= link_to "Modifier mon rib", edit_public_m_odr_rep_rib_path(current_p_customer.m_odr_rep_ribs.first)
|
||||
|
||||
-elsif current_p_customer.m_odr_rep_ribs.count > 0
|
||||
%p
|
||||
%span.orange
|
||||
=ic :flag
|
||||
RIB en cours de validation
|
||||
|
||||
-rib = current_p_customer.m_odr_rep_ribs.first
|
||||
|
||||
.rib
|
||||
IBAN :
|
||||
=rib.iban
|
||||
%br
|
||||
BIC :
|
||||
=rib.bic
|
||||
|
||||
|
||||
-else
|
||||
%p
|
||||
%span.red
|
||||
=ic :flag
|
||||
RIB non renseigné
|
||||
.rib= link_to "Ajouter mon rib", new_public_m_odr_rep_rib_path()
|
||||
|
||||
|
||||
.doc_pannel
|
||||
%h3 Mes primes
|
||||
-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
|
||||
|
||||
%h3 Mes factures d'achat
|
||||
-if m_odr_files = current_p_customer.m_odr_files.where(:m_odr_file_type_id => 2) and m_odr_files.count > 0
|
||||
%table.table
|
||||
=render m_odr_files
|
||||
|
||||
-else
|
||||
.empty
|
||||
Vous n'avez pas encore déposé de facture d'achat
|
||||
|
||||
.align_center
|
||||
= link_to 'Envoyer une facture d\'achat', new_public_m_odr_file_path(:m_odr_file_type_id => 2), :class => "new_btn"
|
||||
.doc_pannel
|
||||
%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
|
||||
%table.table
|
||||
=render m_odr_files
|
||||
-else
|
||||
.empty
|
||||
Vous n'avez pas encore déposé de facture de roulage
|
||||
|
||||
.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 "Découvrir les avantages du Dunlop Sponsor Program", "/fr/primes.html"
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
|
||||
|
||||
|
||||
|
||||
%div
|
||||
|
||||
%span Mes informations personnelles
|
||||
=link_to "Modifier mes coordonnées, indiquer mes préférences, ...", edit_public_particular_path(current_p_customer.particular)
|
||||
=link_to "Modifier mon mot de passe", edit_password_public_p_customer_auths_path()
|
||||
|
||||
%div
|
||||
%a{:href => "/fr/primes.html"}
|
||||
%span Dunlop Sponsor Program
|
||||
%span Découvrir mes avantages
|
||||
%h4 Contacter l'équipe de mamotosurcircuit.com
|
||||
.info_contact
|
||||
%div
|
||||
%span.picto_cmpt.arobase @
|
||||
%a{:href => "mailto:contact@mamotosurcircuit.com", :target => "_blank"} contact@mamotosurcircuit.com
|
||||
%div
|
||||
%span.picto_cmpt
|
||||
=ic :"facebook-f"
|
||||
%a{:href => "https://www.facebook.com/mamotosurcircuit/", :target => "_blank"} @mamotosurcircuit
|
||||
%div
|
||||
%span.picto_cmpt
|
||||
%i.fa.fa-phone{"aria-hidden" => "true"}
|
||||
%a{:href => "tel:0476313838", :target => "_blank"} 04 76 31 38 38
|
||||
%div
|
||||
%span.picto_cmpt.adresse_cpt
|
||||
%i.fa.fa-envelope-o{"aria-hidden" => "true"}
|
||||
%span.inlince_adresse
|
||||
Market-Inn
|
||||
%br/
|
||||
Service relation client Mamotosurcircuit.com
|
||||
%br/
|
||||
8 route des Bois Bat A
|
||||
%br/
|
||||
38500 Voiron
|
||||
%br.clr/
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
.connexion_form
|
||||
%h2 Déjà inscrit ?
|
||||
%h3 Déjà inscrit ?
|
||||
|
||||
= form_tag public_p_customer_auths_path, {:class => "formtastic"} do
|
||||
=hidden_field_tag :for_order, params[:for_order]
|
||||
@ -35,7 +35,13 @@
|
||||
%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"
|
||||
|
||||
|
||||
%br
|
||||
.col-md-6
|
||||
%h3 Pas encore de compte ?
|
||||
|
||||
%br
|
||||
%br
|
||||
%br
|
||||
%center
|
||||
=link_to "Créer mon compte", new_public_p_customer_path ,:class => "new_btn"
|
||||
=#render :partial => "public/p_customers/new_form"
|
||||
|
@ -1,11 +1,12 @@
|
||||
|
||||
%h2 Pas encore client ?
|
||||
=#debug @p_customer.errors.messages
|
||||
= semantic_form_for [:public, @p_customer] do |f|
|
||||
=hidden_field_tag :for_order, params[:for_order]
|
||||
=f.inputs do
|
||||
=f.hidden_field :valid_public
|
||||
|
||||
=f.input :parent_code, :label => "Code ambassadeur :"
|
||||
|
||||
=f.input :email, :label => "Email :"
|
||||
=f.input :password, :label => "Mot de passe :", :as => :password
|
||||
|
||||
|
@ -1,5 +1,16 @@
|
||||
Rails.application.routes.draw do
|
||||
|
||||
namespace :admin do
|
||||
resources :mail_type_cats do
|
||||
member do
|
||||
|
||||
end
|
||||
collection do
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
namespace :admin do
|
||||
resources :circuit_regions do
|
||||
member do
|
||||
@ -610,6 +621,8 @@ Rails.application.routes.draw do
|
||||
resources :p_customer_auths do
|
||||
collection do
|
||||
|
||||
get :valid_account
|
||||
|
||||
get :password_reset
|
||||
post :save_password_reset
|
||||
|
||||
|
7
db/migrate/20200602223325_add_imports_to_m_events.rb
Normal file
7
db/migrate/20200602223325_add_imports_to_m_events.rb
Normal file
@ -0,0 +1,7 @@
|
||||
class AddImportsToMEvents < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :m_events, :encadrant, :string
|
||||
add_column :m_events, :imp_circuit_name, :string
|
||||
add_column :m_events, :imp_circuit_organisateur, :string
|
||||
end
|
||||
end
|
9
db/migrate/20200602230532_create_mail_type_cats.rb
Normal file
9
db/migrate/20200602230532_create_mail_type_cats.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class CreateMailTypeCats < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :mail_type_cats do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddMailTypeCatToMailTypes < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :mail_types, :mail_type_cat_id, :integer
|
||||
end
|
||||
end
|
12
db/schema.rb
12
db/schema.rb
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_05_25_085510) do
|
||||
ActiveRecord::Schema.define(version: 2020_06_02_230712) do
|
||||
|
||||
create_table "accounting_zones", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
|
||||
t.string "name"
|
||||
@ -676,6 +676,9 @@ ActiveRecord::Schema.define(version: 2020_05_25_085510) do
|
||||
t.integer "image_file_id"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
t.string "encadrant"
|
||||
t.string "imp_circuit_name"
|
||||
t.string "imp_circuit_organisateur"
|
||||
t.index ["circuit_id"], name: "index_m_events_on_circuit_id"
|
||||
t.index ["organisateur_id"], name: "index_m_events_on_organisateur_id"
|
||||
end
|
||||
@ -1149,6 +1152,12 @@ ActiveRecord::Schema.define(version: 2020_05_25_085510) do
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
end
|
||||
|
||||
create_table "mail_type_cats", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
end
|
||||
|
||||
create_table "mail_types", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4", force: :cascade do |t|
|
||||
t.string "slug"
|
||||
t.string "default_title"
|
||||
@ -1159,6 +1168,7 @@ ActiveRecord::Schema.define(version: 2020_05_25_085510) do
|
||||
t.bigint "m_odr_id"
|
||||
t.text "tags"
|
||||
t.bigint "file_tunel_id"
|
||||
t.integer "mail_type_cat_id"
|
||||
t.index ["file_tunel_id"], name: "index_mail_types_on_file_tunel_id"
|
||||
t.index ["m_odr_id"], name: "index_mail_types_on_m_odr_id"
|
||||
t.index ["mail_type_reference_id"], name: "index_mail_types_on_mail_type_reference_id"
|
||||
|
@ -7,3 +7,4 @@ module ActsAsCaching
|
||||
#autoload :InstanceMethods, File.join(File.dirname(__FILE__), "acts_as_caching/instance_methods")
|
||||
end
|
||||
|
||||
# V 0.1
|
@ -29,6 +29,9 @@ module ActsAsCaching::Hook
|
||||
|
||||
define_method("qi_dynamics_cache"){
|
||||
puts "qi_dynamics_cache"
|
||||
puts "hook"
|
||||
puts self.class
|
||||
|
||||
|
||||
if self.methods.include?(:to_no_archive)
|
||||
self.to_no_archive.each do |noc|
|
||||
|
@ -7,3 +7,4 @@ module ActsAsCsvImport
|
||||
#autoload :InstanceMethods, File.join(File.dirname(__FILE__), "acts_as_csv_import/instance_methods")
|
||||
end
|
||||
|
||||
# V 0.1
|
@ -24,15 +24,17 @@ module ActsAsCsvImport::Hook
|
||||
n = self.new
|
||||
|
||||
row.each do |key, value|
|
||||
|
||||
if self.type_for_attribute(key) and self.type_for_attribute(key).type == :decimal
|
||||
eval "n.#{key} = value.to_s.gsub(' ', '').gsub(',', '.')"
|
||||
else
|
||||
eval "n.#{key} = value"
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
puts "ENREGISTREMENT"
|
||||
puts n.save
|
||||
puts "ERREURS"
|
||||
puts n.errors.messages
|
||||
puts "FIN"
|
||||
|
||||
n.save
|
||||
|
||||
import_csv.import_csv_elements << ImportCsvElement.new(:element => n)
|
||||
|
||||
|
@ -7,3 +7,4 @@ module ActsAsSorting
|
||||
#autoload :InstanceMethods, File.join(File.dirname(__FILE__), "acts_as_sorting/instance_methods")
|
||||
end
|
||||
|
||||
# V 0.1
|
@ -53,3 +53,5 @@ end
|
||||
|
||||
|
||||
end
|
||||
|
||||
# V 0.1
|
Binary file not shown.
After Width: | Height: | Size: 230 KiB |
7
test/fixtures/mail_type_cats.yml
vendored
Normal file
7
test/fixtures/mail_type_cats.yml
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
name: MyString
|
||||
|
||||
two:
|
||||
name: MyString
|
7
test/models/mail_type_cat_test.rb
Normal file
7
test/models/mail_type_cat_test.rb
Normal file
@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class MailTypeCatTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user