add breadcrumb to views

This commit is contained in:
Barnabé 2021-09-28 12:29:38 +02:00
parent 973182221e
commit 4d3ccfd221
35 changed files with 114 additions and 209 deletions

View File

@ -2,9 +2,7 @@
.qi_header .qi_header
.right .right
=link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary btn-ap-add" =link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary btn-ap-add"
= breadcrumb
%h1
Tableaux de bord achats
.qi_search_row .qi_search_row

View File

@ -4,8 +4,7 @@
= link_to ic(:minus)+' Sortie de stock', new_admin_stock_movement_path(:movement_type => "deb"), :class => "btn btn-primary bgbd-documents", :remote => true = link_to ic(:minus)+' Sortie de stock', new_admin_stock_movement_path(:movement_type => "deb"), :class => "btn btn-primary bgbd-documents", :remote => true
= link_to ic(:plus)+' Entrée de stock', new_admin_stock_movement_path(:movement_type => "cred"), :class => "btn btn-primary bgbd-documents", :remote => true = link_to ic(:plus)+' Entrée de stock', new_admin_stock_movement_path(:movement_type => "cred"), :class => "btn btn-primary bgbd-documents", :remote => true
%h1 = breadcrumb
Mouvements de stocks

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_article_serial_num_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_article_serial_num_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 =breadcrumb
=PArticleSerialNum.human rescue ""

View File

@ -33,7 +33,7 @@
%td.actions %td.actions
= link_to i(:"trash-o"), [:admin, p_article], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true = link_to i(:"trash-o"), [:admin, p_article], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet enregistrement ? ' } , :remote => true
= link_to i(:pencil), edit_admin_p_article_path(p_article), :remote => true = link_to i(:pencil), edit_admin_p_article_path(p_article), :remote => true
= link_to i(:eye), admin_p_article_path(p_article), :remote => true =# link_to i(:eye), admin_p_article_path(p_article), :remote => true

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_article_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_article_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 =breadcrumb
=PArticle.human rescue ""

View File

@ -1,9 +1,6 @@
.qi_header .qi_header
.right= link_to 'Ajouter un export', new_admin_p_compta_export_path(), :class => "btn btn-primary", :remote => true .right= link_to 'Ajouter un export', new_admin_p_compta_export_path(), :class => "btn btn-primary", :remote => true
%h1 = breadcrumb
Stats
%span
Exports comptable
@ -30,4 +27,4 @@
%tbody#p_compta_exports_rows %tbody#p_compta_exports_rows
=render @p_compta_exports =render @p_compta_exports

View File

@ -1,10 +1,5 @@
.qi_header .qi_header
%h1 = breadcrumb
Ventes
%span
=link_to "Demandes de commande", admin_p_customer_sheets_path()
%span
Modifier une demande

View File

@ -1,10 +1,7 @@
.qi_header .qi_header
.right .right
=link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary btn-ap-add" =link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary btn-ap-add"
%h1 = breadcrumb
Ventes
%span
Demandes de commande
.qi_search_row .qi_search_row

View File

@ -12,12 +12,7 @@
= link_to i(:pencil), edit_admin_p_customer_sheet_path(@p_customer_sheet), :remote => false = link_to i(:pencil), edit_admin_p_customer_sheet_path(@p_customer_sheet), :remote => false
%h1 = breadcrumb
Ventes
%span
=link_to "Demande de commandes",admin_p_customer_sheets_path
%span
="#{@p_customer_sheet.com_counter}"
.qi_row .qi_row
@ -114,4 +109,4 @@
=render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @price_documents} =render :partial => "qi/qi_ordered_table", :locals => {:qi_ordered_table_collection => @price_documents}

View File

@ -1,5 +1,5 @@
.qi_header .qi_header
=breadcrumb(record: @p_customer.name) =breadcrumb record: @p_customer.name
= render 'form' = render 'form'

View File

