suite
This commit is contained in:
parent
6036a5cbec
commit
512eb7346a
@ -3,6 +3,8 @@
|
|||||||
.content
|
.content
|
||||||
=form.input :reseaux_id, :label => "Réseau :", :collection => Reseaux.where(:parent_id => nil).all, :as => :select, :include_blank => false
|
=form.input :reseaux_id, :label => "Réseau :", :collection => Reseaux.where(:parent_id => nil).all, :as => :select, :include_blank => false
|
||||||
|
|
||||||
|
=form.input :orderable, :label => "Peut être commandé ?", :as => :boolean
|
||||||
|
|
||||||
=#form.input :product_category_id, :label => "Catégorie :", :collection => @categories_select, :as => :select, :include_blank => false
|
=#form.input :product_category_id, :label => "Catégorie :", :collection => @categories_select, :as => :select, :include_blank => false
|
||||||
|
|
||||||
-if @product.product_category_id
|
-if @product.product_category_id
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
-@porduct_order_product.product_size_id = @product.product_sizes_in_stock(@porduct_order_product.product_option_id).first.id if @product.product_sizes_in_stock(@porduct_order_product.product_option_id).first
|
-@porduct_order_product.product_size_id = @product.product_sizes_in_stock(@porduct_order_product.product_option_id).first.id if @product.product_sizes_in_stock(@porduct_order_product.product_option_id).first
|
||||||
|
|
||||||
|
|
||||||
|
-if @product.orderable
|
||||||
-if @product.product_stocks.where("stock_th > 0").count > 0
|
-if @product.product_stocks.where("stock_th > 0").count > 0
|
||||||
= form_for [:public, @porduct_order_product], :remote => true do |f|
|
= form_for [:public, @porduct_order_product], :remote => true do |f|
|
||||||
= f.hidden_field :product_id
|
= f.hidden_field :product_id
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
-if current_customer.account_validated?
|
-if current_customer.account_validated?
|
||||||
-if @reseaux and @reseaux.needs_enabled
|
-if @reseaux and @reseaux.needs_enabled
|
||||||
=link_to "Besoins spécifiques", public_needs_path(:type => 1), :class => ("active" if @needs and params[:type].to_i == 1)
|
=link_to "Besoins exclusifs", public_needs_path(:type => 1), :class => ("active" if @needs and params[:type].to_i == 1)
|
||||||
-if @reseaux and @reseaux.centrale_enabled
|
-if @reseaux and @reseaux.centrale_enabled
|
||||||
=link_to "Centrale d'achats", public_needs_path(:type => 2), :class => ("active" if @needs and params[:type].to_i == 2)
|
=link_to "Portail local", public_needs_path(:type => 2), :class => ("active" if @needs and params[:type].to_i == 2)
|
||||||
|
|
||||||
-if session[:reseaux_id].to_i > 0
|
-if session[:reseaux_id].to_i > 0
|
||||||
-if @reseaux and @reseaux.offres_enabled
|
-if @reseaux and @reseaux.offres_enabled
|
||||||
|
5
db/migrate/20190429095601_add_orderable_to_products.rb
Normal file
5
db/migrate/20190429095601_add_orderable_to_products.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class AddOrderableToProducts < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :products, :orderable, :boolean, :default => true
|
||||||
|
end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user