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
.right
=link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary btn-ap-add"
%h1
Tableaux de bord achats
= breadcrumb
.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(:plus)+' Entrée de stock', new_admin_stock_movement_path(:movement_type => "cred"), :class => "btn btn-primary bgbd-documents", :remote => true
%h1
Mouvements de stocks
= breadcrumb

View File

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

View File

@ -33,7 +33,7 @@
%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(: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
.right= link_to ic(:plus)+' Ajouter', new_admin_p_article_path(), :class => "btn btn-primary btn-ap-add", :remote => true
%h1
=PArticle.human rescue ""
=breadcrumb

View File

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

View File

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

View File

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

View File

@ -12,12 +12,7 @@
= link_to i(:pencil), edit_admin_p_customer_sheet_path(@p_customer_sheet), :remote => false
%h1
Ventes
%span
=link_to "Demande de commandes",admin_p_customer_sheets_path
%span
="#{@p_customer_sheet.com_counter}"
= breadcrumb
.qi_row

View File

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

View File

@ -4,10 +4,11 @@
-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
=breadcrumb
-else
.right
=link_to "< Retour aux demandes de commande", admin_p_customer_sheets_path
=breadcrumb
=link_to "< Retour aux commandes", admin_p_customer_sheets_path
=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
=breadcrumb(record: "#{@p_customer.code} - #{@p_customer.show_name}")
=breadcrumb record: @p_customer.name

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,7 @@
-if !@manager
.qi_header
.right= link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary btn-ap-add", :remote => false
%h1
Achats
%span
Références
=breadcrumb

View File

@ -1,15 +1,7 @@
.qi_header
.right
= link_to i(:pencil), edit_admin_p_product_path(@p_product_ref.p_product), :remote => false if @p_product_ref.p_product
%h1
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
=breadcrumb record: @p_product_ref.p_product.name + " - " + @p_product_ref.ct_sub_name
.qi_row
@ -20,9 +12,10 @@
%td Produit
%td=@p_product_ref.p_product.name #link_to @p_product_ref.p_product.name, [:admin, @p_product_ref.p_product]
%tr
%td Actif ?
%td=@p_product_ref.enabled ? "Oui" : "Non"
-if false
%tr
%td Actif ?
%td=@p_product_ref.enabled ? "Oui" : "Non"
%tr
@ -45,30 +38,31 @@
%td Unité de vente (archive) :
%td= @p_product_ref.uv
%tr
%td Conditionnement de référence :
%td
-if @p_product_ref.p_product and @p_product_ref.p_product.p_product_conditioning
= @p_product_ref.p_product.p_product_conditioning.name
-if false
%tr
%td Conditionnement de référence :
%td
-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
%td Conditionnement :
%td
-if @p_product_ref.p_product_conditioning
= @p_product_ref.p_product_conditioning.name
%tr
%td Quantité par rapport au conditionnement de référence :
%td
= @p_product_ref.conditioning_ref_qte
%tr
%td Quantité par rapport au conditionnement de référence :
%td
= @p_product_ref.conditioning_ref_qte
%tr
%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
%tr
%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
@ -132,41 +126,41 @@
sortis
.clear
-if false
.qi_row
.qi_pannel
%h3 Historique des prix d'achat
.qi_row
.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|
%table.table.table-striped.table-hover.table-bordered
%tr
%td
=l price_line.price_line_block.price_lineable.date, :format => :date
%th
Date
%th Fournisseur
%th Document
%th Total
%th Qté
%th P.U.
%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
-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|
%td
=link_to price_line.price_lineable.d_number, [:admin, price_line.price_lineable]
%tr
%td
=l price_line.price_line_block.price_lineable.date, :format => :date
%td
=number_to_currency price_line.tot_amount_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
=price_line.qte
%td
=number_to_currency price_line.price_u_ht
%td
=number_to_currency price_line.price_u_ht

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,5 @@
.qi_header
%h1
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
=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"
-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|

View File

@ -1,13 +1,6 @@
.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"

View File

@ -1,21 +1,16 @@
.qi_header
.right
-if false # params[:price_document_type_id].to_s == "5"
=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
-if params[:price_document_type_id].to_i == 6 # Facture Achat
= 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 == 7
-elsif params[:price_document_type_id].to_i == 4 # Commande Achat
= 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
=link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary bgbd-ventes"
%h1
Documents
%span
Liste
-if params[:price_document_type_id]
=breadcrumb second_title: PriceDocumentType.find(params[:price_document_type_id]).label
.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)
%h1
Documents
=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
%span
=@price_document.price_document_type.label
%span
="##{@price_document.id}"
%span
=@price_document.d_number
.qi_row

View File

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

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(: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
%h1
Mouvements de stock manuels
%span
Détail du mouvement
="##{@stock_movement.id}"
= breadcrumb record: "mouvement ##{@stock_movement.id}"