@ -4,10 +4,11 @@
-if current_admin.has_permission?("customers-c") -if current_admin.has_permission?("customers-c")
.right= link_to ic(:plus)+' Ajouter un client', new_admin_p_customer_path(), :class => "btn btn-primary btn-ap-add", :remote => false .right= link_to ic(:plus)+' Ajouter un client', new_admin_p_customer_path(), :class => "btn btn-primary btn-ap-add", :remote => false
=breadcrumb
-else -else
.right .right
=link_to "< Retour aux demandes de commande", admin_p_customer_sheets_path =link_to "< Retour aux commandes", admin_p_customer_sheets_path
=breadcrumb =breadcrumb first_title: "Commandes" , first_link: admin_p_customer_sheets_path ,second_title: "Demande de commande", last_element: 'Selectioner un client', default_crud: false

View File

@ -3,7 +3,7 @@
= link_to i(:pencil), edit_admin_p_customer_path(@p_customer), :remote => false = link_to i(:pencil), edit_admin_p_customer_path(@p_customer), :remote => false
=breadcrumb(record: "#{@p_customer.code} - #{@p_customer.show_name}") =breadcrumb record: @p_customer.name

View File

@ -2,10 +2,7 @@
.right .right
= link_to 'Ajouter un fournisseur', new_admin_p_fournisseur_path(), :class => "btn btn-primary", :remote => true = link_to 'Ajouter un fournisseur', new_admin_p_fournisseur_path(), :class => "btn btn-primary", :remote => true
%h1 =breadcrumb
Achats
%span
Fournisseurs
.qi_row .qi_row
@ -28,4 +25,4 @@
%tbody#p_fournisseurs_rows %tbody#p_fournisseurs_rows
=render @p_fournisseurs =render @p_fournisseurs

View File

@ -1,9 +1,6 @@
.qi_header .qi_header
.right= link_to 'Ajouter un type de paiement', new_admin_p_payment_type_path(), :class => "btn btn-primary", :remote => true .right= link_to 'Ajouter un type de paiement', new_admin_p_payment_type_path(), :class => "btn btn-primary", :remote => true
%h1 = breadcrumb
Paiements
%span
Types de paiement
.qi_row .qi_row
@ -19,4 +16,4 @@
%tbody#p_payment_types_rows %tbody#p_payment_types_rows
=render @p_payment_types =render @p_payment_types

View File

@ -1,9 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter un paiement', new_admin_p_payment_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter un paiement', new_admin_p_payment_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 = breadcrumb
Paiements
%span
Liste des paiements
.qi_search_row .qi_search_row
=form_tag "", :method => "get", :onsubmit => "" do =form_tag "", :method => "get", :onsubmit => "" do
@ -117,4 +114,4 @@

View File

@ -1,9 +1,6 @@
.qi_header .qi_header
.right= link_to 'Ajouter une catégorie', new_admin_p_product_cat_path(), :class => "btn btn-primary", :remote => true .right= link_to 'Ajouter une catégorie', new_admin_p_product_cat_path(), :class => "btn btn-primary", :remote => true
%h1 =breadcrumb
Achats
%span
Catégories produit
.qi_row .qi_row
@ -21,4 +18,4 @@
%tbody#p_product_cats_rows %tbody#p_product_cats_rows
=render @p_product_cats =render @p_product_cats

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_product_color_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_product_color_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 =breadcrumb
=PProductColor.human

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_product_power_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_product_power_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 = breadcrumb
=PProductPower.human rescue ""

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_product_ref_spec_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_product_ref_spec_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 = breadcrumb
=PProductRefSpec.human rescue ""

View File

@ -1,10 +1,7 @@
-if !@manager -if !@manager
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary btn-ap-add", :remote => false .right= link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary btn-ap-add", :remote => false
%h1 =breadcrumb
Achats
%span
Références
@ -57,4 +54,4 @@
:coffeescript :coffeescript
$(".qi_search_row form").on "submit", -> $(".qi_search_row form").on "submit", ->
$("#p_product_refs_index_wrapper").html('recherche en cours ...') $("#p_product_refs_index_wrapper").html('recherche en cours ...')

