mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
WIP: revise overrides following upgrade to Spree 1.3, update ':original' definitions and reconcile filename and :name
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Deface::Override.new(:virtual_path => "spree/layouts/admin",
|
||||
:name => "add_cms_admin_tab",
|
||||
:insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]",
|
||||
:text => "<%= tab 'CMS Admin', :url => main_app.cms_admin_path %>",
|
||||
:original => '6999548b86c700f2cc5d4f9d297c94b3617fd981')
|
||||
Deface::Override.new(:virtual_path => "spree/admin/shared/_configuration_menu",
|
||||
:name => "add_cms_admin_to_admin_configurations_menu",
|
||||
:insert_bottom => "[data-hook='admin_configurations_sidebar_menu']",
|
||||
:text => "<li><%= link_to 'CMS Admin', main_app.cms_admin_path %></li>",
|
||||
:partial => 'enterprise_fees/admin_configurations_menu',
|
||||
:original => '29e0ab9c171ffab1988cb439b5d42300b78fe088' )
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/shared/_configuration_menu",
|
||||
:name => "add_enterprise_fees_to_admin_configurations_menu",
|
||||
:insert_bottom => "[data-hook='admin_configurations_sidebar_menu']",
|
||||
:text => "<li><%= link_to 'Enterprise Fees', main_app.admin_enterprise_fees_path %></li>",
|
||||
:partial => 'enterprise_fees/admin_configurations_menu',
|
||||
:original => '29e0ab9c171ffab1988cb439b5d42300b78fe088')
|
||||
:original => '8445a03cc903cacc832f395757ffcfaa7e99ca92')
|
||||
|
||||
@@ -2,4 +2,4 @@ Deface::Override.new(:virtual_path => "spree/layouts/admin",
|
||||
:name => "add_enterprises_admin_tab",
|
||||
:insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]",
|
||||
:text => "<%= tab :enterprises, :url => main_app.admin_enterprises_path %>",
|
||||
:original => '82e51ad38c8538eca88b683d6d874d8fdb5b5032')
|
||||
:original => '6999548b86c700f2cc5d4f9d297c94b3617fd981')
|
||||
@@ -1,9 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/products/_form",
|
||||
:insert_top => "[data-hook='admin_product_form_right']",
|
||||
:partial => "spree/admin/products/group_buy_form",
|
||||
:name => "group buy")
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/admin/products/new",
|
||||
:insert_bottom => ".right",
|
||||
:partial => "spree/admin/products/group_buy_form",
|
||||
:name => "group buy")
|
||||
5
app/overrides/add_group_buy_to_admin_product_edit.rb
Normal file
5
app/overrides/add_group_buy_to_admin_product_edit.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/products/_form",
|
||||
:insert_top => "[data-hook='admin_product_form_right']",
|
||||
:partial => "spree/admin/products/group_buy_form",
|
||||
:name => "add_group_buy_to_admin_product_edit",
|
||||
:original => '0c0e8d714989e48ee246a8253fb2b362f108621a')
|
||||
@@ -1,5 +1,5 @@
|
||||
Deface::Override.new(:virtual_path => "spree/layouts/admin",
|
||||
:name => "add_order_cycles_admin_tab",
|
||||
Deface::Override.new(:virtual_path => "spree/layouts/admin",
|
||||
:name => "add_order_cycles_admin_tab",
|
||||
:insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]",
|
||||
:text => "<%= tab 'Order Cycles', :url => main_app.admin_order_cycles_path %>",
|
||||
:original => '3ff44d141dd4998561d0ff79b9df3b185207e325')
|
||||
:text => "<%= tab 'Order Cycles', :url => main_app.admin_order_cycles_path %>",
|
||||
:original => 'd4e321201ecb543e92192a031c8896a45dde3576')
|
||||
@@ -1,4 +1,5 @@
|
||||
Deface::Override.new(:virtual_path => "spree/products/show",
|
||||
:insert_bottom => "[data-hook='product_left_part_wrap']",
|
||||
:partial => "spree/products/source",
|
||||
:name => "product_source")
|
||||
:name => "add_source_to_product",
|
||||
:original => 'bce3ba4847b3eac8ae061774a664ac4951d3d9db')
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/products/new",
|
||||
:insert_before => "[data-hook='new_product_attrs']",
|
||||
:partial => "spree/admin/products/supplier_and_group_buy_for_new",
|
||||
:name => "add_supplier_and_group_buy_to_admin_product_new",
|
||||
:original => '59b7ed369769267bdedb596768fcfcc2cb94f122')
|
||||
@@ -1,9 +1,5 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/products/_form",
|
||||
:insert_top => "[data-hook='admin_product_form_right']",
|
||||
:partial => "spree/admin/products/supplier_form",
|
||||
:name => "supplier")
|
||||
|
||||
Deface::Override.new(:virtual_path => "spree/admin/products/new",
|
||||
:insert_bottom => ".right",
|
||||
:partial => "spree/admin/products/supplier_form",
|
||||
:name => "supplier")
|
||||
:name => "add_supplier_to_admin_product",
|
||||
:original => '18bd94de3eb8bdf8b669932bf04fc59e2e85288b')
|
||||
@@ -1,4 +1,5 @@
|
||||
Deface::Override.new(:virtual_path => "spree/orders/_line_item",
|
||||
:replace => "[data-hook='cart_item_description']",
|
||||
:partial => "spree/orders/cart_item_description",
|
||||
:name => "cart_item_description")
|
||||
:name => "cart_item_description",
|
||||
:original => 'ce2b7ddab2a6a13b25159ea18f6ab50991409d3e')
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/shared/_order_details",
|
||||
:replace => "div.payment-info",
|
||||
:partial => "spree/shared/order_details_payment_info",
|
||||
:name => "order_details_payment_info")
|
||||
@@ -1 +0,0 @@
|
||||
%li= link_to "Enterprise Fees", main_app.admin_enterprise_fees_path
|
||||
@@ -11,4 +11,4 @@
|
||||
= label_tag "#{pd_form.object_name}[_destroy]", pd_form.object.distributor.name
|
||||
= pd_form.hidden_field :distributor_id
|
||||
%td
|
||||
= pd_form.collection_select :shipping_method_id, Spree::ShippingMethod.all, :id, :name
|
||||
= pd_form.collection_select :shipping_method_id, Spree::ShippingMethod.all, :id, :name, {}, :class => "select2"
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
= f.field_container :group_buy do
|
||||
= f.label :group_buy, 'Group buy?'
|
||||
%br
|
||||
= f.radio_button :group_buy, '1', :checked => f.object.group_buy
|
||||
= f.label :group_buy_1, 'Yes'
|
||||
= f.radio_button :group_buy, '0', :checked => !f.object.group_buy
|
||||
= f.label :group_buy_0, 'No'
|
||||
|
||||
.alpha.two.columns
|
||||
= f.radio_button :group_buy, '1', :checked => f.object.group_buy
|
||||
= f.label :group_buy_1, 'Yes'
|
||||
.alpha.two.columns
|
||||
= f.radio_button :group_buy, '0', :checked => !f.object.group_buy
|
||||
= f.label :group_buy_0, 'No'
|
||||
%br.clear
|
||||
= f.field_container :group_buy_unit_size do
|
||||
= f.label :group_buy_unit_size
|
||||
%br
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
.row
|
||||
.alpha.six.columns
|
||||
= f.field_container :supplier do
|
||||
= f.label :supplier
|
||||
= f.collection_select(:supplier_id, Enterprise.is_primary_producer, :id, :name, {:include_blank => true}, {:class => "select2 fullwidth"})
|
||||
= f.error_message_on :supplier
|
||||
.four.columns
|
||||
= f.field_container :group_buy do
|
||||
= f.label :group_buy, 'Group buy?'
|
||||
%br
|
||||
.alpha.two.columns
|
||||
= f.radio_button :group_buy, '1', :checked => f.object.group_buy
|
||||
= f.label :group_buy_1, 'Yes'
|
||||
.omega.two.columns
|
||||
= f.radio_button :group_buy, '0', :checked => !f.object.group_buy
|
||||
= f.label :group_buy_0, 'No'
|
||||
.omega.six.columns
|
||||
= f.field_container :group_buy_unit_size do
|
||||
= f.label :group_buy_unit_size
|
||||
= f.text_field :group_buy_unit_size, :class => "fullwidth"
|
||||
@@ -1,5 +1,5 @@
|
||||
= f.field_container :supplier do
|
||||
= f.label :supplier
|
||||
%br
|
||||
= f.collection_select(:supplier_id, Enterprise.is_primary_producer, :id, :name, :include_blank => true)
|
||||
= f.collection_select(:supplier_id, Enterprise.is_primary_producer, :id, :name, {:include_blank => true}, {:class => "select2"})
|
||||
= f.error_message_on :supplier
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
- if order.payment_method.type == "Spree::PaymentMethod::Check"
|
||||
= simple_format order.payment_method.description
|
||||
@@ -31,15 +31,15 @@
|
||||
<div class="flash notice">Your payment via PayPal has been processed successfully.</div>
|
||||
<% elsif order.payment_method.name.include? "EFT" %>
|
||||
<span><%= order.payment_method.description.html_safe %></span>
|
||||
<% elsif order.creditcards.empty? == false %>
|
||||
<% elsif order.credit_cards.empty? == false %>
|
||||
<span class="cc-type">
|
||||
<%= image_tag "creditcards/icons/#{order.creditcards.first.cc_type}.png" %>
|
||||
<%= t(:ending_in)%> <%= order.creditcards.first.last_digits %>
|
||||
<%= image_tag "credit_cards/icons/#{order.credit_cards.first.cc_type}.png" %>
|
||||
<%= t(:ending_in)%> <%= order.credit_cards.first.last_digits %>
|
||||
</span>
|
||||
<br />
|
||||
<span class="full-name">
|
||||
<%= order.creditcards.first.first_name %>
|
||||
<%= order.creditcards.first.last_name %>
|
||||
<%= order.credit_cards.first.first_name %>
|
||||
<%= order.credit_cards.first.last_name %>
|
||||
</span>
|
||||
<% elsif order.payment_method.type == "Spree::PaymentMethod::Check" %>
|
||||
<span><%= order.payment_method.description %></span>
|
||||
|
||||
Reference in New Issue
Block a user