Amélioration interface saisie des prix par les fournisseurs.
Consulter le lien avec le token en navigation privée, épuration de l'affichage, méthodes dédiées...
This commit is contained in:
parent
e9e0f009a6
commit
b09b941321
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class Admin::PriceDocumentsController < ApplicationController
|
class Admin::PriceDocumentsController < ApplicationController
|
||||||
layout "admin"
|
layout "admin"
|
||||||
before_action :auth_admin, :except => :print
|
before_action :auth_admin, :except => [:print, :consult, :consult_create, :consult_edit, :consult_update]
|
||||||
|
|
||||||
before_action :admin_space, :except => :print
|
before_action :admin_space, :except => :print
|
||||||
|
|
||||||
@ -267,6 +267,7 @@ class Admin::PriceDocumentsController < ApplicationController
|
|||||||
|
|
||||||
|
|
||||||
def consult
|
def consult
|
||||||
|
@consult = true
|
||||||
|
|
||||||
@demande = PriceDocument.where(:f_token => params[:id]).first
|
@demande = PriceDocument.where(:f_token => params[:id]).first
|
||||||
|
|
||||||
@ -284,6 +285,28 @@ class Admin::PriceDocumentsController < ApplicationController
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def consult_create
|
||||||
|
@consult = true
|
||||||
|
|
||||||
|
@price_document = PriceDocument.new(params.require(:price_document).permit!)
|
||||||
|
@price_document.date = Date.today
|
||||||
|
if @price_document.save
|
||||||
|
redirect_to consult_edit_admin_price_document_path(:id => @price_document.token)
|
||||||
|
else
|
||||||
|
render action: "consult"
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def consult_edit
|
||||||
|
@consult = true
|
||||||
|
|
||||||
|
@price_document = PriceDocument.where(:token => params[:id]).first
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@price_document = PriceDocument.find(params[:id])
|
@price_document = PriceDocument.find(params[:id])
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class Admin::PriceLinesController < ApplicationController
|
class Admin::PriceLinesController < ApplicationController
|
||||||
layout "admin"
|
layout "admin"
|
||||||
before_action :auth_admin
|
before_action :auth_admin, :except => [:edit, :update]
|
||||||
|
|
||||||
before_action :admin_space
|
before_action :admin_space
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ module TranslationHelper
|
|||||||
content = capture(&block) if block_given?
|
content = capture(&block) if block_given?
|
||||||
r = ""
|
r = ""
|
||||||
|
|
||||||
if current_admin.id == 1
|
if current_admin and current_admin.id == 1
|
||||||
r += "<span class='admin_diag'>"
|
r += "<span class='admin_diag'>"
|
||||||
r += ic(:"stethoscope") if show_icon
|
r += ic(:"stethoscope") if show_icon
|
||||||
|
|
||||||
|
@ -17,7 +17,10 @@ class PriceLine < ApplicationRecord
|
|||||||
:ref => {:name => "Ref", :reorder => true},
|
:ref => {:name => "Ref", :reorder => true},
|
||||||
:title => {:name => "Désignation", :reorder => true},
|
:title => {:name => "Désignation", :reorder => true},
|
||||||
:qte => {:name => "Qté", :reorder => true},
|
:qte => {:name => "Qté", :reorder => true},
|
||||||
|
|
||||||
:qte_available => {:name => "Qté dispo.", :reorder => true},
|
:qte_available => {:name => "Qté dispo.", :reorder => true},
|
||||||
|
|
||||||
|
:ct_u_price_ht => {:name => "Prix de vente", :reorder => true},
|
||||||
:ref_fournisseur => {:name => "Réf. fournisseur", :reorder => true},
|
:ref_fournisseur => {:name => "Réf. fournisseur", :reorder => true},
|
||||||
:p_product_power_id => {:name => "Chargeur", :reorder => true},
|
:p_product_power_id => {:name => "Chargeur", :reorder => true},
|
||||||
:p_product_zone_id => {:name => "Zone", :reorder => true},
|
:p_product_zone_id => {:name => "Zone", :reorder => true},
|
||||||
@ -26,7 +29,8 @@ class PriceLine < ApplicationRecord
|
|||||||
:ram_unit => {:name => "Ram unité", :reorder => true},
|
:ram_unit => {:name => "Ram unité", :reorder => true},
|
||||||
:eu => {:name => "EU ?", :reorder => true},
|
:eu => {:name => "EU ?", :reorder => true},
|
||||||
:fullkit => {:name => "Fullkit ?", :reorder => true},
|
:fullkit => {:name => "Fullkit ?", :reorder => true},
|
||||||
:lang_start => {:name => "Démarrage écran langue ?", :reorder => true}
|
:lang_start => {:name => "Démarrage écran langue ?", :reorder => true},
|
||||||
|
:actions => {:name => "Actions"}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,24 @@
|
|||||||
.qi_header
|
-if current_admin
|
||||||
|
.qi_header
|
||||||
|
|
||||||
%h1
|
%h1
|
||||||
Consultation fournisseur
|
Consultation fournisseur
|
||||||
%span
|
%span
|
||||||
=@demande.list_designaton
|
=@demande.list_designaton
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.qi_row
|
.qi_row
|
||||||
|
|
||||||
=semantic_form_for [:admin, @price_document], :html => {:class => "qi_price_form"}, :remote => false do |f|
|
%p{:style => "text-align:center;font-size:1.2em;"}
|
||||||
|
Vous allez pouvoir répondre à une demande de cotation envoyée par Arcom.
|
||||||
|
%p{:style => "text-align:center;font-size:1.2em;"}
|
||||||
|
Pour cela, merci de nous indiquer pour quelle société vous répondez à notre demande de chiffrage.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=semantic_form_for [:admin, @price_document], :url => consult_create_admin_price_documents_path(), :html => {:class => "qi_price_form"}, :remote => false do |f|
|
||||||
-@p_customer = @price_document.p_customer
|
-@p_customer = @price_document.p_customer
|
||||||
=diag do
|
=diag do
|
||||||
=f.object.errors.messages
|
=f.object.errors.messages
|
||||||
@ -22,24 +31,23 @@
|
|||||||
=f.hidden_field :price_document_type_id
|
=f.hidden_field :price_document_type_id
|
||||||
|
|
||||||
|
|
||||||
= f.input :public_fournisseur_name, :label => "Nom entreprise"
|
%center= f.input :public_fournisseur_name, :label => "Nom de votre société :"
|
||||||
|
|
||||||
|
|
||||||
|
%p{:style => "text-align:center;font-size:1.2em;"}
|
||||||
|
Vous pouvez également indiquer votre référence interne :
|
||||||
|
|
||||||
|
|
||||||
=hidden_field_tag :public_edit, params[:public_edit]
|
=hidden_field_tag :public_edit, params[:public_edit]
|
||||||
|
|
||||||
= @price_document.price_line_block.block_type
|
|
||||||
|
|
||||||
|
|
||||||
.price_line_block_form
|
.price_line_block_form
|
||||||
=f.semantic_fields_for :price_line_block do |f|
|
=f.semantic_fields_for :price_line_block do |f|
|
||||||
=render :partial => "admin/price_line_blocks/form_#{f.object.block_type_slug}", :locals => {:f => f}
|
%center=render :partial => "admin/price_line_blocks/form_#{f.object.block_type_slug}", :locals => {:f => f}
|
||||||
|
|
||||||
|
|
||||||
|
%center
|
||||||
|
=f.submit "sauvegarder", :class => "btn btn-primary"
|
||||||
|
|
||||||
|
|
||||||
.large_actions
|
|
||||||
.actions=f.submit "sauvegarder", :class => "btn btn-primary"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
38
app/views/admin/price_documents/consult_edit.html.haml
Normal file
38
app/views/admin/price_documents/consult_edit.html.haml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
.qi_row
|
||||||
|
.qi_pannel.padding
|
||||||
|
|
||||||
|
%table.table.table-striped
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
Numéro réponse
|
||||||
|
|
||||||
|
%td
|
||||||
|
=@price_document.d_number
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
Nom fournisseur saisi
|
||||||
|
%td
|
||||||
|
=@price_document.public_fournisseur_name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-params[:search][:per_page] = params[:search][:per_page] || 5000
|
||||||
|
-per_page = params[:search][:per_page]
|
||||||
|
-page = (params[:page] and params[:page] != "") ? params[:page] : 1
|
||||||
|
|
||||||
|
-@price_lines = @price_document.price_line_block.price_lines
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-@price_lines = sort_by_sorting(@price_lines, "created_at DESC")
|
||||||
|
-@price_lines = @price_lines.page(page).per(per_page)
|
||||||
|
%br
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.clear
|
||||||
|
=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @price_lines, :key => "reponses-prix-show"}
|
||||||
|
|
||||||
|
|
@ -3,17 +3,19 @@
|
|||||||
|
|
||||||
|
|
||||||
-if !@p_customer_sheet or (@p_customer_sheet and @p_customer_sheet.state != "commande")
|
-if !@p_customer_sheet or (@p_customer_sheet and @p_customer_sheet.state != "commande")
|
||||||
.qi_pannel.qi_plain.padding{:style => "margin:20px 0;"}
|
|
||||||
|
|
||||||
= f.input :p_fournisseur_id, :label => "Fournisseur", :collection => PFournisseur.all, :as => :select, :member_label => :name if @price_document.label == "Réponse fournisseur" and current_admin
|
|
||||||
= f.input :customer_ref, :label => "Référence cotation fournisseur :"
|
|
||||||
|
|
||||||
|
|
||||||
.price_lines_form
|
|
||||||
=f.semantic_fields_for :price_lines do |f|
|
|
||||||
=render :partial => "admin/price_lines/form_#{f.object.block_type_slug}", :locals => {:form => f}
|
|
||||||
|
|
||||||
%p= link_to_add_fields "Ajouter une ligne", f, :price_lines, {:class => "btn btn-primary"}
|
|
||||||
|
= f.input :p_fournisseur_id, :label => "Fournisseur", :collection => PFournisseur.all, :as => :select, :member_label => :name if @price_document.label == "Réponse fournisseur" and current_admin
|
||||||
|
= f.input :customer_ref, :label => "Votre référence de cotation :"
|
||||||
|
|
||||||
|
|
||||||
|
%div{:style => ("display:none" if !current_admin)}
|
||||||
|
|
||||||
|
.price_lines_form
|
||||||
|
=f.semantic_fields_for :price_lines do |f|
|
||||||
|
=render :partial => "admin/price_lines/form_#{f.object.block_type_slug}", :locals => {:form => f}
|
||||||
|
|
||||||
|
%p= link_to_add_fields "Ajouter une ligne", f, :price_lines, {:class => "btn btn-primary"} if current_admin
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@
|
|||||||
-else
|
-else
|
||||||
=qi_js_field(form, :price_line, :price_u_ht, :label => "Prix U HT :")
|
=qi_js_field(form, :price_line, :price_u_ht, :label => "Prix U HT :")
|
||||||
|
|
||||||
%div{:style => ("display:none;" if !current_admin.has_permission?("customer-sheets-personalised-price"))}
|
%div{:style => ("display:none;" if !current_admin or !current_admin.has_permission?("customer-sheets-personalised-price"))}
|
||||||
= form.input :forced_price, :label => "Prix personnalisé ?", :as => :boolean, :input_html => {:class => "input_price_line_forced_price"}
|
= form.input :forced_price, :label => "Prix personnalisé ?", :as => :boolean, :input_html => {:class => "input_price_line_forced_price"}
|
||||||
.forced_price_wrapper{:style => ("display:none;" if !form.object.forced_price)}= form.input :ct_u_price_ht, :label => false, :input_html => {:class => "input_price_line_ct_u_price_ht"}
|
.forced_price_wrapper{:style => ("display:none;" if !form.object.forced_price)}= form.input :ct_u_price_ht, :label => false, :input_html => {:class => "input_price_line_ct_u_price_ht"}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
= form.input :ram, :label => "Ram"
|
= form.input :ram, :label => "Ram"
|
||||||
|
|
||||||
%td
|
%td
|
||||||
= form.input :ram, :label => "Ram unité"
|
= form.input :ram_unit, :label => "Ram unité"
|
||||||
|
|
||||||
|
|
||||||
%td
|
%td
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
%tr#price_document_row{:id => price_line.id}
|
%tr#price_line_row{:id => price_line.id}
|
||||||
-tr = {}
|
-tr = {}
|
||||||
|
-tr[:actions] = capture do
|
||||||
|
%td
|
||||||
|
=link_to ic(:pencil), edit_admin_price_line_path(price_line), :remote => true
|
||||||
=render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => price_line}
|
=render :partial => "qi/qi_ordered_table_object", :locals => {:tr => tr, :object => price_line}
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
|
||||||
|
=semantic_form_for [:admin, @price_line], :remote => true do |form|
|
||||||
|
|
||||||
|
.content
|
||||||
|
Produit :
|
||||||
|
=form.object.p_product_ref.cc_name if form.object.p_product_ref
|
||||||
|
%br
|
||||||
|
Quantité à satisfaire :
|
||||||
|
=form.object.qte
|
||||||
|
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
|
||||||
|
%table.top_td{:style => "width:100%;"}
|
||||||
|
%tr
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :p_product_power_id, :label => "Type de chargeur", :collection => PProductPower.all, :include_blank => false, :as => :select
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :qte_available, :label => "Qté disponible :", :input_html => {:class => "input_price_line_qte"}
|
||||||
|
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :ct_u_price_ht, :label => "Prix vente"
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :ready_stock, :label => "Ready stock", :as => :select
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :ram, :label => "Ram"
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :ram_unit, :label => "Ram unité"
|
||||||
|
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :eu, :label => "EU ?", :as => :select
|
||||||
|
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :p_product_zone_id, :label => "Zone", :collection => PProductZone.all, :include_blank => true, :as => :select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :fullkit, :label => "Fullkit", :as => :select
|
||||||
|
|
||||||
|
%td
|
||||||
|
= form.input :lang_start, :label => "Démarage sur l'écran de langue (starting on screen language)", :as => :select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
= form.input :comment, :label => "Commentaire", :input_html => {:style => "height:70px;"}
|
||||||
|
|
||||||
|
.actions= form.submit "Sauvegarder", :class => "btn btn-primary"
|
||||||
|
|
@ -1 +1 @@
|
|||||||
show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);
|
show_pane_hover("<%= escape_javascript(render(:partial => "reponse_pane_hover_form"))%>",1200,900);
|
@ -30,50 +30,51 @@
|
|||||||
=link_to image_tag("/logo-presta.png"), "/", :id => "logo"
|
=link_to image_tag("/logo-presta.png"), "/", :id => "logo"
|
||||||
|
|
||||||
|
|
||||||
|
-if current_admin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-@qi_menus.each do |k,v|
|
-@qi_menus.each do |k,v|
|
||||||
|
|
||||||
:scss
|
:scss
|
||||||
#body_#{k.to_s}{
|
#body_#{k.to_s}{
|
||||||
#admin_nav{
|
#admin_nav{
|
||||||
//background:$big_color_#{k.to_s} !important;
|
//background:$big_color_#{k.to_s} !important;
|
||||||
background-color: #{v[:color].to_s} !important;
|
background-color: #{v[:color].to_s} !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#big_cat_#{k.to_s}.active, #big_cat_#{k.to_s}:hover{
|
#big_cat_#{k.to_s}.active, #big_cat_#{k.to_s}:hover{
|
||||||
//color:$big_color_#{k.to_s} !important;
|
//color:$big_color_#{k.to_s} !important;
|
||||||
//background-color: #{v[:color].to_s} !important;
|
//background-color: #{v[:color].to_s} !important;
|
||||||
color:white !important;
|
color:white !important;
|
||||||
border-right:4px solid #{v[:color].to_s};
|
border-right:4px solid #{v[:color].to_s};
|
||||||
}
|
}
|
||||||
|
|
||||||
#big_cat_#{k.to_s}{
|
#big_cat_#{k.to_s}{
|
||||||
//color:$big_color_#{k.to_s} !important;
|
//color:$big_color_#{k.to_s} !important;
|
||||||
color: rgba(white, 0.5) !important;
|
color: rgba(white, 0.5) !important;
|
||||||
border-right:4px solid transparent;
|
border-right:4px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bgbd-#{k.to_s}{
|
.bgbd-#{k.to_s}{
|
||||||
background-color: #{v[:color].to_s} !important;
|
background-color: #{v[:color].to_s} !important;
|
||||||
border-color: #{v[:color].to_s} !important;
|
border-color: #{v[:color].to_s} !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.element
|
.element
|
||||||
=link_to v[:link] do
|
=link_to v[:link] do
|
||||||
.cat#big_cat{:id => k.to_s}
|
.cat#big_cat{:id => k.to_s}
|
||||||
=ic v[:icon].to_s.to_sym
|
=ic v[:icon].to_s.to_sym
|
||||||
=v[:name]
|
=v[:name]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.bottom
|
.bottom
|
||||||
.element
|
.element
|
||||||
|
|
||||||
-if current_admin.has_permission?("admins")
|
-if current_admin and current_admin.has_permission?("admins")
|
||||||
=link_to admin_admins_path do
|
=link_to admin_admins_path do
|
||||||
.cat#big_cat_preferences
|
.cat#big_cat_preferences
|
||||||
=ic :"cog"
|
=ic :"cog"
|
||||||
@ -90,92 +91,93 @@
|
|||||||
%nav#admin_nav.navbar.navbar-expand-lg.navbar-dark.bg-light
|
%nav#admin_nav.navbar.navbar-expand-lg.navbar-dark.bg-light
|
||||||
%button.navbar-toggler{"aria-controls" => "navbarSupportedContent", "aria-expanded" => "false", "aria-label" => "Toggle navigation", "data-target" => "#navbarSupportedContent", "data-toggle" => "collapse", :type => "button"}
|
%button.navbar-toggler{"aria-controls" => "navbarSupportedContent", "aria-expanded" => "false", "aria-label" => "Toggle navigation", "data-target" => "#navbarSupportedContent", "data-toggle" => "collapse", :type => "button"}
|
||||||
%span.navbar-toggler-icon
|
%span.navbar-toggler-icon
|
||||||
#navbarSupportedContent.collapse.navbar-collapse
|
-if current_admin
|
||||||
%ul.navbar-nav.mr-auto
|
#navbarSupportedContent.collapse.navbar-collapse
|
||||||
-if @qi_menu_active
|
%ul.navbar-nav.mr-auto
|
||||||
-qi_menu_active = @qi_menus[@qi_menu_active]
|
-if @qi_menu_active
|
||||||
|
-qi_menu_active = @qi_menus[@qi_menu_active]
|
||||||
|
|
||||||
-if qi_menu_active[:elements]
|
-if qi_menu_active[:elements]
|
||||||
-qi_menu_active[:elements].each do |k,v|
|
-qi_menu_active[:elements].each do |k,v|
|
||||||
%li.nav-item= link_to v[:name], v[:link], :class => "nav-link "+("active" if (@qi_menu_sub_menu_active and @qi_menu_sub_menu_active == k)).to_s
|
%li.nav-item= link_to v[:name], v[:link], :class => "nav-link "+("active" if (@qi_menu_sub_menu_active and @qi_menu_sub_menu_active == k)).to_s
|
||||||
|
|
||||||
%script
|
%script
|
||||||
=raw '$("#big_cat_'+@qi_menu_active.to_s+'").addClass("active");'
|
=raw '$("#big_cat_'+@qi_menu_active.to_s+'").addClass("active");'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%form.form-inline.my-2.my-lg-0
|
%form.form-inline.my-2.my-lg-0
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
%li.nav-item.qi_help_remove{:style => ("display:none" if !session[:qi_helps] )}
|
%li.nav-item.qi_help_remove{:style => ("display:none" if !session[:qi_helps] )}
|
||||||
|
|
||||||
=link_to ic(:"question-circle"), admin_qi_helps_path(), :onclick => '$(".qi_help").hide();$(".qi_help_add").show();$(".qi_help_remove").hide();', :remote => true, :class => "nav-link"
|
=link_to ic(:"question-circle"), admin_qi_helps_path(), :onclick => '$(".qi_help").hide();$(".qi_help_add").show();$(".qi_help_remove").hide();', :remote => true, :class => "nav-link"
|
||||||
|
|
||||||
|
|
||||||
%li.nav-item.qi_help_add{:style => ("display:none" if session[:qi_helps] )}
|
%li.nav-item.qi_help_add{:style => ("display:none" if session[:qi_helps] )}
|
||||||
=link_to ic(:"question-circle-o"), admin_qi_helps_path(:enabled => true), :onclick => '$(".qi_help").show();$(".qi_help_add").hide();$(".qi_help_remove").show();', :remote => true, :class => "nav-link"
|
=link_to ic(:"question-circle-o"), admin_qi_helps_path(:enabled => true), :onclick => '$(".qi_help").show();$(".qi_help_add").hide();$(".qi_help_remove").show();', :remote => true, :class => "nav-link"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-if session[:qi_helps]
|
-if session[:qi_helps]
|
||||||
:scss
|
:scss
|
||||||
.qi_help{
|
.qi_help{
|
||||||
display:inherit;
|
display:inherit;
|
||||||
|
|
||||||
|
}
|
||||||
|
-else
|
||||||
|
:scss
|
||||||
|
.qi_help{
|
||||||
|
display:none;
|
||||||
|
|
||||||
}
|
}
|
||||||
-else
|
|
||||||
:scss
|
|
||||||
.qi_help{
|
|
||||||
display:none;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%li.nav-item.qi_stat_remove{:style => ("display:none" if !session[:qi_stats] )}
|
%li.nav-item.qi_stat_remove{:style => ("display:none" if !session[:qi_stats] )}
|
||||||
|
|
||||||
=link_to raw("<span class='qi_stat_active'>"+ic(:"pie-chart")+"</span>"), admin_qi_stats_path(), :onclick => '$(".qi_stat, .qi_kpi").show();$(".qi_stat_add").show();$(".qi_stat_remove").hide();', :remote => true, :class => "nav-link"
|
=link_to raw("<span class='qi_stat_active'>"+ic(:"pie-chart")+"</span>"), admin_qi_stats_path(), :onclick => '$(".qi_stat, .qi_kpi").show();$(".qi_stat_add").show();$(".qi_stat_remove").hide();', :remote => true, :class => "nav-link"
|
||||||
|
|
||||||
|
|
||||||
%li.nav-item.qi_stat_add{:style => ("display:none" if session[:qi_stats] )}
|
%li.nav-item.qi_stat_add{:style => ("display:none" if session[:qi_stats] )}
|
||||||
=link_to ic(:"pie-chart"), admin_qi_stats_path(:enabled => true), :onclick => '$(".qi_stat, .qi_kpi").hide();$(".qi_stat_add").hide();$(".qi_stat_remove").show();', :remote => true, :class => "nav-link"
|
=link_to ic(:"pie-chart"), admin_qi_stats_path(:enabled => true), :onclick => '$(".qi_stat, .qi_kpi").hide();$(".qi_stat_add").hide();$(".qi_stat_remove").show();', :remote => true, :class => "nav-link"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-if session[:qi_stats]
|
-if session[:qi_stats]
|
||||||
:scss
|
:scss
|
||||||
.qi_stat, .qi_kpi{
|
.qi_stat, .qi_kpi{
|
||||||
display:none;
|
display:none;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
-else
|
|
||||||
:scss
|
|
||||||
.qi_stat, .qi_kpi{
|
|
||||||
display:inherit;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-else
|
||||||
|
:scss
|
||||||
|
.qi_stat, .qi_kpi{
|
||||||
|
display:inherit;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%li.nav-item.dropdown
|
%li.nav-item.dropdown
|
||||||
%a#navbarDropdown.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"}
|
%a#navbarDropdown.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "#", :role => "button"}
|
||||||
=current_admin.firstname
|
=current_admin.firstname
|
||||||
=current_admin.name
|
=current_admin.name
|
||||||
|
|
||||||
|
|
||||||
.dropdown-menu{"aria-labelledby" => "navbarDropdown"}
|
.dropdown-menu{"aria-labelledby" => "navbarDropdown"}
|
||||||
= link_to "Gestion des admins", admin_admins_path, :class => "dropdown-item" if current_admin.super_admin
|
= link_to "Gestion des admins", admin_admins_path, :class => "dropdown-item" if current_admin.super_admin
|
||||||
.dropdown-divider
|
.dropdown-divider
|
||||||
=link_to "Se déconnecter", admin_admin_auth_path(1), method: :delete, :class => "dropdown-item"
|
=link_to "Se déconnecter", admin_admin_auth_path(1), method: :delete, :class => "dropdown-item"
|
||||||
|
|
||||||
-if super_current_admin
|
-if super_current_admin
|
||||||
%li.nav-item
|
%li.nav-item
|
||||||
=link_to ic(:"user-secret"), admin_admins_path, :class => "nav-link"
|
=link_to ic(:"user-secret"), admin_admins_path, :class => "nav-link"
|
||||||
|
|
||||||
|
|
||||||
%li.nav-item
|
%li.nav-item
|
||||||
=link_to ic(:refresh), "#", :onclick => "location.reload();", :class => "nav-link"
|
=link_to ic(:refresh), "#", :onclick => "location.reload();", :class => "nav-link"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -612,10 +612,15 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
get :consult
|
get :consult
|
||||||
post :consult_save
|
post :consult_save
|
||||||
|
post :consult_create
|
||||||
|
get :consult_edit
|
||||||
|
put :consult_update
|
||||||
|
|
||||||
end
|
end
|
||||||
collection do
|
collection do
|
||||||
get :search_to_affect
|
get :search_to_affect
|
||||||
|
post :consult_create
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user