View File

@ -1,15 +1,7 @@
.qi_header .qi_header
.right .right
= link_to i(:pencil), edit_admin_p_product_path(@p_product_ref.p_product), :remote => false if @p_product_ref.p_product = link_to i(:pencil), edit_admin_p_product_path(@p_product_ref.p_product), :remote => false if @p_product_ref.p_product
%h1 =breadcrumb record: @p_product_ref.p_product.name + " - " + @p_product_ref.ct_sub_name
Références produits
%span
Détail d'une référence
%span
=@p_product_ref.p_product.name
="-"
=@p_product_ref.ct_sub_name
.qi_row .qi_row
@ -20,9 +12,10 @@
%td Produit %td Produit
%td=@p_product_ref.p_product.name #link_to @p_product_ref.p_product.name, [:admin, @p_product_ref.p_product] %td=@p_product_ref.p_product.name #link_to @p_product_ref.p_product.name, [:admin, @p_product_ref.p_product]
%tr -if false
%td Actif ? %tr
%td=@p_product_ref.enabled ? "Oui" : "Non" %td Actif ?
%td=@p_product_ref.enabled ? "Oui" : "Non"
%tr %tr
@ -45,30 +38,31 @@
%td Unité de vente (archive) : %td Unité de vente (archive) :
%td= @p_product_ref.uv %td= @p_product_ref.uv
%tr -if false
%td Conditionnement de référence : %tr
%td %td Conditionnement de référence :
-if @p_product_ref.p_product and @p_product_ref.p_product.p_product_conditioning %td
= @p_product_ref.p_product.p_product_conditioning.name -if @p_product_ref.p_product and @p_product_ref.p_product.p_product_conditioning
= @p_product_ref.p_product.p_product_conditioning.name
%tr
%td Conditionnement :
%td
-if @p_product_ref.p_product_conditioning
= @p_product_ref.p_product_conditioning.name
%tr %tr
%td Conditionnement : %td Quantité par rapport au conditionnement de référence :
%td %td
-if @p_product_ref.p_product_conditioning = @p_product_ref.conditioning_ref_qte
= @p_product_ref.p_product_conditioning.name
%tr %tr
%td Quantité par rapport au conditionnement de référence : %td Prix de vente à l'unité de référence
%td %td
= @p_product_ref.conditioning_ref_qte =number_to_currency( @p_product_ref.ct_price_ht / @p_product_ref.conditioning_ref_qte, :precision => 3) if @p_product_ref.ct_price_ht? and @p_product_ref.conditioning_ref_qte?
="/"
%tr = @p_product_ref.p_product.p_product_conditioning.name if @p_product_ref.p_product.p_product_conditioning
%td Prix de vente à l'unité de référence
%td
=number_to_currency( @p_product_ref.ct_price_ht / @p_product_ref.conditioning_ref_qte, :precision => 3) if @p_product_ref.ct_price_ht? and @p_product_ref.conditioning_ref_qte?
="/"
= @p_product_ref.p_product.p_product_conditioning.name if @p_product_ref.p_product.p_product_conditioning
-if @p_product_ref -if @p_product_ref
@ -132,41 +126,41 @@
sortis sortis
.clear .clear
-if false
.qi_row
.qi_pannel
%h3 Historique des prix d'achat
.qi_row %table.table.table-striped.table-hover.table-bordered
.qi_pannel
%h3 Historique des prix d'achat
%table.table.table-striped.table-hover.table-bordered
%tr
%th
Date
%th Fournisseur
%th Document
%th Total
%th Qté
%th P.U.
-price_line_achats = PriceLine.joins(:price_lineable).joins(:price_line_block).where(:cc_block_type => "Facture achat").where(:p_product_ref_id => @p_product_ref.id).order("price_documents.date DESC").each do |price_line|
%tr %tr
%td %th
=l price_line.price_line_block.price_lineable.date, :format => :date Date
%th Fournisseur
%th Document
%th Total
%th Qté
%th P.U.
-price_line_achats = PriceLine.joins(:price_lineable).joins(:price_line_block).where(:cc_block_type => "Facture achat").where(:p_product_ref_id => @p_product_ref.id).order("price_documents.date DESC").each do |price_line|
%tr
%td
=l price_line.price_line_block.price_lineable.date, :format => :date
%td
=link_to price_line.price_lineable.p_fournisseur.show_name, [:admin, price_line.price_lineable.p_fournisseur] if price_line.price_lineable.p_fournisseur
%td
=link_to price_line.price_lineable.d_number, [:admin, price_line.price_lineable]
%td
=number_to_currency price_line.tot_amount_ht
%td
=price_line.qte
%td
=number_to_currency price_line.price_u_ht
%td
=link_to price_line.price_lineable.p_fournisseur.show_name, [:admin, price_line.price_lineable.p_fournisseur] if price_line.price_lineable.p_fournisseur
%td
=link_to price_line.price_lineable.d_number, [:admin, price_line.price_lineable]
%td
=number_to_currency price_line.tot_amount_ht
%td
=price_line.qte
%td
=number_to_currency price_line.price_u_ht

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_product_zone_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_product_zone_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 = breadcrumb
=PProductZone.human

