suite
@ -10309,7 +10309,7 @@ a.sp-video {
|
||||
min-height:180px;
|
||||
|
||||
.info_lien{
|
||||
color:#cc4b14
|
||||
//color:#cc4b14
|
||||
}
|
||||
.absolute_logo{
|
||||
background:white;
|
||||
@ -10745,6 +10745,13 @@ a.sp-video {
|
||||
|
||||
|
||||
|
||||
.country_icon{
|
||||
height:1em !important;
|
||||
padding:0 !important;
|
||||
margin-right:3px !important;
|
||||
position:relative !important;
|
||||
top:-2px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -13,6 +13,53 @@ class Admin::MEventsController < ApplicationController
|
||||
def index
|
||||
@m_events = MEvent.all
|
||||
|
||||
if params[:search][:circuit_id].to_s != ""
|
||||
@m_events = @m_events.where(:circuit_id => params[:search][:circuit_id])
|
||||
end
|
||||
|
||||
if params[:search][:organisateur_id].to_s != ""
|
||||
@m_events = @m_events.where(:organisateur_id => params[:search][:organisateur_id])
|
||||
end
|
||||
|
||||
if params[:search][:circuit_region_id].to_s != ""
|
||||
@m_events = @m_events.where(:circuit_id => Circuit.where(:circuit_region_id => params[:search][:circuit_region_id]).ids)
|
||||
end
|
||||
|
||||
|
||||
date_regex = /^(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/](19|20)\d\d$/i
|
||||
|
||||
|
||||
params[:start] = Date.today.beginning_of_year.strftime('%d/%m/%Y') if !params[:start]
|
||||
|
||||
if params[:start] and params[:start] =~ date_regex
|
||||
#fsfds = sdfsfd
|
||||
@start = Date.parse(params[:start]).beginning_of_day
|
||||
params[:start]= @start.strftime('%d/%m/%Y')
|
||||
else
|
||||
@start = nil
|
||||
end
|
||||
|
||||
if true
|
||||
params[:stop] = Date.today.end_of_year.strftime('%d/%m/%Y') if !params[:stop]
|
||||
|
||||
|
||||
if params[:stop].to_s != "" # and params[:stop] =~ date_regex
|
||||
@stop = Date.parse(params[:stop]).end_of_day
|
||||
|
||||
params[:stop]= @stop.strftime('%d/%m/%Y')
|
||||
|
||||
|
||||
else
|
||||
@stop = nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@m_events = @m_events.where("start_at >= ? or end_at >= ?", @start, @start) if @start
|
||||
|
||||
@m_events = @m_events.where("start_at <= ? or end_at <= ?", @stop.end_of_day, @stop.end_of_day) if @stop
|
||||
|
||||
@m_events = sort_by_sorting(@m_events, "id DESC")
|
||||
respond_to do |format|
|
||||
format.html{
|
||||
|
@ -256,6 +256,41 @@ class Admin::PCustomersController < ApplicationController
|
||||
end
|
||||
|
||||
|
||||
date_regex = /^(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/](19|20)\d\d$/i
|
||||
|
||||
|
||||
# params[:start] = Date.today.beginning_of_month.strftime('%d/%m/%Y') if !params[:start]
|
||||
|
||||
if params[:start] and params[:start] =~ date_regex
|
||||
#fsfds = sdfsfd
|
||||
@start = Date.parse(params[:start]).beginning_of_day
|
||||
params[:start]= @start.strftime('%d/%m/%Y')
|
||||
else
|
||||
@start = nil
|
||||
end
|
||||
|
||||
if true
|
||||
# params[:stop] = Date.today.end_of_month.strftime('%d/%m/%Y') if !params[:stop]
|
||||
|
||||
|
||||
if params[:stop].to_s != "" # and params[:stop] =~ date_regex
|
||||
@stop = Date.parse(params[:stop]).end_of_day
|
||||
|
||||
params[:stop]= @stop.strftime('%d/%m/%Y')
|
||||
|
||||
|
||||
else
|
||||
@stop = nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@p_customers = @p_customers.where("created_at >= ?", @start) if @start
|
||||
|
||||
@p_customers = @p_customers.where("created_at <= ?", @stop.end_of_day) if @stop
|
||||
|
||||
|
||||
|
||||
if current_admin.p_commercial
|
||||
@p_customers = @p_customers.where(:p_commercial_id => current_admin.p_commercial.id )
|
||||
|
@ -6,8 +6,8 @@ class MEvent < ApplicationRecord
|
||||
:id => {:name => "Id", :reorder => true},
|
||||
|
||||
:m_event_type_title => {:name => "Type d'évenement", :reorder => true},
|
||||
:circuit => {:name => "Circuit", :reorder => true},
|
||||
:organisateur => {:name => "organisateur", :reorder => true},
|
||||
:circuit => {:name => "Circuit", :reorder => false},
|
||||
:organisateur => {:name => "organisateur", :reorder => false},
|
||||
:start_at => {:name => "Date de début", :reorder => true},
|
||||
:end_at => {:name => "Date de fin", :reorder => true},
|
||||
:title => {:name => "Titre", :reorder => true},
|
||||
|
@ -103,6 +103,7 @@ class MOdrFile < ApplicationRecord
|
||||
|
||||
acts_as_sorting :fields => {
|
||||
:id => {:name => "Id", :reorder => true},
|
||||
:created_at => {:name => "Date de téléchargement", :reorder => true},
|
||||
:p_customer => {:name => "Utilisateur"},
|
||||
:m_odr_file_type => {:name => "Type de document"},
|
||||
:admin_ok => {:name => "Décision", :reorder => true},
|
||||
|
@ -248,9 +248,9 @@ class PCustomer < ApplicationRecord
|
||||
|
||||
def self.qi_table_order
|
||||
{
|
||||
:created_at => {:name => "Date de création", :reorder => true, :as => :date},
|
||||
:show_name => "Nom",
|
||||
:mlm_token => {:name => "Code ambassadeur", :reorder => true},
|
||||
#:created_at => {:name => "Date création", :reorder => true},
|
||||
:enabled => "Actif ?",
|
||||
:parent => "Ambassadeur",
|
||||
:particular => "Ville",
|
||||
|
@ -7,6 +7,34 @@
|
||||
|
||||
.qi_search_row
|
||||
=form_tag "", :method => "get", :onsubmit => "" do
|
||||
|
||||
%table
|
||||
%tr
|
||||
%td
|
||||
Circuit :
|
||||
=select_tag "search[circuit_id]", options_for_select([["",""]]+Circuit.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:circuit_id])
|
||||
|
||||
%td
|
||||
Organisateur :
|
||||
=select_tag "search[organisateur_id]", options_for_select([["",""]]+Organisateur.order(:name).all.map{|a| [a.name, a.id]}, params[:search][:organisateur_id])
|
||||
|
||||
|
||||
%td
|
||||
.input-group
|
||||
=text_field_tag :start, params[:start],:class => "form-control datepicker", :placeholder => "Début"
|
||||
%span.input-group-addon.btn{:onclick => "$(this).prev('input').val('');"}
|
||||
=ic(:times)
|
||||
|
||||
|
||||
|
||||
%td
|
||||
.input-group
|
||||
=text_field_tag :stop, params[:stop],:class => "form-control datepicker", :placeholder => "Fin"
|
||||
%span.input-group-addon.btn{:onclick => "$(this).prev('input').val('');"}
|
||||
=ic(:times)
|
||||
|
||||
|
||||
|
||||
=render :partial => "qi/qi_ordered_table_search_footer", :locals => {:collection_object => @m_events}
|
||||
|
||||
|
||||
|
@ -26,6 +26,22 @@
|
||||
%td=text_field_tag :city, params[:city],:class => "form-control", :placeholder => "Ville"
|
||||
|
||||
%td=text_field_tag :tel, params[:tel],:class => "form-control", :placeholder => "Tel"
|
||||
|
||||
|
||||
%td
|
||||
.input-group
|
||||
=text_field_tag :start, params[:start],:class => "form-control datepicker", :placeholder => "Début"
|
||||
%span.input-group-addon.btn{:onclick => "$(this).prev('input').val('');"}
|
||||
=ic(:times)
|
||||
|
||||
|
||||
|
||||
%td
|
||||
.input-group
|
||||
=text_field_tag :stop, params[:stop],:class => "form-control datepicker", :placeholder => "Fin"
|
||||
%span.input-group-addon.btn{:onclick => "$(this).prev('input').val('');"}
|
||||
=ic(:times)
|
||||
|
||||
|
||||
-if false
|
||||
%td=text_field_tag :document_number, params[:document_number],:class => "form-control", :placeholder => "N° document"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
%body.admin{:id => "body_#{@admin_space}"}
|
||||
#right_bar
|
||||
=link_to image_tag("/logo-mmsc.png"), "/", :id => "logo"
|
||||
=link_to image_tag("/logo-mmsc.png"), "/admin", :id => "logo"
|
||||
|
||||
-if false
|
||||
.element
|
||||
@ -172,6 +172,8 @@
|
||||
%li=link_to "Se déconnecter", admin_admin_auth_path(1), method: :delete
|
||||
%li
|
||||
=link_to ic(:refresh), "#", :onclick => "location.reload();"
|
||||
%li
|
||||
=link_to ic(:eye), "/", :target => "_blank"
|
||||
|
||||
|
||||
|
||||
|
@ -28,8 +28,15 @@
|
||||
=simple_format circuit.description
|
||||
.info_lien
|
||||
.block_info
|
||||
-if circuit.country? and circuit.country.to_s == "FR"
|
||||
=image_tag "/countries/#{circuit.country.downcase}.png", :class => "country_icon"
|
||||
=circuit.cp
|
||||
=circuit.city
|
||||
|
||||
-if circuit.country? and circuit.country.to_s != "FR"
|
||||
="-"
|
||||
=image_tag "/countries/#{circuit.country.downcase}.png", :class => "country_icon"
|
||||
=country = ISO3166::Country[circuit.country].translations["fr"]
|
||||
|
||||
-if circuit.longueur?
|
||||
.block_info
|
||||
|
@ -53,7 +53,14 @@
|
||||
=@circuit.address3 if @circuit.address3?
|
||||
=@circuit.cp
|
||||
=@circuit.city
|
||||
=@circuit.country
|
||||
|
||||
|
||||
-if @circuit.country? and @circuit.country.to_s != "FR"
|
||||
="-"
|
||||
|
||||
=image_tag "/countries/#{@circuit.country.downcase}.png", :class => "country_icon"
|
||||
|
||||
= ISO3166::Country[@circuit.country].translations["fr"]
|
||||
|
||||
.clear
|
||||
.clear
|
||||
|
@ -24,4 +24,9 @@
|
||||
.block_info
|
||||
=organisateur.cp
|
||||
=organisateur.city
|
||||
-if organisateur.country? and organisateur.country.to_s != "FR"
|
||||
="-"
|
||||
=image_tag "/countries/#{organisateur.country.downcase}.png", :class => "country_icon"
|
||||
=ISO3166::Country[organisateur.country].translations["fr"]
|
||||
|
||||
|
BIN
public/countries/abkhazia.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/afghanistan.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/aland-islands.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
public/countries/albania.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/algeria.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/american-samoa.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
public/countries/andorra.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/angola.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/anguilla.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/antigua-and-barbuda.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/argentina.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/armenia.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/aruba.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/at.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/australia.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/countries/azerbaijan.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/azores-islands.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/bahamas.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/bahrain.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/balearic-islands.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
public/countries/bangladesh.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/countries/barbados.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/basque-country.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/be.png
Normal file
After Width: | Height: | Size: 9.0 KiB |
BIN
public/countries/belarus.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/countries/belize.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/countries/benin.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
public/countries/bermuda.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/bhutan-1.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/bhutan.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/countries/bolivia.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/bonaire.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/countries/bosnia-and-herzegovina.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
public/countries/botswana.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
public/countries/brazil.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/british-columbia.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
public/countries/british-indian-ocean-territory.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
public/countries/british-virgin-islands.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/countries/brunei.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
public/countries/bulgaria.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/burkina-faso.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
public/countries/burundi.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/cambodia.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
public/countries/cameroon.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/canada.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/countries/canary-islands.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
public/countries/cape-verde.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/cayman-islands.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/central-african-republic.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/ceuta.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/chad.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
public/countries/chile.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/countries/china.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/christmas-island.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
public/countries/cocos-island.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/colombia.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/comoros.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
public/countries/cook-islands.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/corsica.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/costa-rica.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
public/countries/cuba.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/curacao.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/cyprus.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/cz.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/countries/de.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
public/countries/democratic-republic-of-congo.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/denmark.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/countries/djibouti.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/countries/dominica.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
public/countries/dominican-republic.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/east-timor.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
public/countries/ecuador.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/egypt.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
public/countries/england.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
public/countries/equatorial-guinea.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/countries/eritrea.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/countries/es.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/estonia.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/ethiopia.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/european-union.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
public/countries/falkland-islands.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/countries/faroe-islands.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/countries/fiji.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/countries/finland.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
public/countries/fr.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/countries/french-polynesia.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
public/countries/gabon.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
public/countries/galapagos-islands.png
Normal file
After Width: | Height: | Size: 7.8 KiB |