spree_core 0.70.0.rc2 → 0.70.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/app/assets/javascripts/admin/taxonomy.js +1 -1
- data/app/controllers/admin/tax_rates_controller.rb +2 -2
- data/app/helpers/admin/base_helper.rb +1 -1
- data/app/helpers/spree/base_helper.rb +1 -1
- data/app/mailers/order_mailer.rb +5 -5
- data/app/mailers/shipment_mailer.rb +3 -3
- data/app/mailers/test_mailer.rb +1 -1
- data/app/models/calculator.rb +7 -9
- data/app/models/calculator/flat_percent_item_total.rb +0 -5
- data/app/models/calculator/flat_rate.rb +0 -5
- data/app/models/calculator/flexi_rate.rb +0 -5
- data/app/models/calculator/per_item.rb +0 -5
- data/app/models/calculator/price_bucket.rb +0 -6
- data/app/models/calculator/sales_tax.rb +1 -6
- data/app/models/calculator/vat.rb +6 -11
- data/app/models/creditcard.rb +12 -10
- data/app/models/order.rb +1 -1
- data/app/models/payment.rb +1 -1
- data/app/models/payment_method.rb +1 -7
- data/app/views/admin/adjustments/_adjustments_table.html.erb +3 -3
- data/app/views/admin/adjustments/_form.html.erb +4 -4
- data/app/views/admin/adjustments/edit.html.erb +7 -7
- data/app/views/admin/adjustments/index.html.erb +2 -2
- data/app/views/admin/adjustments/new.html.erb +6 -6
- data/app/views/admin/configurations/index.html.erb +29 -29
- data/app/views/admin/general_settings/edit.html.erb +5 -5
- data/app/views/admin/general_settings/show.html.erb +4 -5
- data/app/views/admin/images/_form.html.erb +2 -2
- data/app/views/admin/images/edit.html.erb +8 -8
- data/app/views/admin/images/index.html.erb +11 -11
- data/app/views/admin/images/new.html.erb +1 -1
- data/app/views/admin/inventory_settings/edit.html.erb +7 -7
- data/app/views/admin/inventory_settings/show.html.erb +4 -4
- data/app/views/admin/inventory_units/adjust.html.erb +11 -11
- data/app/views/admin/mail_methods/_form.html.erb +23 -26
- data/app/views/admin/mail_methods/edit.html.erb +4 -4
- data/app/views/admin/mail_methods/index.html.erb +6 -6
- data/app/views/admin/mail_methods/new.html.erb +4 -4
- data/app/views/admin/option_types/_available.html.erb +9 -9
- data/app/views/admin/option_types/_form.html.erb +2 -2
- data/app/views/admin/option_types/_option_value_fields.html.erb +3 -3
- data/app/views/admin/option_types/_selected.html.erb +4 -4
- data/app/views/admin/option_types/available.js.erb +1 -1
- data/app/views/admin/option_types/edit.html.erb +10 -10
- data/app/views/admin/option_types/index.html.erb +7 -7
- data/app/views/admin/option_types/new.html.erb +4 -4
- data/app/views/admin/option_types/selected.html.erb +1 -1
- data/app/views/admin/orders/_add_product.html.erb +6 -6
- data/app/views/admin/orders/_form.html.erb +15 -15
- data/app/views/admin/orders/_line_item.html.erb +4 -4
- data/app/views/admin/orders/_user_form.html.erb +11 -11
- data/app/views/admin/orders/edit.html.erb +8 -8
- data/app/views/admin/orders/history.html.erb +8 -8
- data/app/views/admin/orders/index.html.erb +28 -29
- data/app/views/admin/orders/new.html.erb +5 -5
- data/app/views/admin/orders/show.html.erb +7 -7
- data/app/views/admin/orders/user.html.erb +6 -6
- data/app/views/admin/payment_methods/_form.html.erb +15 -15
- data/app/views/admin/payment_methods/edit.html.erb +5 -5
- data/app/views/admin/payment_methods/index.html.erb +9 -10
- data/app/views/admin/payment_methods/new.html.erb +4 -4
- data/app/views/admin/payments/_bill_address_form.html.erb +1 -1
- data/app/views/admin/payments/_form.html.erb +5 -5
- data/app/views/admin/payments/_list.html.erb +5 -5
- data/app/views/admin/payments/_transaction_list.html.erb +6 -6
- data/app/views/admin/payments/credit.html.erb +5 -5
- data/app/views/admin/payments/index.html.erb +8 -8
- data/app/views/admin/payments/new.html.erb +6 -6
- data/app/views/admin/payments/show.html.erb +2 -2
- data/app/views/admin/payments/source_forms/_gateway.html.erb +8 -8
- data/app/views/admin/payments/source_views/_gateway.html.erb +7 -7
- data/app/views/admin/product_groups/_preview.html.erb +2 -2
- data/app/views/admin/product_groups/_product_scope.html.erb +3 -3
- data/app/views/admin/product_groups/edit.html.erb +9 -9
- data/app/views/admin/product_groups/index.html.erb +8 -8
- data/app/views/admin/product_groups/new.html.erb +3 -3
- data/app/views/admin/product_groups/show.html.erb +1 -1
- data/app/views/admin/product_groups/update.js.erb +3 -3
- data/app/views/admin/product_properties/_product_property_fields.html.erb +3 -3
- data/app/views/admin/product_properties/index.html.erb +15 -15
- data/app/views/admin/product_scopes/create.js.erb +3 -3
- data/app/views/admin/product_scopes/destroy.js.erb +3 -3
- data/app/views/admin/products/_form.html.erb +25 -25
- data/app/views/admin/products/_option_types.html.erb +14 -14
- data/app/views/admin/products/_properties_form.erb +1 -1
- data/app/views/admin/products/edit.html.erb +3 -3
- data/app/views/admin/products/index.html.erb +12 -12
- data/app/views/admin/products/new.html.erb +14 -14
- data/app/views/admin/products/show.html.erb +1 -1
- data/app/views/admin/properties/_form.html.erb +2 -2
- data/app/views/admin/properties/edit.html.erb +3 -3
- data/app/views/admin/properties/index.html.erb +6 -6
- data/app/views/admin/properties/new.html.erb +3 -3
- data/app/views/admin/prototypes/_form.html.erb +6 -6
- data/app/views/admin/prototypes/_prototypes.html.erb +3 -4
- data/app/views/admin/prototypes/edit.html.erb +4 -4
- data/app/views/admin/prototypes/index.html.erb +6 -6
- data/app/views/admin/prototypes/new.html.erb +3 -3
- data/app/views/admin/reports/index.html.erb +3 -3
- data/app/views/admin/reports/sales_total.html.erb +7 -7
- data/app/views/admin/return_authorizations/_form.html.erb +13 -14
- data/app/views/admin/return_authorizations/edit.html.erb +10 -10
- data/app/views/admin/return_authorizations/index.html.erb +9 -9
- data/app/views/admin/return_authorizations/new.html.erb +7 -7
- data/app/views/admin/shared/_additional_field.html.erb +1 -1
- data/app/views/admin/shared/_address_form.html.erb +24 -24
- data/app/views/admin/shared/_calculator_fields.html.erb +4 -4
- data/app/views/admin/shared/_configuration_menu.html.erb +12 -12
- data/app/views/admin/shared/_destroy.js.erb +1 -1
- data/app/views/admin/shared/_edit_resource_links.html.erb +2 -2
- data/app/views/admin/shared/_group_from_products_form.html.erb +6 -6
- data/app/views/admin/shared/_head.html.erb +5 -5
- data/app/views/admin/shared/_new_adjustment_button.html.erb +2 -2
- data/app/views/admin/shared/_new_resource_links.html.erb +2 -2
- data/app/views/admin/shared/_order_tabs.html.erb +25 -25
- data/app/views/admin/shared/_product_tabs.html.erb +14 -14
- data/app/views/admin/shared/_report_criteria.html.erb +4 -4
- data/app/views/admin/shared/_show_resource_links.html.erb +3 -3
- data/app/views/admin/shared/_update_order_state.js +4 -4
- data/app/views/admin/shipments/_form.html.erb +15 -15
- data/app/views/admin/shipments/edit.html.erb +11 -11
- data/app/views/admin/shipments/index.html.erb +11 -11
- data/app/views/admin/shipments/new.html.erb +6 -6
- data/app/views/admin/shipping_categories/_form.html.erb +2 -2
- data/app/views/admin/shipping_categories/edit.html.erb +4 -4
- data/app/views/admin/shipping_categories/index.html.erb +8 -8
- data/app/views/admin/shipping_categories/new.html.erb +4 -4
- data/app/views/admin/shipping_methods/_form.html.erb +5 -5
- data/app/views/admin/shipping_methods/edit.html.erb +5 -5
- data/app/views/admin/shipping_methods/index.html.erb +9 -10
- data/app/views/admin/shipping_methods/new.html.erb +4 -4
- data/app/views/admin/states/_form.html.erb +3 -3
- data/app/views/admin/states/_state_list.html.erb +6 -8
- data/app/views/admin/states/edit.html.erb +4 -4
- data/app/views/admin/states/index.html.erb +4 -4
- data/app/views/admin/states/new.html.erb +3 -3
- data/app/views/admin/states/new.js.erb +1 -1
- data/app/views/admin/tax_categories/_form.html.erb +6 -6
- data/app/views/admin/tax_categories/edit.html.erb +4 -4
- data/app/views/admin/tax_categories/index.html.erb +8 -9
- data/app/views/admin/tax_categories/new.html.erb +4 -4
- data/app/views/admin/tax_rates/_form.html.erb +5 -5
- data/app/views/admin/tax_rates/edit.html.erb +5 -5
- data/app/views/admin/tax_rates/index.html.erb +10 -10
- data/app/views/admin/tax_rates/new.html.erb +4 -4
- data/app/views/admin/tax_settings/edit.html.erb +10 -10
- data/app/views/admin/tax_settings/show.html.erb +6 -6
- data/app/views/admin/taxonomies/_form.html.erb +1 -1
- data/app/views/admin/taxonomies/_js_head.html.erb +4 -4
- data/app/views/admin/taxonomies/_list.html.erb +4 -4
- data/app/views/admin/taxonomies/_taxon.html.erb +2 -2
- data/app/views/admin/taxonomies/edit.erb +31 -32
- data/app/views/admin/taxonomies/get_children.json.erb +7 -7
- data/app/views/admin/taxonomies/index.html.erb +4 -4
- data/app/views/admin/taxonomies/new.html.erb +5 -5
- data/app/views/admin/taxons/_form.html.erb +3 -3
- data/app/views/admin/taxons/_taxon_table.html.erb +4 -4
- data/app/views/admin/taxons/edit.html.erb +3 -3
- data/app/views/admin/taxons/remove.html.erb +1 -1
- data/app/views/admin/taxons/select.js.erb +1 -1
- data/app/views/admin/taxons/selected.html.erb +5 -5
- data/app/views/admin/trackers/_form.html.erb +10 -10
- data/app/views/admin/trackers/edit.html.erb +5 -5
- data/app/views/admin/trackers/index.html.erb +8 -8
- data/app/views/admin/trackers/new.html.erb +4 -4
- data/app/views/admin/users/_form.html.erb +6 -6
- data/app/views/admin/users/edit.html.erb +4 -4
- data/app/views/admin/users/index.html.erb +8 -8
- data/app/views/admin/users/new.html.erb +4 -4
- data/app/views/admin/users/show.html.erb +5 -5
- data/app/views/admin/variants/_form.html.erb +5 -5
- data/app/views/admin/variants/edit.html.erb +3 -3
- data/app/views/admin/variants/index.html.erb +14 -18
- data/app/views/admin/variants/new.html.erb +3 -3
- data/app/views/admin/variants/new.js.erb +1 -1
- data/app/views/admin/zones/_country_member.html.erb +1 -1
- data/app/views/admin/zones/_form.html.erb +14 -14
- data/app/views/admin/zones/_state_member.html.erb +1 -1
- data/app/views/admin/zones/edit.html.erb +5 -5
- data/app/views/admin/zones/index.html.erb +5 -5
- data/app/views/admin/zones/new.html.erb +5 -5
- data/app/views/checkout/_address.html.erb +25 -25
- data/app/views/checkout/_confirm.html.erb +1 -1
- data/app/views/checkout/_delivery.html.erb +7 -7
- data/app/views/checkout/_payment.html.erb +3 -3
- data/app/views/checkout/_summary.html.erb +2 -2
- data/app/views/checkout/edit.html.erb +3 -3
- data/app/views/checkout/payment/_gateway.html.erb +9 -9
- data/app/views/checkout/registration.html.erb +6 -6
- data/app/views/content/cvv.html.erb +6 -6
- data/app/views/home/index.html.erb +2 -2
- data/app/views/layouts/admin.html.erb +9 -11
- data/app/views/layouts/spree_application.html.erb +3 -3
- data/app/views/order_mailer/cancel_email.text.erb +2 -2
- data/app/views/orders/_form.html.erb +5 -5
- data/app/views/orders/_line_item.html.erb +3 -3
- data/app/views/orders/edit.html.erb +11 -11
- data/app/views/orders/new.html.erb +3 -3
- data/app/views/orders/show.html.erb +3 -3
- data/app/views/products/_cart_form.html.erb +8 -8
- data/app/views/products/_taxons.html.erb +1 -1
- data/app/views/products/_thumbnails.html.erb +2 -2
- data/app/views/products/index.html.erb +4 -4
- data/app/views/products/show.html.erb +1 -1
- data/app/views/shared/_filters.html.erb +2 -3
- data/app/views/shared/_google_analytics.html.erb +6 -6
- data/app/views/shared/_head.html.erb +3 -3
- data/app/views/shared/_order_details.html.erb +12 -12
- data/app/views/shared/_store_menu.html.erb +1 -1
- data/app/views/shared/_taxonomies.html.erb +1 -1
- data/app/views/shipment_mailer/shipped_email.text.erb +2 -2
- data/app/views/taxons/_taxon.html.erb +1 -1
- data/app/views/taxons/show.html.erb +4 -4
- data/app/views/test_mailer/test_email.text.erb +2 -2
- data/config/locales/en.yml +4 -2
- data/lib/environment_extension.rb +26 -0
- data/lib/generators/spree/site/site_generator.rb +8 -0
- data/lib/product_filters.rb +8 -0
- data/lib/spree/calculated_adjustments.rb +8 -8
- data/lib/spree/environment.rb +12 -0
- data/lib/spree/environment/calculators.rb +10 -0
- data/lib/spree_core.rb +1 -1
- data/lib/spree_core/railtie.rb +36 -46
- data/lib/spree_core/ssl_requirement.rb +1 -1
- data/lib/spree_core/version.rb +1 -1
- metadata +13 -18
- data/config/initializers/sprockets_precompile_patch.rb +0 -16
- data/lib/subclass_registration.rb +0 -21
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= render :partial => 'admin/shared/product_sub_menu' %>
|
2
2
|
|
3
|
-
<%= render :partial => 'admin/shared/product_tabs', :locals => {:current =>
|
4
|
-
<%= render
|
3
|
+
<%= render :partial => 'admin/shared/product_tabs', :locals => {:current => 'Product Details'} %>
|
4
|
+
<%= render 'shared/error_messages', :target => @product %>
|
5
5
|
|
6
|
-
<%= form_for
|
6
|
+
<%= form_for [:admin, @product], :html => { :method => :put, :multipart => true } do |f| %>
|
7
7
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
8
8
|
<%= render :partial => 'admin/shared/edit_resource_links' %>
|
9
9
|
<% end %>
|
@@ -3,21 +3,21 @@
|
|
3
3
|
<div class="toolbar" data-hook="toolbar">
|
4
4
|
<ul class="actions">
|
5
5
|
<li id="new_product_link">
|
6
|
-
<%= button_link_to t(
|
6
|
+
<%= button_link_to t(:new_product), new_object_url, {:remote => true, :icon => 'add', :id => 'admin_new_product'} %>
|
7
7
|
</li>
|
8
8
|
</ul>
|
9
|
-
<br class=
|
9
|
+
<br class="clear" />
|
10
10
|
</div>
|
11
11
|
|
12
|
-
<h1><%= "#{t(
|
12
|
+
<h1><%= "#{t('actions.listing')} #{t(:products)}" %></h1>
|
13
13
|
|
14
14
|
<div id="new_product" data-hook></div>
|
15
15
|
|
16
|
-
<table class="index" id=
|
16
|
+
<table class="index" id="listing_products">
|
17
17
|
<tr data-hook="admin_products_index_headers">
|
18
|
-
<th><%= t(
|
19
|
-
<th><%= sort_link @search,:name, t(
|
20
|
-
<th><%= sort_link @search,:master_price, t(
|
18
|
+
<th><%= t(:sku) %></th>
|
19
|
+
<th><%= sort_link @search,:name, t(:name), {}, {:title => 'admin_products_listing_name_title'} %></th>
|
20
|
+
<th><%= sort_link @search,:master_price, t(:master_price) %></th>
|
21
21
|
<th data-hook="admin_products_index_header_actions"></th>
|
22
22
|
</tr>
|
23
23
|
<% @collection.each do |product| %>
|
@@ -46,22 +46,22 @@
|
|
46
46
|
<%- locals = {:f => f} %>
|
47
47
|
<div data-hook="admin_products_index_search">
|
48
48
|
<p>
|
49
|
-
<%= f.label :name_contains, t(
|
49
|
+
<%= f.label :name_contains, t(:name) %><br />
|
50
50
|
<%= f.text_field :name_contains, :size => 15 %>
|
51
51
|
</p>
|
52
52
|
<p>
|
53
|
-
<%= f.label :variants_including_master_sku_contains, t(
|
53
|
+
<%= f.label :variants_including_master_sku_contains, t(:sku) %><br />
|
54
54
|
<%= f.text_field :variants_including_master_sku_contains, :size => 15 %>
|
55
55
|
</p>
|
56
56
|
<p>
|
57
|
-
<%= f.label :deleted_at_is_null, t(
|
58
|
-
<%= f.check_box :deleted_at_is_null, {:checked => params[:search][:deleted_at_is_null].blank?},
|
57
|
+
<%= f.label :deleted_at_is_null, t(:show_deleted) %><br />
|
58
|
+
<%= f.check_box :deleted_at_is_null, {:checked => params[:search][:deleted_at_is_null].blank?}, '', '1' %>
|
59
59
|
</p>
|
60
60
|
</div>
|
61
61
|
|
62
62
|
<div data-hook="admin_products_index_search_buttons">
|
63
63
|
<p class="form-buttons">
|
64
|
-
<%= button t(
|
64
|
+
<%= button t(:search) %>
|
65
65
|
</p>
|
66
66
|
</div>
|
67
67
|
</div>
|
@@ -1,29 +1,29 @@
|
|
1
1
|
<%= render :partial => 'admin/shared/product_sub_menu' %>
|
2
2
|
|
3
|
-
<%= render
|
3
|
+
<%= render 'shared/error_messages', :target => @product %>
|
4
4
|
|
5
|
-
<%= form_for
|
5
|
+
<%= form_for [:admin, @product], :html => { :multipart => true } do |f| %>
|
6
6
|
<fieldset data-hook="new_product">
|
7
7
|
|
8
8
|
<%= f.field_container :name do %>
|
9
|
-
<%= f.label :name, t(
|
9
|
+
<%= f.label :name, t(:name) %> <span class="required">*</span><br />
|
10
10
|
<%= f.text_field :name, :class => 'fullwidth title' %>
|
11
11
|
<%= f.error_message_on :name %>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<div class="clearfix"
|
14
|
+
<div class="clearfix" data-hook="new_product_attrs">
|
15
15
|
<div class="left">
|
16
16
|
|
17
17
|
<% unless @product.has_variants? %>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
<%= f.field_container :sku do %>
|
19
|
+
<%= f.label :sku, t(:sku) %><br />
|
20
|
+
<%= f.text_field :sku, :size => 16 %>
|
21
|
+
<%= f.error_message_on :sku %>
|
22
|
+
<% end %>
|
23
23
|
<% end %>
|
24
24
|
|
25
25
|
<p>
|
26
|
-
<%= f.label :prototype_id, t(
|
26
|
+
<%= f.label :prototype_id, t(:prototype) %><br />
|
27
27
|
<%= f.collection_select :prototype_id, Prototype.all, :id, :name, :include_blank => true %>
|
28
28
|
</p>
|
29
29
|
|
@@ -31,13 +31,13 @@
|
|
31
31
|
<div class="right">
|
32
32
|
|
33
33
|
<%= f.field_container :price do %>
|
34
|
-
<%= f.label :price, t(
|
35
|
-
<%= f.text_field :price
|
36
|
-
<%= f.error_message_on :price%>
|
34
|
+
<%= f.label :price, t(:master_price) %> <span class="required">*</span><br />
|
35
|
+
<%= f.text_field :price %>
|
36
|
+
<%= f.error_message_on :price %>
|
37
37
|
<% end %>
|
38
38
|
|
39
39
|
<p>
|
40
|
-
<%= f.label :available_on, t(
|
40
|
+
<%= f.label :available_on, t(:available_on) %><br />
|
41
41
|
<%= f.error_message_on :available_on %>
|
42
42
|
<%= f.text_field :available_on, :class => 'datepicker', :style => "width:150px" %>
|
43
43
|
</p>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<div data-hook="admin_property_form">
|
2
2
|
|
3
3
|
<%= f.field_container :name do %>
|
4
|
-
<%= f.label :name, t(
|
4
|
+
<%= f.label :name, t(:name) %> <span class="required">*</span><br />
|
5
5
|
<%= f.text_field :name %>
|
6
6
|
<%= f.error_message_on :name %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<%= f.field_container :presentation do %>
|
10
|
-
<%= f.label :presentation, t(
|
10
|
+
<%= f.label :presentation, t(:presentation) %> <span class="required">*</span><br />
|
11
11
|
<%= f.text_field :presentation %>
|
12
12
|
<%= f.error_message_on :presentation %>
|
13
13
|
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<%= render :partial => 'admin/shared/product_sub_menu' %>
|
2
2
|
|
3
|
-
<h1><%= t(
|
3
|
+
<h1><%= t(:editing_property) %></h1>
|
4
4
|
|
5
5
|
<%= render 'shared/error_messages', :target => @property %>
|
6
6
|
|
7
|
-
<%= form_for
|
8
|
-
<%= render :partial =>
|
7
|
+
<%= form_for [:admin, @property] do |f| %>
|
8
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
9
9
|
<%= render :partial => 'admin/shared/edit_resource_links' %>
|
10
10
|
<% end %>
|
@@ -3,23 +3,23 @@
|
|
3
3
|
<div class="toolbar" data-hook="toolbar">
|
4
4
|
<ul class="actions">
|
5
5
|
<li id="new_property_link">
|
6
|
-
<%= button_link_to t(
|
6
|
+
<%= button_link_to t(:new_property), new_admin_property_url, {:remote => true, :icon => 'add', 'data-update' => 'new_property', :id => 'new_property_link'} %>
|
7
7
|
</li>
|
8
8
|
</ul>
|
9
|
-
<br class=
|
9
|
+
<br class="clear" />
|
10
10
|
</div>
|
11
11
|
|
12
|
-
<h1><%= t(
|
12
|
+
<h1><%= t(:properties) %></h1>
|
13
13
|
|
14
14
|
<div id="new_property"></div>
|
15
15
|
|
16
|
-
<%= image_tag
|
16
|
+
<%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
|
17
17
|
|
18
18
|
<table class="index" id='listing_properties' data-hook>
|
19
19
|
<thead>
|
20
20
|
<tr data-hook="listing_properties_header">
|
21
|
-
<th><%= t(
|
22
|
-
<th><%= t(
|
21
|
+
<th><%= t(:name) %></th>
|
22
|
+
<th><%= t(:presentation) %></th>
|
23
23
|
<th></th>
|
24
24
|
</tr>
|
25
25
|
</thead>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
<%= render 'shared/error_messages', :target => @property %>
|
4
4
|
|
5
|
-
<%= form_for
|
5
|
+
<%= form_for [:admin, @property] do |f| %>
|
6
6
|
<fieldset data-hook="new_property">
|
7
|
-
<legend><%= t(
|
8
|
-
<%= render :partial =>
|
7
|
+
<legend><%= t(:new_property)%></legend>
|
8
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
9
9
|
<%= render :partial => 'admin/shared/new_resource_links' %>
|
10
10
|
</fieldset>
|
11
11
|
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<%= f.field_container :name do %>
|
2
|
-
<%= f.label :name, t(
|
2
|
+
<%= f.label :name, t(:name) %><br />
|
3
3
|
<%= f.text_field :name %>
|
4
4
|
<%= f.error_message_on :name %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<h3><%= t(
|
7
|
+
<h3><%= t(:properties) %></h3>
|
8
8
|
|
9
9
|
<ul class='checkbox-list' id='properties' data-hook>
|
10
10
|
<% Property.sorted.each do |property| %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
end %>
|
16
16
|
<li>
|
17
17
|
<label>
|
18
|
-
<%= check_box_tag
|
18
|
+
<%= check_box_tag 'property[id][]', "#{property.id}", selected %>
|
19
19
|
<%= property.name %>
|
20
20
|
</label>
|
21
21
|
</li>
|
@@ -24,9 +24,9 @@
|
|
24
24
|
|
25
25
|
<hr />
|
26
26
|
|
27
|
-
<h3><%= t(
|
27
|
+
<h3><%= t(:option_types) %></h3>
|
28
28
|
|
29
|
-
<ul class=
|
29
|
+
<ul class="checkbox-list" id="option_types" data-hook>
|
30
30
|
<% OptionType.all.each do |option_type| %>
|
31
31
|
<% selected = if @prototype.new_record?
|
32
32
|
(params[:option_type] and params[:option_type][:id] and params[:option_type][:id].include?(option_type.id.to_s))
|
@@ -35,7 +35,7 @@
|
|
35
35
|
end %>
|
36
36
|
<li>
|
37
37
|
<label>
|
38
|
-
<%= check_box_tag
|
38
|
+
<%= check_box_tag 'option_type[id][]', "#{option_type.id}", selected %>
|
39
39
|
<%= option_type.name %>
|
40
40
|
</label>
|
41
41
|
</li>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<table class="index">
|
2
2
|
<thead>
|
3
3
|
<tr data-hook="avilable_header">
|
4
|
-
<th><%= t(
|
4
|
+
<th><%= t(:name) %></th>
|
5
5
|
<th></th>
|
6
6
|
</tr>
|
7
7
|
</thead>
|
@@ -10,13 +10,12 @@
|
|
10
10
|
<tr id="row_<%= prototype.id %>" data-hook="available_row">
|
11
11
|
<td><%= prototype.name %></td>
|
12
12
|
<td class="actions">
|
13
|
-
<%= link_to icon('add') + ' ' + t(
|
14
|
-
:class => 'ajax iconlink select_properties_from_prototype' %>
|
13
|
+
<%= link_to icon('add') + ' ' + t(:select), select_admin_prototype_url(prototype), :class => 'ajax iconlink select_properties_from_prototype' %>
|
15
14
|
</td>
|
16
15
|
</tr>
|
17
16
|
<% end %>
|
18
17
|
<% if @prototypes.empty? %>
|
19
|
-
<tr data-hook="available_none"><td colspan="2"><% t(
|
18
|
+
<tr data-hook="available_none"><td colspan="2"><% t(:none) %>.</td></tr>
|
20
19
|
<% end %>
|
21
20
|
</tbody>
|
22
21
|
</table>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<%= render :partial => 'admin/shared/product_sub_menu' %>
|
2
|
-
<h1><%= t(
|
2
|
+
<h1><%= t(:editing_prototype) %></h1>
|
3
3
|
|
4
|
-
<%= render
|
4
|
+
<%= render 'shared/error_messages', :target => @prototype %>
|
5
5
|
|
6
|
-
<%= form_for
|
7
|
-
<%= render :partial =>
|
6
|
+
<%= form_for [:admin, @prototype] do |f| %>
|
7
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
8
8
|
<%= render :partial => 'admin/shared/edit_resource_links' %>
|
9
9
|
<% end %>
|
@@ -3,23 +3,23 @@
|
|
3
3
|
<div class="toolbar" data-hook="toolbar">
|
4
4
|
<ul class="actions">
|
5
5
|
<li id="new_prototype_link">
|
6
|
-
<%= button_link_to t(
|
6
|
+
<%= button_link_to t(:new_prototype), new_admin_prototype_url, {:remote => true, :icon => 'add', 'data-update' => 'new_prototype', :id => 'new_prototype_link'} %>
|
7
7
|
</li>
|
8
8
|
</ul>
|
9
|
-
<br class=
|
9
|
+
<br class="clear" />
|
10
10
|
</div>
|
11
11
|
|
12
12
|
|
13
|
-
<h1><%=t(
|
13
|
+
<h1><%= t(:prototypes) %></h1>
|
14
14
|
|
15
|
-
<%= image_tag
|
15
|
+
<%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display: none', :id => 'busy_indicator' %>
|
16
16
|
<div id="new_prototype"></div>
|
17
17
|
|
18
18
|
<table class="index" id='listing_prototypes' data-hook>
|
19
19
|
<thead>
|
20
20
|
<tr data-hook="prototypes_header">
|
21
|
-
<th><%= t(
|
22
|
-
<th><%= t(
|
21
|
+
<th><%= t(:name) %></th>
|
22
|
+
<th><%= t(:action) %></th>
|
23
23
|
</tr>
|
24
24
|
</thead>
|
25
25
|
<tbody>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
<%= render 'shared/error_messages', :target => @prototype %>
|
4
4
|
|
5
|
-
<%= form_for
|
5
|
+
<%= form_for [:admin, @prototype] do |f| %>
|
6
6
|
<fieldset data-hook="new_prototype">
|
7
|
-
<legend><%= t(
|
8
|
-
<%= render :partial =>
|
7
|
+
<legend><%= t(:new_prototype) %></legend>
|
8
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
9
9
|
<%= render :partial => 'admin/shared/new_resource_links' %>
|
10
10
|
</fieldset>
|
11
11
|
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<h1><%= t(
|
1
|
+
<h1><%= t(:listing_reports) %></h1>
|
2
2
|
|
3
3
|
<table class="index">
|
4
4
|
<thead>
|
5
5
|
<tr data-hook="reports_header">
|
6
|
-
<th><%= t(
|
7
|
-
<th><%= t(
|
6
|
+
<th><%= t(:name) %></th>
|
7
|
+
<th><%= t(:description) %></th>
|
8
8
|
</tr>
|
9
9
|
</thead>
|
10
10
|
<tbody>
|
@@ -1,18 +1,18 @@
|
|
1
|
-
<h1><%= t(
|
1
|
+
<h1><%= t(:sales_totals) %> </h1>
|
2
2
|
|
3
3
|
<table class="admin-report" data-hook="sales_total">
|
4
4
|
<tbody>
|
5
5
|
<tr>
|
6
|
-
<th scope="row"><%= t(
|
7
|
-
<td align="right"><%=number_to_currency @item_total%></td>
|
6
|
+
<th scope="row"><%= t(:item_total) %>:</th>
|
7
|
+
<td align="right"><%= number_to_currency @item_total %></td>
|
8
8
|
</tr>
|
9
9
|
<tr>
|
10
|
-
<th scope="row"><%= t(
|
11
|
-
<td align="right"><%=number_to_currency @adjustment_total%></td>
|
10
|
+
<th scope="row"><%= t(:adjustment_total) %>:</th>
|
11
|
+
<td align="right"><%= number_to_currency @adjustment_total %></td>
|
12
12
|
</tr>
|
13
13
|
<tr>
|
14
|
-
<th scope="row"><%= t(
|
15
|
-
<td align="right"><%=number_to_currency @sales_total%></td>
|
14
|
+
<th scope="row"><%= t(:sales_total) %>:</th>
|
15
|
+
<td align="right"><%= number_to_currency @sales_total %></td>
|
16
16
|
</tr>
|
17
17
|
</tbody>
|
18
18
|
</table>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<table class="index">
|
2
2
|
<tr data-hook="rma_header">
|
3
|
-
<th><%= t(
|
4
|
-
<th><%= t(
|
5
|
-
<th><%= t(
|
6
|
-
<th><%= t(
|
3
|
+
<th><%= t(:product) %></th>
|
4
|
+
<th><%= t(:quantity_shipped) %></th>
|
5
|
+
<th><%= t(:quantity_returned) %></th>
|
6
|
+
<th><%= t(:return_quantity) %></th>
|
7
7
|
</tr>
|
8
8
|
<% @return_authorization.order.inventory_units.group_by(&:variant).each do | variant, units| %>
|
9
9
|
<tr id="<%= dom_id(variant) %>" data-hook="rma_row">
|
@@ -20,8 +20,7 @@
|
|
20
20
|
0
|
21
21
|
<% else %>
|
22
22
|
<%= text_field_tag "return_quantity[#{variant.id}]",
|
23
|
-
@return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0,
|
24
|
-
{:style => "width:30px;"} %>
|
23
|
+
@return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:30px;'} %>
|
25
24
|
<% end %>
|
26
25
|
</td>
|
27
26
|
</tr>
|
@@ -29,24 +28,24 @@
|
|
29
28
|
</table>
|
30
29
|
|
31
30
|
<%= f.field_container :amount do %>
|
32
|
-
<%= f.label :amount, t(
|
31
|
+
<%= f.label :amount, t(:amount) %> <span class="required">*</span><br />
|
33
32
|
<% if @return_authorization.received? %>
|
34
|
-
<%= number_to_currency
|
33
|
+
<%= number_to_currency @return_authorization.amount %>
|
35
34
|
<% else %>
|
36
|
-
<%= f.text_field :amount, {:style =>
|
35
|
+
<%= f.text_field :amount, {:style => 'width:80px;'} %> <%= t(:rma_value) %>: <span id="rma_value"></span>
|
37
36
|
<%= f.error_message_on :amount %>
|
38
37
|
<% end %>
|
39
38
|
<% end %>
|
40
39
|
|
41
40
|
<%= f.field_container :reason do %>
|
42
|
-
<%= f.label :reason, t(
|
43
|
-
<%= f.text_area :reason, {:style=>
|
41
|
+
<%= f.label :reason, t(:reason) %>
|
42
|
+
<%= f.text_area :reason, {:style => 'height:100px;', :class => 'fullwidth'} %>
|
44
43
|
<%= f.error_message_on :reason %>
|
45
44
|
<% end %>
|
46
45
|
|
47
46
|
|
48
47
|
<% content_for :head do %>
|
49
|
-
|
48
|
+
<%= javascript_tag do -%>
|
50
49
|
var variant_prices = new Array();
|
51
50
|
<% @return_authorization.order.inventory_units.group_by(&:variant).each do | variant, units| %>
|
52
51
|
variant_prices[<%= variant.id.to_s %>] = <%= variant.price %>;
|
@@ -65,7 +64,7 @@
|
|
65
64
|
}
|
66
65
|
}
|
67
66
|
|
68
|
-
|
67
|
+
$(document).ready(function(){
|
69
68
|
$.each($("td.return_quantity input"), function(i, inpt){
|
70
69
|
$(inpt).delayedObserver(function() {
|
71
70
|
calculate_rma_price();
|
@@ -74,5 +73,5 @@
|
|
74
73
|
|
75
74
|
calculate_rma_price();
|
76
75
|
});
|
77
|
-
|
76
|
+
<% end -%>
|
78
77
|
<% end %>
|