View File

@ -1,11 +1,5 @@
.qi_header .qi_header
%h1 =breadcrumb record: @p_product.code + ' - ' + @p_product.name
Achats
%span
=link_to "Produits", admin_p_products_path()
%span
Modifier un produit
= render 'form' = render 'form'

View File

@ -1,9 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary btn-ap-add", :remote => false .right= link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary btn-ap-add", :remote => false
%h1 =breadcrumb
Produits & Stocks
%span
Produits
.qi_search_row .qi_search_row

View File

@ -1,11 +1,5 @@
.qi_header .qi_header
%h1 =breadcrumb
Achats
%span
=link_to "Produits", admin_p_products_path()
%span
Ajouter un produit

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_serial_num_type_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_serial_num_type_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 = breadcrumb
=PSerialNumType.human rescue ""

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_spec_type_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_spec_type_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 = breadcrumb
=PSpecType.human rescue ""

View File

@ -1,7 +1,6 @@
.qi_header .qi_header
.right= link_to ic(:plus)+' Ajouter', new_admin_p_spec_value_path(), :class => "btn btn-primary btn-ap-add", :remote => true .right= link_to ic(:plus)+' Ajouter', new_admin_p_spec_value_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1 = breadcrumb
=PSpecValue.human rescue ""

View File

@ -1,11 +1,5 @@
.qi_header .qi_header
%h1 =breadcrumb second_title: "Demande de prix #{@price_document.d_number} - #{@price_document.list_designaton}", second_link: admin_price_document_path(@price_document) , last_element: "Analyse de des réponses"
Achats
%span
Analyse des réponces à la demande de prix n°
= link_to @price_document.d_number, admin_price_document_path(@price_document)
\-
= @price_document.list_designaton
-unmatched_fournisseur = 0 -unmatched_fournisseur = 0
=semantic_form_for [:admin, @price_document],url: analyse_reponses_save_admin_price_document_path, method: :post, :html => {:class => "qi_price_form"}, :remote => false do |form| =semantic_form_for [:admin, @price_document],url: analyse_reponses_save_admin_price_document_path, method: :post, :html => {:class => "qi_price_form"}, :remote => false do |form|

View File

@ -1,13 +1,6 @@
.qi_header .qi_header
=breadcrumb second_title: @price_document.label, second_link: admin_price_documents_path(:price_document_type_id => @price_document.price_document_type_id), record: @price_document.d_number
%h1
Documents comptables
%span
Modifier un document
%span
=@price_document.label
="-"
=@price_document.d_number
.qi_row=render :partial => "form" .qi_row=render :partial => "form"

