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
@@ -2,26 +2,26 @@
|
|
2
2
|
<ul class="actions">
|
3
3
|
<li>
|
4
4
|
<% if @return_authorization.can_receive? %>
|
5
|
-
<%= button_link_to
|
5
|
+
<%= button_link_to t(:receive), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'receive'), :method => :put, :confirm => t(:are_you_sure) %>
|
6
6
|
<% end %>
|
7
7
|
<% if @return_authorization.can_cancel? %>
|
8
|
-
<%= button_link_to
|
8
|
+
<%= button_link_to t(:cancel), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'cancel'), :method => :put, :confirm => t(:are_you_sure) %>
|
9
9
|
<% end %>
|
10
10
|
</li>
|
11
11
|
</ul>
|
12
|
-
<br class=
|
12
|
+
<br class="clear" />
|
13
13
|
</div>
|
14
14
|
|
15
|
-
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current =>
|
15
|
+
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Return Authorizations'} %>
|
16
16
|
|
17
|
-
<h2><%= t(
|
17
|
+
<h2><%= t(:return_authorization) %> <%= @return_authorization.number %> (<%= t(@return_authorization.state.downcase) %>)</h2>
|
18
18
|
|
19
|
-
<%= render
|
20
|
-
<%= form_for
|
21
|
-
<%= render :partial =>
|
19
|
+
<%= render 'shared/error_messages', :target => @return_authorization %>
|
20
|
+
<%= form_for [:admin, @order, @return_authorization] do |f| %>
|
21
|
+
<%= render :partial => 'form', :locals => {:f => f} %>
|
22
22
|
|
23
23
|
<p class="form-buttons" data-hook="buttons">
|
24
|
-
<%= button t(
|
25
|
-
<%= t(
|
24
|
+
<%= button t(:update) %>
|
25
|
+
<%= t(:or) %> <%= link_to t('actions.cancel'), admin_order_return_authorizations_url(@order) %>
|
26
26
|
</p>
|
27
27
|
<% end %>
|
@@ -2,20 +2,20 @@
|
|
2
2
|
<div class="toolbar" data-hook="toolbar">
|
3
3
|
<ul class="actions">
|
4
4
|
<li>
|
5
|
-
<%= button_link_to t(
|
5
|
+
<%= button_link_to t(:new_return_authorization), new_admin_order_return_authorization_url(@order), :icon => 'add' %>
|
6
6
|
</li>
|
7
7
|
</ul>
|
8
|
-
<br class=
|
8
|
+
<br class="clear" />
|
9
9
|
</div>
|
10
10
|
<% end %>
|
11
11
|
|
12
|
-
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current =>
|
12
|
+
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Return Authorizations'} %>
|
13
13
|
|
14
14
|
<table class="index">
|
15
15
|
<tr data-hook="rma_header">
|
16
|
-
<th><%= t(
|
17
|
-
<th><%= t(
|
18
|
-
<th><%= t(
|
16
|
+
<th><%= t(:rma_number) %></th>
|
17
|
+
<th><%= t(:status) %></th>
|
18
|
+
<th><%= t(:amount) %></th>
|
19
19
|
<th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
|
20
20
|
<th></th>
|
21
21
|
</tr>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<tr id="<%= dom_id(return_authorization) %>" data-hook="rma_row">
|
24
24
|
<td><%= return_authorization.number %></td>
|
25
25
|
<td><%= t(return_authorization.state.downcase) %></td>
|
26
|
-
<td><%= number_to_currency
|
26
|
+
<td><%= number_to_currency return_authorization.amount %></td>
|
27
27
|
<td><%= return_authorization.created_at.to_s(:date_time24) %></td>
|
28
28
|
<td>
|
29
29
|
<%= link_to_edit return_authorization %>
|
@@ -37,9 +37,9 @@
|
|
37
37
|
<% end %>
|
38
38
|
<% unless @order.inventory_units.any? &:shipped? %>
|
39
39
|
<tr data-hook="rma_cannont_create">
|
40
|
-
<td colspan="5"><%= t(
|
40
|
+
<td colspan="5"><%= t(:cannot_create_returns) %></td>
|
41
41
|
</tr>
|
42
42
|
<% end %>
|
43
43
|
</table>
|
44
44
|
|
45
|
-
<%= button_link_to t(
|
45
|
+
<%= button_link_to t(:continue), admin_orders_url %>
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current =>
|
1
|
+
<%= render :partial => 'admin/shared/order_tabs', :locals => {:current => 'Return Authorizations'} %>
|
2
2
|
|
3
|
-
<h2><%= t(
|
3
|
+
<h2><%= t(:new_return_authorization) %></h2>
|
4
4
|
|
5
|
-
<%= render
|
6
|
-
<%= form_for
|
7
|
-
<%= render :partial =>
|
5
|
+
<%= render 'shared/error_messages', :target => @return_authorization %>
|
6
|
+
<%= form_for [:admin, @order, @return_authorization] do |f| %>
|
7
|
+
<%= render :partial => 'form', :locals => {:f => f} %>
|
8
8
|
|
9
9
|
<p class="form-buttons" data-hook="buttons">
|
10
|
-
<%= button t(
|
11
|
-
<%= t(
|
10
|
+
<%= button t(:continue) %>
|
11
|
+
<%= t(:or) %> <%= link_to t('actions.cancel'), admin_order_return_authorizations_url(@order) %>
|
12
12
|
</p>
|
13
13
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<p>
|
2
|
-
<%= label controller.controller_name.singularize, field[:name], t(
|
2
|
+
<%= label controller.controller_name.singularize, field[:name], t('activerecord.attributes.variant.' + field[:name].downcase, :default => field[:name].titleize)%><br />
|
3
3
|
<%= additional_field_for(controller, field) %>
|
4
4
|
<%= error_message_on controller.controller_name.singularize, attribute_name_for(field[:name]) %>
|
5
5
|
</p>
|
@@ -5,64 +5,64 @@
|
|
5
5
|
<%= name %>
|
6
6
|
<span class="right">
|
7
7
|
<% if use_billing %>
|
8
|
-
<%= check_box_tag 'order[use_billing]', '1', (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address)) %> <%= t(
|
8
|
+
<%= check_box_tag 'order[use_billing]', '1', (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address)) %> <%= t(:use_billing_address) %>
|
9
9
|
<% end %>
|
10
10
|
</span>
|
11
11
|
</th>
|
12
12
|
</tr>
|
13
13
|
</thead>
|
14
|
-
<tbody id="<%= name == t(
|
15
|
-
<tr class="<%= name == t(
|
14
|
+
<tbody id="<%= name == t(:shipping_address) ? 'shipping' : 'billing' %>" style="display: <%= (use_billing && (!(@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.eql?(@order.ship_address))) ? 'none' : '' %>" data-hook="address_fields">
|
15
|
+
<tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
|
16
16
|
<td class="lbl-col">
|
17
|
-
<%= f.label :firstname, t(:first_name)+':' %>
|
17
|
+
<%= f.label :firstname, t(:first_name) + ':' %>
|
18
18
|
</td>
|
19
19
|
<td class="val-col" colspan="3"><%= f.text_field :firstname %></td>
|
20
20
|
<td class="lbl-col">
|
21
|
-
<%= f.label :lastname, t(:last_name)+':' %>
|
21
|
+
<%= f.label :lastname, t(:last_name) + ':' %>
|
22
22
|
</td>
|
23
23
|
<td class="val-col" colspan="3"><%= f.text_field :lastname %></td>
|
24
24
|
</tr>
|
25
|
-
<tr class="<%= name == t(
|
25
|
+
<tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
|
26
26
|
<td class="lbl-col">
|
27
|
-
<%= f.label :address1, t(:street_address)+':' %>
|
27
|
+
<%= f.label :address1, t(:street_address) + ':' %>
|
28
28
|
</td>
|
29
29
|
<td colspan="3"><%= f.text_field :address1, :class => "fullwidth" %></td>
|
30
30
|
<td class="lbl-col">
|
31
|
-
<%= f.label :address2, t(:street_address_2)+':' %>
|
31
|
+
<%= f.label :address2, t(:street_address_2) + ':' %>
|
32
32
|
</td>
|
33
33
|
<td colspan="3"><%= f.text_field :address2, :class => "fullwidth" %></td>
|
34
34
|
</tr>
|
35
|
-
<tr class="<%= name == t(
|
35
|
+
<tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
|
36
36
|
<td class="lbl-col">
|
37
|
-
<%= f.label :city, t(:city)+':' %>
|
37
|
+
<%= f.label :city, t(:city) + ':' %>
|
38
38
|
</td>
|
39
39
|
<td colspan="3"><%= f.text_field :city %></td>
|
40
40
|
<td class="lbl-col">
|
41
|
-
<%= f.label :zipcode, t(:zip)+':' %>
|
41
|
+
<%= f.label :zipcode, t(:zip) + ':' %>
|
42
42
|
</td>
|
43
|
-
<td colspan="3"><%= f.text_field :zipcode, :style =>
|
43
|
+
<td colspan="3"><%= f.text_field :zipcode, :style => 'width: 100px;' %></td>
|
44
44
|
</tr>
|
45
|
-
<tr class="<%= name == t(
|
45
|
+
<tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
|
46
46
|
<td class="lbl-col">
|
47
|
-
<%= f.label :state_id, t(:state)+':' %>
|
47
|
+
<%= f.label :state_id, t(:state) + ':' %>
|
48
48
|
</td>
|
49
49
|
<td colspan="3">
|
50
|
-
<span id="<%= name==t(
|
50
|
+
<span id="<%= name == t(:shipping_address) ? 's' : 'b' %>state">
|
51
51
|
|
52
|
-
<%= f.text_field :state_name, :style => "width:150px;display
|
53
|
-
<%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {:include_blank => true}, {:style=> "width:150px;display
|
52
|
+
<%= f.text_field :state_name, :style => "width:150px; display: #{f.object.country.states.empty? ? 'block' : 'none' };", :disabled => !f.object.country.states.empty? %>
|
53
|
+
<%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {:include_blank => true}, {:style => "width:150px; display: #{f.object.country.states.empty? ? 'none' : 'block' };", :disabled => f.object.country.states.empty?} %>
|
54
54
|
</span>
|
55
55
|
</td>
|
56
56
|
<td class="lbl-col">
|
57
|
-
<%= f.label :country_id, t(:country)+':' %>
|
57
|
+
<%= f.label :country_id, t(:country) + ':' %>
|
58
58
|
</td>
|
59
59
|
<td colspan="3">
|
60
|
-
<span id="<%= name==t(
|
60
|
+
<span id="<%= name == t(:shipping_address) ? 's' : 'b' %>country"><%= f.collection_select :country_id, available_countries, :id, :name, {}, {:style => 'width: 150px;'} %></span>
|
61
61
|
</td>
|
62
62
|
</tr>
|
63
|
-
<tr class="<%= name == t(
|
63
|
+
<tr class="<%= name == t(:shipping_address) ? 'shipping-row' : 'billing-row' %>">
|
64
64
|
<td class="lbl-col">
|
65
|
-
<%= f.label :phone, t(:phone)+':' %>
|
65
|
+
<%= f.label :phone, t(:phone) + ':' %>
|
66
66
|
</td>
|
67
67
|
<td colspan="7"><%= f.text_field :phone %></td>
|
68
68
|
</tr>
|
@@ -70,9 +70,9 @@
|
|
70
70
|
</table>
|
71
71
|
|
72
72
|
<% content_for :head do %>
|
73
|
-
|
73
|
+
<%= javascript_tag do -%>
|
74
74
|
$(document).ready(function(){
|
75
|
-
$('span#<%= name==t(
|
75
|
+
$('span#<%= name == t(:shipping_address) ? 's' : 'b' %>country select').change(function() { update_state('<%= name == t(:shipping_address) ? 's' : 'b' %>'); });
|
76
76
|
});
|
77
|
-
|
77
|
+
<% end -%>
|
78
78
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<fieldset id="calculator_fields" data-hook>
|
2
|
-
<legend><%= t(
|
2
|
+
<legend><%= t(:calculator) %></legend>
|
3
3
|
<div id="preference-settings" data-hook>
|
4
4
|
<p>
|
5
|
-
<%= f.label(:calc_type, t(
|
6
|
-
<%= f.collection_select(:calculator_type, @calculators, :to_s, :description, {}, {:id =>
|
5
|
+
<%= f.label(:calc_type, t(:calculator), :for => 'calc-type') %>
|
6
|
+
<%= f.collection_select(:calculator_type, @calculators, :to_s, :description, {}, {:id => 'calc-type'}) %>
|
7
7
|
</p>
|
8
8
|
<% if !@object.new_record? %>
|
9
9
|
<div class="calculator-settings">
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% end %>
|
13
13
|
</div>
|
14
14
|
<% if @object.calculator.respond_to?(:preferences) %>
|
15
|
-
<div class="calculator-settings-warning"><%= t(
|
15
|
+
<div class="calculator-settings-warning"><%= t(:calculator_settings_warning)%></div>
|
16
16
|
<% end %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
@@ -1,21 +1,21 @@
|
|
1
1
|
<% content_for :sidebar do %>
|
2
2
|
|
3
|
-
<h3><%= t(
|
3
|
+
<h3><%= t(:configurations) %></h3>
|
4
4
|
<br class="clear" />
|
5
5
|
|
6
6
|
<ul class="sidebar" data-hook="admin_configurations_sidebar_menu">
|
7
|
-
<%= configurations_sidebar_menu_item t(
|
8
|
-
<%= configurations_sidebar_menu_item t(
|
9
|
-
<%= configurations_sidebar_menu_item t(
|
10
|
-
<%= configurations_sidebar_menu_item t(
|
11
|
-
<%= configurations_sidebar_menu_item t(
|
12
|
-
<%= configurations_sidebar_menu_item t(
|
13
|
-
<%= configurations_sidebar_menu_item t(
|
14
|
-
<%= configurations_sidebar_menu_item t(
|
15
|
-
<%= configurations_sidebar_menu_item t(
|
16
|
-
<%= configurations_sidebar_menu_item t(
|
7
|
+
<%= configurations_sidebar_menu_item t(:general_settings), admin_general_settings_path %>
|
8
|
+
<%= configurations_sidebar_menu_item t(:mail_methods), admin_mail_methods_path %>
|
9
|
+
<%= configurations_sidebar_menu_item t(:tax_categories), admin_tax_categories_path %>
|
10
|
+
<%= configurations_sidebar_menu_item t(:zones), admin_zones_path %>
|
11
|
+
<%= configurations_sidebar_menu_item t(:states), admin_country_states_path(Spree::Config[:default_country_id]) %>
|
12
|
+
<%= configurations_sidebar_menu_item t(:payment_methods), admin_payment_methods_path %>
|
13
|
+
<%= configurations_sidebar_menu_item t(:taxonomies), admin_taxonomies_path %>
|
14
|
+
<%= configurations_sidebar_menu_item t(:shipping_methods), admin_shipping_methods_path %>
|
15
|
+
<%= configurations_sidebar_menu_item t(:inventory_settings), admin_inventory_settings_path %>
|
16
|
+
<%= configurations_sidebar_menu_item t(:analytics_trackers), admin_trackers_path %>
|
17
17
|
</ul>
|
18
18
|
<ul class="sidebar">
|
19
|
-
<li id="complete_settings_list"><%= link_to t(
|
19
|
+
<li id="complete_settings_list"><%= link_to t(:complete_list), admin_configurations_path %>
|
20
20
|
</ul>
|
21
21
|
<% end %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% if products.any? %>
|
2
2
|
<% form_tag admin_product_groups_path do %>
|
3
|
-
<%= hidden_field_tag
|
4
|
-
<%= hidden_field_tag
|
3
|
+
<%= hidden_field_tag 'product_group[product_scopes_attributes][][name]', 'with_ids' %>
|
4
|
+
<%= hidden_field_tag 'product_group[product_scopes_attributes][][arguments][]', products.map(&:id).join(',') %>
|
5
5
|
<fieldset data-hook="create_group">
|
6
|
-
<legend><%= t(
|
7
|
-
|
8
|
-
<%= text_field_tag
|
9
|
-
|
6
|
+
<legend><%= t(:create_product_group_from_products) %></legend>
|
7
|
+
<%= label_tag nil, t(:name) %>
|
8
|
+
<%= text_field_tag 'product_group[name]', t(:new_group) %>
|
9
|
+
<%= submit_tag t(:create) %>
|
10
10
|
</fieldset>
|
11
11
|
<% end %>
|
12
12
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<meta
|
1
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
2
2
|
<%= csrf_meta_tags %>
|
3
3
|
<title><%= "Spree #{t('administration')}: " %>
|
4
4
|
<%= t(controller.controller_name, :default => controller.controller_name.titleize) %></title>
|
@@ -16,11 +16,11 @@
|
|
16
16
|
%>
|
17
17
|
<% end %>
|
18
18
|
|
19
|
-
<%= stylesheet_link_tag
|
20
|
-
<%= javascript_include_tag
|
21
|
-
<%= javascript_tag do
|
19
|
+
<%= stylesheet_link_tag 'admin/all' %>
|
20
|
+
<%= javascript_include_tag 'admin/all' %>
|
21
|
+
<%= javascript_tag do -%>
|
22
22
|
jQuery.alerts.dialogClass = 'spree';
|
23
23
|
<%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
|
24
|
-
<% end
|
24
|
+
<% end -%>
|
25
25
|
|
26
26
|
<%= yield :head %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<div class="toolbar" data-hook="toolbar">
|
2
2
|
<ul class="actions">
|
3
3
|
<li>
|
4
|
-
<%= button_link_to t(
|
4
|
+
<%= button_link_to t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'add' %>
|
5
5
|
</li>
|
6
6
|
</ul>
|
7
|
-
<br class="clear"
|
7
|
+
<br class="clear" />
|
8
8
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div id="order_tab_summary" data-hook>
|
5
5
|
<h3 id="order_number" data-hook><%= "#{t(:order)} ##{@order.number} " %></h3>
|
6
6
|
<h5 id="order_status" data-hook><%= "#{t(:status)}: #{t("order_state.#{@order.state}")}" %></h5>
|
7
|
-
<h5 id="order_total" data-hook><%= "#{t(:total)}: #{number_to_currency
|
7
|
+
<h5 id="order_total" data-hook><%= "#{t(:total)}: #{number_to_currency @order.total}" %></h5>
|
8
8
|
<% if @order.completed? %>
|
9
9
|
<h5 id="shipment_status"><%= "#{t(:shipment)}: #{t("shipment_states.#{@order.shipment_state}")}" %></h5>
|
10
10
|
<h5 id="payment_status"><%= "#{t(:payment)}: #{t("payment_states.#{@order.payment_state}")}" %></h5>
|
@@ -15,43 +15,43 @@
|
|
15
15
|
|
16
16
|
<ul class="sidebar" data-hook="admin_order_tabs">
|
17
17
|
<% unless @order.completed? %>
|
18
|
-
<li<%== ' class="active"' if current ==
|
19
|
-
<%= link_to t(
|
18
|
+
<li<%== ' class="active"' if current == 'Order Details' %>>
|
19
|
+
<%= link_to t(:order_details), edit_admin_order_url(@order) %>
|
20
20
|
</li>
|
21
|
-
<li<%== ' class="active"' if current ==
|
22
|
-
<%= link_to t(
|
21
|
+
<li<%== ' class="active"' if current == 'Customer Details' %>>
|
22
|
+
<%= link_to t(:customer_details), user_admin_order_url(@order) %>
|
23
23
|
</li>
|
24
|
-
<li<%== ' class="active"' if current ==
|
25
|
-
<%= link_to t(
|
24
|
+
<li<%== ' class="active"' if current == 'Shipments' %>>
|
25
|
+
<%= link_to t(:shipment), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : edit_admin_order_shipment_url(@order, @order.shipment) %>
|
26
26
|
</li>
|
27
|
-
<li<%== ' class="active"' if current ==
|
28
|
-
<%= link_to t(
|
27
|
+
<li<%== ' class="active"' if current == 'Adjustments' %>>
|
28
|
+
<%= link_to t(:adjustments), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : admin_order_adjustments_url(@order) %>
|
29
29
|
</li>
|
30
|
-
<li<%== ' class="active"' if current ==
|
31
|
-
<%= link_to t(
|
30
|
+
<li<%== ' class="active"' if current == 'Payments' %>>
|
31
|
+
<%= link_to t(:payment), @order.line_items.empty? || !@order.completed? ? 'javascript:$("form").submit();' : new_admin_order_payment_url(@order) %>
|
32
32
|
</li>
|
33
33
|
|
34
34
|
<% else %>
|
35
|
-
<li<%== ' class="active"' if current ==
|
36
|
-
<%= link_to t(
|
35
|
+
<li<%== ' class="active"' if current == 'Order Details' %>>
|
36
|
+
<%= link_to t(:order_details), admin_order_url(@order) %>
|
37
37
|
</li>
|
38
|
-
<li<%== ' class="active"' if current ==
|
39
|
-
<%= link_to t(
|
38
|
+
<li<%== ' class="active"' if current == 'Customer Details' %>>
|
39
|
+
<%= link_to t(:customer_details), user_admin_order_url(@order) %>
|
40
40
|
</li>
|
41
|
-
<li<%== ' class="active"' if current ==
|
42
|
-
<%= link_to t(
|
41
|
+
<li<%== ' class="active"' if current == 'Adjustments' %>>
|
42
|
+
<%= link_to t(:adjustments), admin_order_adjustments_url(@order) %>
|
43
43
|
</li>
|
44
|
-
<li<%== ' class="active"' if current ==
|
45
|
-
<%= link_to t(
|
44
|
+
<li<%== ' class="active"' if current == 'Payments' %>>
|
45
|
+
<%= link_to t(:payments), admin_order_payments_url(@order) %>
|
46
46
|
</li>
|
47
|
-
<li<%== ' class="active"' if current ==
|
48
|
-
<%= link_to t(
|
47
|
+
<li<%== ' class="active"' if current == 'Shipments' %>>
|
48
|
+
<%= link_to t(:shipments), admin_order_shipments_url(@order) %>
|
49
49
|
</li>
|
50
|
-
<li<%== ' class="active"' if current ==
|
51
|
-
<%= link_to t(
|
50
|
+
<li<%== ' class="active"' if current == 'Return Authorizations' %>>
|
51
|
+
<%= link_to t(:return_authorizations), admin_order_return_authorizations_url(@order) %>
|
52
52
|
</li>
|
53
|
-
<li<%== ' class="active"' if current ==
|
54
|
-
<%= link_to t(
|
53
|
+
<li<%== ' class="active"' if current == 'History' %>>
|
54
|
+
<%= link_to t(:history), history_admin_order_url(@order) %>
|
55
55
|
</li>
|
56
56
|
<% end %>
|
57
57
|
</ul>
|
@@ -1,28 +1,28 @@
|
|
1
|
-
<h1><%== t(
|
1
|
+
<h1><%== t(:editing_product) + " “#{@product.name}”" %></h1>
|
2
2
|
|
3
3
|
<% content_for :sidebar do %>
|
4
4
|
|
5
|
-
<h3><%= @product.name %><span class=
|
5
|
+
<h3><%= @product.name %><span class="sku"><%= @product.sku %></span></h3>
|
6
6
|
<br class="clear" />
|
7
7
|
|
8
8
|
<ul class="sidebar product-menu" data-hook="admin_product_tabs">
|
9
|
-
<li<%== ' class="active"' if current ==
|
10
|
-
<%= link_to t(
|
9
|
+
<li<%== ' class="active"' if current == 'Product Details' %>>
|
10
|
+
<%= link_to t(:product_details), edit_admin_product_url(@product) %>
|
11
11
|
</li>
|
12
|
-
<li<%== ' class="active"' if current ==
|
13
|
-
<%= link_to t(
|
12
|
+
<li<%== ' class="active"' if current == 'Images' %>>
|
13
|
+
<%= link_to t(:images), admin_product_images_url(@product) %>
|
14
14
|
</li>
|
15
|
-
<li<%== ' class="active"' if current ==
|
16
|
-
<%= link_to t(
|
15
|
+
<li<%== ' class="active"' if current == 'Variants' %>>
|
16
|
+
<%= link_to t(:variants), admin_product_variants_url(@product) %>
|
17
17
|
</li>
|
18
|
-
<li<%== ' class="active"' if current ==
|
19
|
-
<%= link_to t(
|
18
|
+
<li<%== ' class="active"' if current == 'Option Types' %>>
|
19
|
+
<%= link_to t(:option_types), selected_admin_product_option_types_url(@product) %>
|
20
20
|
</li>
|
21
|
-
<li<%== ' class="active"' if current ==
|
22
|
-
<%= link_to t(
|
21
|
+
<li<%== ' class="active"' if current == 'Product Properties' %>>
|
22
|
+
<%= link_to t(:product_properties), admin_product_product_properties_url(@product) %>
|
23
23
|
</li>
|
24
|
-
<li<%== ' class="active"' if current ==
|
25
|
-
<%= link_to t(
|
24
|
+
<li<%== ' class="active"' if current == 'Taxons' %>>
|
25
|
+
<%= link_to t(:taxons), selected_admin_product_taxons_url(@product) %>
|
26
26
|
</li>
|
27
27
|
</ul>
|
28
28
|
<br class="clear" />
|