This commit is contained in:
Nicolas Bally 2020-06-28 23:41:14 +02:00
parent 12ab33ec2a
commit d213ea6535
276 changed files with 161 additions and 6 deletions

View File

@ -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;
}

View File

@ -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{

View File

@ -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 )

View File

@ -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},

View File

@ -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},

View File

@ -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",

View File

@ -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}

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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"]

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/countries/angola.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
public/countries/aruba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/countries/at.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/countries/be.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
public/countries/belize.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
public/countries/benin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/countries/bhutan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
public/countries/brazil.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/countries/brunei.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/countries/canada.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/countries/ceuta.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
public/countries/chad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
public/countries/chile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/countries/china.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
public/countries/cuba.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/countries/cyprus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
public/countries/cz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
public/countries/de.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/countries/egypt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
public/countries/es.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
public/countries/fiji.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

BIN
public/countries/fr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/countries/gabon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Some files were not shown because too many files have changed in this diff Show More