View File

@ -1,21 +1,16 @@
.qi_header .qi_header
.right .right
-if false # params[:price_document_type_id].to_s == "5" -if params[:price_document_type_id].to_i == 6 # Facture Achat
=link_to ic(:plus)+" Ajouter un avoir", new_admin_price_document_path, :class => "btn btn-primary bgbd-ventes"
-elsif params[:price_document_type_id].to_i == 6
= link_to 'Ajouter une facture achat', new_admin_price_document_path(:document_type => "Facture d'achat"), :class => "btn btn-primary bgbd-documents", :remote => false = link_to 'Ajouter une facture achat', new_admin_price_document_path(:document_type => "Facture d'achat"), :class => "btn btn-primary bgbd-documents", :remote => false
-elsif params[:price_document_type_id].to_i == 4 # Commande Achat
-elsif params[:price_document_type_id].to_i == 7
= link_to 'Ajouter une commande achat', new_admin_price_document_path(:document_type => "Commande achat"), :class => "btn btn-primary bgbd-documents", :remote => false = link_to 'Ajouter une commande achat', new_admin_price_document_path(:document_type => "Commande achat"), :class => "btn btn-primary bgbd-documents", :remote => false
-elsif params[:price_document_type_id].to_i == 7
-else -else
=link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary bgbd-ventes" =link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary bgbd-ventes"
%h1
Documents -if params[:price_document_type_id]
%span =breadcrumb second_title: PriceDocumentType.find(params[:price_document_type_id]).label
Liste
.qi_search_row .qi_search_row

View File

@ -13,16 +13,8 @@
= link_to i(:download), print_admin_price_document_path(@price_document.token), :remote => false, :target => "_blank" if !PriceLineBlock::PURCHASE_BLOCKS.include?(@price_document.block_type) = link_to i(:download), print_admin_price_document_path(@price_document.token), :remote => false, :target => "_blank" if !PriceLineBlock::PURCHASE_BLOCKS.include?(@price_document.block_type)
%h1 =breadcrumb second_title: @price_document.label, second_link: admin_price_documents_path(:price_document_type_id => @price_document.price_document_type_id), record: @price_document.d_number
Documents
%span
=@price_document.price_document_type.label
%span
="##{@price_document.id}"
%span
=@price_document.d_number
.qi_row .qi_row

View File

@ -1,9 +1,6 @@
.qi_header .qi_header
.right= link_to 'Ajouter une marque', new_admin_s_brand_path(), :class => "btn btn-primary", :remote => true .right= link_to 'Ajouter une marque', new_admin_s_brand_path(), :class => "btn btn-primary", :remote => true
%h1 =breadcrumb
Marques
%span
Liste
.qi_row .qi_row
@ -18,4 +15,4 @@
%tbody#s_brands_rows %tbody#s_brands_rows
=render @s_brands =render @s_brands

View File

@ -3,7 +3,7 @@
= link_to ic(:minus)+' Sortie de stock', new_admin_stock_movement_path(:movement_type => "deb"), :class => "btn btn-primary bgbd-documents", :remote => true = link_to ic(:minus)+' Sortie de stock', new_admin_stock_movement_path(:movement_type => "deb"), :class => "btn btn-primary bgbd-documents", :remote => true
= link_to ic(:plus)+' Entrée de stock', new_admin_stock_movement_path(:movement_type => "cred"), :class => "btn btn-primary bgbd-documents", :remote => true = link_to ic(:plus)+' Entrée de stock', new_admin_stock_movement_path(:movement_type => "cred"), :class => "btn btn-primary bgbd-documents", :remote => true
%h1 Mouvements de stock manuels = breadcrumb

View File

@ -1,9 +1,6 @@
.qi_header .qi_header
%h1 = breadcrumb record: "mouvement ##{@stock_movement.id}"
Mouvements de stock manuels
%span
Détail du mouvement
="##{@stock_movement.id}"