spree_core 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/assets/images/credit_cards/icons/diners_club.png +0 -0
- data/app/assets/javascripts/admin/address_states.js +1 -1
- data/app/assets/javascripts/admin/admin.js.erb +18 -13
- data/app/assets/javascripts/admin/calculator.js +2 -2
- data/app/assets/javascripts/admin/checkouts/edit.js +3 -1
- data/app/assets/javascripts/admin/image_settings.js.erb +5 -5
- data/app/assets/javascripts/admin/orders/edit.js +1 -1
- data/app/assets/javascripts/admin/payments/new.js +9 -2
- data/app/assets/javascripts/admin/spree_core.js +13 -1
- data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +2 -1
- data/app/assets/javascripts/admin/variant_autocomplete.js.erb +23 -19
- data/app/assets/javascripts/spree.js.coffee +37 -0
- data/app/assets/javascripts/store/checkout.js.coffee +8 -0
- data/app/assets/javascripts/store/product.js.coffee +1 -1
- data/app/assets/javascripts/store/spree_core.js +1 -0
- data/app/assets/stylesheets/admin/components/_sidebar.scss +7 -6
- data/app/assets/stylesheets/admin/components/_states.scss +16 -12
- data/app/assets/stylesheets/admin/globals/_variables.scss +102 -96
- data/app/assets/stylesheets/admin/shared/_forms.scss +2 -1
- data/app/assets/stylesheets/admin/shared/_icons.scss +2 -1
- data/app/assets/stylesheets/admin/shared/_layout.scss +4 -1
- data/app/assets/stylesheets/admin/shared/_tables.scss +8 -0
- data/app/assets/stylesheets/store/screen.css.scss +28 -16
- data/app/assets/stylesheets/store/variables.css.scss +4 -2
- data/app/controllers/spree/admin/adjustments_controller.rb +7 -3
- data/app/controllers/spree/admin/base_controller.rb +10 -5
- data/app/controllers/spree/admin/line_items_controller.rb +3 -2
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -2
- data/app/controllers/spree/admin/orders_controller.rb +2 -2
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/resource_controller.rb +5 -5
- data/app/controllers/spree/admin/shipments_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +1 -1
- data/app/controllers/spree/admin/users_controller.rb +96 -0
- data/app/controllers/spree/checkout_controller.rb +18 -7
- data/app/controllers/spree/locale_controller.rb +1 -1
- data/app/controllers/spree/orders_controller.rb +20 -2
- data/app/controllers/spree/taxons_controller.rb +8 -2
- data/app/helpers/spree/admin/images_helper.rb +6 -2
- data/app/helpers/spree/admin/navigation_helper.rb +23 -3
- data/app/helpers/spree/base_helper.rb +9 -5
- data/app/helpers/spree/orders_helper.rb +13 -0
- data/app/helpers/spree/products_helper.rb +9 -4
- data/app/mailers/spree/base_mailer.rb +16 -0
- data/app/mailers/spree/order_mailer.rb +12 -11
- data/app/mailers/spree/shipment_mailer.rb +4 -7
- data/app/mailers/spree/test_mailer.rb +2 -3
- data/app/models/spree/adjustment.rb +1 -1
- data/app/models/spree/app_configuration.rb +9 -3
- data/app/models/spree/calculator/default_tax.rb +5 -1
- data/app/models/spree/calculator/per_item.rb +1 -1
- data/app/models/spree/classification.rb +7 -0
- data/app/models/spree/credit_card.rb +1 -5
- data/app/models/spree/gateway.rb +10 -2
- data/app/models/spree/gateway/bogus.rb +5 -5
- data/app/models/spree/inventory_unit.rb +4 -4
- data/app/models/spree/line_item.rb +1 -1
- data/app/models/spree/order.rb +15 -35
- data/app/models/spree/order/checkout.rb +52 -0
- data/app/models/spree/order_populator.rb +11 -3
- data/app/models/spree/order_updater.rb +3 -4
- data/app/models/spree/payment.rb +23 -1
- data/app/models/spree/payment/processing.rb +18 -5
- data/app/models/spree/payment_method.rb +4 -0
- data/app/models/spree/price.rb +2 -3
- data/app/models/spree/product.rb +12 -4
- data/app/models/spree/product/scopes.rb +29 -16
- data/app/models/spree/return_authorization.rb +1 -1
- data/app/models/spree/shipment.rb +1 -1
- data/app/models/spree/taxon.rb +21 -6
- data/app/models/spree/variant.rb +7 -2
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/countries/index.html.erb +1 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +10 -2
- data/app/views/spree/admin/images/index.html.erb +7 -3
- data/app/views/spree/admin/mail_methods/index.html.erb +2 -2
- data/app/views/spree/admin/orders/_form.html.erb +3 -3
- data/app/views/spree/admin/orders/_line_item.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +4 -4
- data/app/views/spree/admin/orders/index.html.erb +60 -52
- data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/payment_methods/index.html.erb +39 -35
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +10 -10
- data/app/views/spree/admin/products/_form.html.erb +7 -12
- data/app/views/spree/admin/products/index.html.erb +13 -15
- data/app/views/spree/admin/products/new.html.erb +3 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +7 -7
- data/app/views/spree/admin/return_authorizations/edit.html.erb +17 -11
- data/app/views/spree/admin/return_authorizations/index.html.erb +4 -4
- data/app/views/spree/admin/return_authorizations/new.html.erb +13 -6
- data/app/views/spree/admin/shared/_alert.html.erb +1 -1
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +6 -2
- data/app/views/spree/admin/shared/_order_details.html.erb +6 -6
- data/app/views/spree/admin/shared/_order_tabs.html.erb +20 -37
- data/app/views/spree/admin/shared/_routes.html.erb +1 -1
- data/app/views/spree/admin/shared/_tabs.html.erb +1 -2
- data/app/views/spree/admin/shared/_update_order_state.js +1 -1
- data/app/views/spree/admin/shipments/_form.html.erb +24 -24
- data/app/views/spree/admin/shipments/edit.html.erb +13 -13
- data/app/views/spree/admin/shipments/index.html.erb +35 -31
- data/app/views/spree/admin/shipping_methods/index.html.erb +35 -32
- data/app/views/spree/admin/tax_rates/_form.html.erb +2 -1
- data/app/views/spree/admin/taxons/_form.html.erb +17 -0
- data/app/views/spree/admin/taxons/edit.html.erb +3 -1
- data/app/views/spree/admin/trackers/_form.html.erb +2 -2
- data/app/views/spree/admin/trackers/index.html.erb +2 -2
- data/app/views/spree/admin/users/_form.html.erb +37 -0
- data/app/views/spree/admin/users/edit.html.erb +28 -0
- data/app/views/spree/admin/users/index.html.erb +53 -0
- data/app/views/spree/admin/users/new.html.erb +23 -0
- data/app/views/spree/admin/users/show.html.erb +21 -0
- data/app/views/spree/admin/variants/edit.html.erb +6 -4
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +4 -4
- data/app/views/spree/admin/zones/index.html.erb +3 -1
- data/app/views/spree/checkout/_delivery.html.erb +1 -1
- data/app/views/spree/checkout/_payment.html.erb +1 -1
- data/app/views/spree/checkout/_summary.html.erb +2 -2
- data/app/views/spree/checkout/payment/_gateway.html.erb +6 -6
- data/app/views/spree/layouts/spree_application.html.erb +0 -1
- data/app/views/spree/order_mailer/cancel_email.text.erb +1 -1
- data/app/views/spree/order_mailer/confirm_email.text.erb +1 -1
- data/app/views/spree/orders/_adjustments.html.erb +1 -1
- data/app/views/spree/orders/_line_item.html.erb +2 -2
- data/app/views/spree/orders/edit.html.erb +1 -1
- data/app/views/spree/payments/_payment.html.erb +16 -0
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/products/_thumbnails.html.erb +3 -3
- data/app/views/spree/products/index.html.erb +1 -1
- data/app/views/spree/shared/_google_analytics.html.erb +1 -1
- data/app/views/spree/shared/_main_nav_bar.html.erb +1 -1
- data/app/views/spree/shared/_order_details.html.erb +10 -24
- data/app/views/spree/shared/_products.html.erb +1 -1
- data/app/views/spree/shared/_search.html.erb +1 -1
- data/app/views/spree/taxons/show.html.erb +1 -1
- data/config/initializers/check_for_orphaned_preferences.rb +5 -2
- data/config/locales/en.yml +24 -5
- data/config/routes.rb +4 -3
- data/db/default/spree/countries.rb +229 -0
- data/db/default/spree/roles.rb +2 -0
- data/db/default/spree/states.rb +57 -0
- data/db/default/spree/zones.rb +17 -0
- data/db/migrate/20130207155350_add_order_id_index_to_payments.rb +9 -0
- data/db/migrate/20130208032954_add_primary_to_spree_products_taxons.rb +5 -0
- data/db/migrate/20130222032153_add_order_id_index_to_shipments.rb +5 -0
- data/db/migrate/20130226032817_change_meta_description_on_spree_products_to_text.rb +5 -0
- data/db/migrate/20130226054936_add_variant_id_index_to_spree_prices.rb +5 -0
- data/db/migrate/20130319062004_change_orders_total_precision.rb +8 -0
- data/db/migrate/20130319063911_change_spree_payments_amount_precision.rb +7 -0
- data/db/migrate/20130319064308_change_spree_return_authorization_amount_precision.rb +7 -0
- data/db/migrate/20130319082943_change_adjustments_amount_precision.rb +7 -0
- data/db/migrate/20130328195253_add_seo_metas_to_taxons.rb +9 -0
- data/lib/generators/spree/dummy/templates/rails/database.yml +9 -6
- data/lib/spree/core/calculated_adjustments.rb +1 -1
- data/lib/spree/core/controller_helpers/auth.rb +3 -3
- data/lib/spree/core/controller_helpers/common.rb +1 -11
- data/lib/spree/core/controller_helpers/order.rb +15 -12
- data/lib/spree/core/engine.rb +5 -1
- data/lib/spree/core/mail_interceptor.rb +4 -6
- data/lib/spree/core/mail_settings.rb +52 -23
- data/lib/spree/core/permalinks.rb +1 -3
- data/lib/spree/core/testing_support/authorization_helpers.rb +1 -1
- data/lib/spree/core/testing_support/capybara_ext.rb +30 -0
- data/lib/spree/core/testing_support/common_rake.rb +8 -0
- data/lib/spree/core/testing_support/factories/payment_factory.rb +1 -1
- data/lib/spree/core/testing_support/factories/product_factory.rb +7 -2
- data/lib/spree/core/testing_support/factories/variant_factory.rb +4 -2
- data/lib/spree/core/validators/email.rb +1 -1
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/money.rb +14 -3
- data/lib/spree/product_filters.rb +1 -1
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +3 -2
- data/vendor/assets/javascripts/jsuri.js +2 -0
- data/vendor/assets/javascripts/modernizr.js +3 -3
- metadata +78 -69
- data/db/default/spree/countries.yml +0 -1589
- data/db/default/spree/roles.yml +0 -5
- data/db/default/spree/states.yml +0 -256
- data/db/default/spree/zone_members.yml +0 -169
- data/db/default/spree/zones.yml +0 -13
@@ -30,11 +30,11 @@
|
|
30
30
|
<ul>
|
31
31
|
<li>
|
32
32
|
<%= radio_button :payment_method, :active, true %>
|
33
|
-
<%= label_tag nil, t(:
|
33
|
+
<%= label_tag nil, t(:say_yes) %>
|
34
34
|
</li>
|
35
35
|
<li>
|
36
36
|
<%= radio_button :payment_method, :active, false %>
|
37
|
-
<%= label_tag nil, t(:
|
37
|
+
<%= label_tag nil, t(:say_no) %>
|
38
38
|
</li>
|
39
39
|
</ul>
|
40
40
|
</div>
|
@@ -10,38 +10,42 @@
|
|
10
10
|
</li>
|
11
11
|
<% end %>
|
12
12
|
|
13
|
-
|
14
|
-
<
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<
|
24
|
-
<
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
<
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
</
|
13
|
+
<% if @payment_methods.any? %>
|
14
|
+
<table class="index" id='listing_payment_methods'>
|
15
|
+
<colgroup>
|
16
|
+
<col style="width: 15%">
|
17
|
+
<col style="width: 35%">
|
18
|
+
<col style="width: 15%">
|
19
|
+
<col style="width: 10%">
|
20
|
+
<col style="width: 10%">
|
21
|
+
<col style="width: 15%">
|
22
|
+
</colgroup>
|
23
|
+
<thead>
|
24
|
+
<tr data-hook="admin_payment_methods_index_headers">
|
25
|
+
<th><%= t(:name) %></th>
|
26
|
+
<th><%= t(:provider) %></th>
|
27
|
+
<th><%= t(:environment) %></th>
|
28
|
+
<th><%= t(:display) %></th>
|
29
|
+
<th><%= t(:active) %></th>
|
30
|
+
<th data-hook="admin_payment_methods_index_header_actions" class="actions"></th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<% @payment_methods.each do |method|%>
|
35
|
+
<tr id="<%= spree_dom_id method %>" data-hook="admin_payment_methods_index_rows" class="<%= cycle('odd', 'even')%>">
|
36
|
+
<td class="align-center"><%= method.name %></td>
|
37
|
+
<td><%= method.type %></td>
|
38
|
+
<td class="align-center"><%= method.environment.to_s.titleize %></td>
|
39
|
+
<td class="align-center"><%= method.display_on.blank? ? t(:both) : t(method.display_on) %></td>
|
40
|
+
<td class="align-center"><%= method.active ? t(:say_yes) : t(:say_no) %></td>
|
41
|
+
<td data-hook="admin_payment_methods_index_row_actions" class="actions">
|
42
|
+
<%= link_to_edit method, :no_text => true %>
|
43
|
+
<%= link_to_delete method, :no_text => true %>
|
44
|
+
</td>
|
45
|
+
</tr>
|
46
|
+
<% end %>
|
47
|
+
</tbody>
|
48
|
+
</table>
|
49
|
+
<% else %>
|
50
|
+
<div class="alpha twelve columns no-objects-found"><%= t(:no_payment_methods_found) %></div>
|
51
|
+
<% end %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% payments.each do |payment| %>
|
13
13
|
<tr data-hook="payments_row" class="<%= cycle('odd', 'even')%>">
|
14
14
|
<td><%= pretty_time(payment.created_at) %></td>
|
15
|
-
<td class='align-center'><%= payment.display_amount %></td>
|
15
|
+
<td class='align-center'><%= payment.display_amount.to_html %></td>
|
16
16
|
<td class="align-center"><%= link_to payment_method_name(payment), spree.admin_order_payment_path(@order, payment) %></td>
|
17
17
|
<td class="align-center"> <span class="state <%= payment.state %>"><%= t(payment.state, :scope => :payment_states, :default => payment.state.capitalize) %></span></td>
|
18
18
|
<td class="actions">
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<div class="nine columns">
|
10
10
|
<%= image_tag 'credit_cards/credit_card.gif', :id => 'credit-card-image' %>
|
11
11
|
</div>
|
12
|
-
|
12
|
+
|
13
13
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
14
14
|
|
15
15
|
<div class="clear"></div>
|
@@ -17,8 +17,8 @@
|
|
17
17
|
<div class="alpha four columns">
|
18
18
|
<div data-hook="card_number">
|
19
19
|
<div class="field">
|
20
|
-
<%= label_tag
|
21
|
-
<%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth', :maxlength => 19 %>
|
20
|
+
<%= label_tag 'card_number', raw(t(:card_number) + content_tag(:span, ' *', :class => 'required')) %>
|
21
|
+
<%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth', :id => 'card_number', :maxlength => 19 %>
|
22
22
|
<span id="card_type" style="display:none;">
|
23
23
|
( <span id="looks_like" ><%= t(:card_type_is) %> <span id="type"></span></span>
|
24
24
|
<span id="unrecognized"><%= t(:unrecognized_card_type) %></span>
|
@@ -29,17 +29,17 @@
|
|
29
29
|
</div>
|
30
30
|
<div class="three columns">
|
31
31
|
<div data-hook="card_expiration" class="field">
|
32
|
-
<%= label_tag
|
33
|
-
<%= select_month(Date.today, :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true, :class => 'required select2') %>
|
34
|
-
<%= select_year(Date.today, :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15, :class => 'required select2') %>
|
32
|
+
<%= label_tag 'card_month', raw(t(:expiration) + content_tag(:span, ' *', :class => 'required')) %><br>
|
33
|
+
<%= select_month(Date.today, { :prefix => param_prefix, :field_name => 'month', :use_month_numbers => true }, :class => 'required select2', :id => 'card_month') %>
|
34
|
+
<%= select_year(Date.today, { :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15 }, :class => 'required select2', :id => 'card_year') %>
|
35
35
|
</div>
|
36
36
|
</div>
|
37
37
|
<div class="omega two columns">
|
38
38
|
<div data-hook="card_code" class="field">
|
39
|
-
<%= label_tag
|
40
|
-
<%= text_field_tag "#{param_prefix}[verification_value]", '', :class => 'required fullwidth', :size => 5 %>
|
41
|
-
<a href="/content/cvv" class="info" target="_blank"
|
42
|
-
(<%= t(:
|
39
|
+
<%= label_tag 'card_code', raw(t(:card_code) + content_tag(:span, ' *', :class => "required")) %>
|
40
|
+
<%= text_field_tag "#{param_prefix}[verification_value]", '', :class => 'required fullwidth', :size => 5, :id => 'card_code' %>
|
41
|
+
<a href="/content/cvv" class="info" target="_blank" id="cvv_link">
|
42
|
+
(<%= t(:whats_is_this) %>)
|
43
43
|
</a>
|
44
44
|
</div>
|
45
45
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div data-hook="admin_product_form_fields">
|
2
|
-
|
3
|
-
<div class="left eight columns alpha" data-hook="admin_product_form_left">
|
2
|
+
|
3
|
+
<div class="left eight columns alpha" data-hook="admin_product_form_left">
|
4
4
|
<%= f.field_container :name do %>
|
5
5
|
<%= f.label :name, raw(t(:name) + content_tag(:span, ' *', :class => 'required')) %>
|
6
6
|
<%= f.text_field :name, :class => 'fullwidth title' %>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<%= f.text_field :sku, :size => 16 %>
|
57
57
|
<% end %>
|
58
58
|
|
59
|
-
<% if Spree::Config[:track_inventory_levels] %>
|
59
|
+
<% if Spree::Config[:track_inventory_levels] %>
|
60
60
|
<div class="alpha two columns">
|
61
61
|
<%= f.field_container :on_hand do %>
|
62
62
|
<%= f.label :on_hand, t(:on_hand) %>
|
@@ -116,11 +116,10 @@
|
|
116
116
|
|
117
117
|
<%= f.field_container :option_types do %>
|
118
118
|
<%= f.label :option_type_ids, t(:option_types) %>
|
119
|
-
<%= f.select :option_type_ids, option_types_options_for(@product), {}, :
|
119
|
+
<%= f.select :option_type_ids, option_types_options_for(@product), {}, :multiple => true %>
|
120
120
|
<% end %>
|
121
121
|
</div>
|
122
122
|
|
123
|
-
<!-- <h2><%= t(:metadata) %></h2> -->
|
124
123
|
<div data-hook="admin_product_form_meta" class="alpha omega twelve columns">
|
125
124
|
<%= f.field_container :meta_keywords do %>
|
126
125
|
<%= f.label :meta_keywords, t(:meta_keywords) %>
|
@@ -140,10 +139,6 @@
|
|
140
139
|
<div class="clear"></div>
|
141
140
|
</div>
|
142
141
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
$('.select2-container').css({width: '20em'})
|
148
|
-
</script>
|
149
|
-
<% end %>
|
142
|
+
<script>
|
143
|
+
$("#product_option_type_ids").select2();
|
144
|
+
</script>
|
@@ -3,13 +3,9 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
<%= button_link_to t(:new_product), new_object_url, { :remote => true, :icon => 'icon-plus', :id => 'admin_new_product' } %>
|
10
|
-
</li>
|
11
|
-
</ul>
|
12
|
-
</div>
|
6
|
+
<li id="new_product_link">
|
7
|
+
<%= button_link_to t(:new_product), new_object_url, { :remote => true, :icon => 'icon-plus', :id => 'admin_new_product' } %>
|
8
|
+
</li>
|
13
9
|
<% end %>
|
14
10
|
|
15
11
|
<%= render :partial => 'spree/admin/shared/product_sub_menu' %>
|
@@ -20,8 +16,8 @@
|
|
20
16
|
|
21
17
|
<% content_for :table_filter do %>
|
22
18
|
<div data-hook="admin_products_sidebar">
|
23
|
-
|
24
|
-
<%= search_form_for [:admin, @search] do |f| %>
|
19
|
+
|
20
|
+
<%= search_form_for [:admin, @search] do |f| %>
|
25
21
|
|
26
22
|
<%- locals = {:f => f} %>
|
27
23
|
|
@@ -30,7 +26,7 @@
|
|
30
26
|
<div class="field">
|
31
27
|
<%= f.label :name_cont, t(:name) %>
|
32
28
|
<%= f.text_field :name_cont, :size => 15 %>
|
33
|
-
</div>
|
29
|
+
</div>
|
34
30
|
</div>
|
35
31
|
<div class="four columns">
|
36
32
|
<div class="field">
|
@@ -42,12 +38,12 @@
|
|
42
38
|
<div class="field checkbox">
|
43
39
|
<label>
|
44
40
|
<%= f.check_box :deleted_at_null, {:checked => params[:q][:deleted_at_null].blank?}, '', '1' %>
|
45
|
-
<%= t(:show_deleted) %>
|
41
|
+
<%= t(:show_deleted) %>
|
46
42
|
</label>
|
47
43
|
</div>
|
48
44
|
</div>
|
49
45
|
</div>
|
50
|
-
|
46
|
+
|
51
47
|
<div class="clear"></div>
|
52
48
|
|
53
49
|
<div class="form-buttons actions filter-actions" data-hook="admin_products_index_search_buttons">
|
@@ -59,6 +55,8 @@
|
|
59
55
|
|
60
56
|
<div id="new_product" data-hook></div>
|
61
57
|
|
58
|
+
<%= paginate @collection %>
|
59
|
+
|
62
60
|
<% if @collection.any? %>
|
63
61
|
<table class="index" id="listing_products">
|
64
62
|
<colgroup>
|
@@ -74,15 +72,15 @@
|
|
74
72
|
<th colspan="2"><%= sort_link @search,:name, t(:name), { :default_order => "desc" }, {:title => 'admin_products_listing_name_title'} %></th>
|
75
73
|
<th><%= sort_link @search,:master_default_price_amount, t(:master_price), {}, {:title => 'admin_products_listing_price_title'} %></th>
|
76
74
|
<th data-hook="admin_products_index_header_actions" class="actions"></th>
|
77
|
-
</tr>
|
78
|
-
</thead>
|
75
|
+
</tr>
|
76
|
+
</thead>
|
79
77
|
<tbody>
|
80
78
|
<% @collection.each do |product| %>
|
81
79
|
<tr <%= "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
|
82
80
|
<td class="align-center"><%= product.sku rescue '' %></td>
|
83
81
|
<td class="align-center"><%= mini_image(product) %></td>
|
84
82
|
<td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
|
85
|
-
<td class="align-center"><%= product.display_price rescue '' %></td>
|
83
|
+
<td class="align-center"><%= product.display_price.to_html rescue '' %></td>
|
86
84
|
<td class="actions" data-hook="admin_products_index_row_actions">
|
87
85
|
<%= link_to_edit product, :no_text => true, :class => 'edit' unless product.deleted? %>
|
88
86
|
|
@@ -67,7 +67,9 @@
|
|
67
67
|
prototype_select.change(function() {
|
68
68
|
var id = prototype_select.val();
|
69
69
|
if (id.length) {
|
70
|
-
|
70
|
+
var url = new Uri(base_url);
|
71
|
+
url.setPath(url.path() + '/' + id);
|
72
|
+
$('#product-from-prototype').load(url.toString());
|
71
73
|
} else {
|
72
74
|
$('#product-from-prototype').empty();
|
73
75
|
}
|
@@ -6,25 +6,25 @@
|
|
6
6
|
<th><%= t(:quantity_shipped) %></th>
|
7
7
|
<th><%= t(:quantity_returned) %></th>
|
8
8
|
<th><%= t(:return_quantity) %></th>
|
9
|
-
</tr>
|
9
|
+
</tr>
|
10
10
|
</thead>
|
11
11
|
<tbody>
|
12
12
|
<% @return_authorization.order.inventory_units.group_by(&:variant).each do | variant, units| %>
|
13
13
|
<tr id="<%= dom_id(variant) %>" data-hook="rma_row" class="<%= cycle('odd', 'even')%>">
|
14
14
|
<td>
|
15
|
-
<
|
16
|
-
|
15
|
+
<div class="variant-name"><%= variant.name %></div>
|
16
|
+
<div class="variant-options"><%= variant.options_text %></div>
|
17
17
|
</td>
|
18
|
-
<td><%= units.select(&:shipped?).size %></td>
|
19
|
-
<td><%= units.select(&:returned?).size %></td>
|
20
|
-
<td class="return_quantity">
|
18
|
+
<td class="align-center"><%= units.select(&:shipped?).size %></td>
|
19
|
+
<td class="align-center"><%= units.select(&:returned?).size %></td>
|
20
|
+
<td class="return_quantity align-center">
|
21
21
|
<% if @return_authorization.received? %>
|
22
22
|
<%= @return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0 %>
|
23
23
|
<% elsif units.select(&:shipped?).empty? %>
|
24
24
|
0
|
25
25
|
<% else %>
|
26
26
|
<%= number_field_tag "return_quantity[#{variant.id}]",
|
27
|
-
@return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:
|
27
|
+
@return_authorization.inventory_units.group_by(&:variant)[variant].try(:size) || 0, {:style => 'width:100px;', :min => 0} %>
|
28
28
|
<% end %>
|
29
29
|
</td>
|
30
30
|
</tr>
|
@@ -1,26 +1,32 @@
|
|
1
|
-
<% content_for :page_title do %>
|
2
|
-
<%= t(:return_authorization) %> <%= @return_authorization.number %> (<%= t(@return_authorization.state.downcase) %>)
|
3
|
-
<% end %>
|
4
|
-
|
5
1
|
<% content_for :page_actions do %>
|
6
2
|
<li>
|
7
3
|
<% if @return_authorization.can_receive? %>
|
8
|
-
<%= button_link_to t(:receive), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'receive'), :method => :put, :data => { :confirm => t(:are_you_sure) } %>
|
4
|
+
<%= button_link_to t(:receive), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'receive'), :method => :put, :data => { :confirm => t(:are_you_sure) }, :icon => 'icon-download-alt' %>
|
9
5
|
<% end %>
|
6
|
+
</li>
|
7
|
+
<li>
|
10
8
|
<% if @return_authorization.can_cancel? %>
|
11
|
-
<%= button_link_to t(:cancel), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'cancel'), :method => :put, :data => { :confirm => t(:are_you_sure) } %>
|
9
|
+
<%= button_link_to t(:cancel), fire_admin_order_return_authorization_url(@order, @return_authorization, :e => 'cancel'), :method => :put, :data => { :confirm => t(:are_you_sure) }, :icon => 'icon-remove' %>
|
12
10
|
<% end %>
|
13
11
|
</li>
|
14
12
|
<% end %>
|
15
13
|
|
16
14
|
<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Return Authorizations' } %>
|
17
15
|
|
16
|
+
<% content_for :page_title do %>
|
17
|
+
<i class="icon-arrow-right"></i> <%= t(:return_authorization) %> <%= @return_authorization.number %> (<%= t(@return_authorization.state.downcase) %>)
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
|
18
21
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @return_authorization } %>
|
19
22
|
<%= form_for [:admin, @order, @return_authorization] do |f| %>
|
20
|
-
|
23
|
+
<fieldset class="no-border-top">
|
24
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
21
25
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
+
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
27
|
+
<%= button t(:update), 'icon-repeat' %>
|
28
|
+
<span class="or"><%= t(:or) %></span>
|
29
|
+
<%= button_link_to t(:cancel), admin_order_return_authorizations_url(@order), :icon => 'icon-remove' %>
|
30
|
+
</div>
|
31
|
+
</fieldset>
|
26
32
|
<% end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<i class="icon-arrow-right"></i> <%= t(:return_authorizations) %>
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<% if @order.inventory_units.any?
|
16
|
+
<% if @order.inventory_units.any? &:shipped? %>
|
17
17
|
<table class="index">
|
18
18
|
<thead data-hook="rma_header">
|
19
19
|
<tr>
|
@@ -21,15 +21,15 @@
|
|
21
21
|
<th><%= t(:status) %></th>
|
22
22
|
<th><%= t(:amount) %></th>
|
23
23
|
<th><%= "#{t('spree.date')}/#{t('spree.time')}" %></th>
|
24
|
-
<th class="
|
25
|
-
</tr>
|
24
|
+
<th class="actions"></th>
|
25
|
+
</tr>
|
26
26
|
</thead>
|
27
27
|
<tbody>
|
28
28
|
<% @return_authorizations.each do |return_authorization| %>
|
29
29
|
<tr id="<%= spree_dom_id(return_authorization) %>" data-hook="rma_row" class="<%= cycle('odd', 'even')%>">
|
30
30
|
<td><%= return_authorization.number %></td>
|
31
31
|
<td><%= t(return_authorization.state.downcase) %></td>
|
32
|
-
<td><%= return_authorization.display_amount %></td>
|
32
|
+
<td><%= return_authorization.display_amount.to_html %></td>
|
33
33
|
<td><%= pretty_time(return_authorization.created_at) %></td>
|
34
34
|
<td class="actions">
|
35
35
|
<%= link_to_edit return_authorization %>
|
@@ -1,15 +1,22 @@
|
|
1
1
|
<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Return Authorizations' } %>
|
2
2
|
|
3
3
|
<% content_for :page_title do %>
|
4
|
-
<%= t(:new_return_authorization) %>
|
4
|
+
<i class="icon-arrow-right"></i> <%= t(:new_return_authorization) %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<% content_for :page_actions do %>
|
8
|
+
<li><%= button_link_to t(:back_to_return_authorizations_list), spree.admin_order_return_authorizations_url, :icon => 'icon-arrow-left' %></li>
|
5
9
|
<% end %>
|
6
10
|
|
7
11
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @return_authorization } %>
|
8
12
|
<%= form_for [:admin, @order, @return_authorization] do |f| %>
|
9
|
-
|
13
|
+
<fieldset class="no-border-top">
|
14
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
17
|
+
<%= button t(:continue), 'icon-arrow-right' %>
|
18
|
+
<span class="or"><%= t(:or) %></span>
|
19
|
+
<%= button_link_to t(:cancel), admin_order_return_authorizations_url(@order), :icon => 'icon-remove' %>
|
20
|
+
</div>
|
21
|
+
</fieldset>
|
15
22
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="alert <%= alert.severity.downcase %>">
|
2
2
|
<%= alert.message %> <%= link_to alert.url_name, alert.url if alert.url %>
|
3
|
-
<%= link_to 'X', dismiss_alert_admin_general_settings_path(:alert_id => alert.id),
|
3
|
+
<%= link_to 'X', spree.dismiss_alert_admin_general_settings_path(:alert_id => alert.id),
|
4
4
|
:remote => true, :method => :post, :class => 'dismiss' %>
|
5
5
|
</div>
|
@@ -6,14 +6,18 @@
|
|
6
6
|
<nav class="menu">
|
7
7
|
<ul class="sidebar" data-hook="admin_configurations_sidebar_menu">
|
8
8
|
<%= configurations_sidebar_menu_item t(:general_settings), edit_admin_general_settings_path %>
|
9
|
-
|
9
|
+
<% if Spree::Config[:override_actionmailer_config] %>
|
10
|
+
<%= configurations_sidebar_menu_item t(:mail_methods), admin_mail_methods_path %>
|
11
|
+
<% end %>
|
10
12
|
<%= configurations_sidebar_menu_item t(:image_settings), edit_admin_image_settings_path %>
|
11
13
|
<%= configurations_sidebar_menu_item t(:tax_categories), admin_tax_categories_path %>
|
12
14
|
<%= configurations_sidebar_menu_item t(:tax_rates), admin_tax_rates_path %>
|
13
15
|
<%= configurations_sidebar_menu_item t(:tax_settings), edit_admin_tax_settings_path %>
|
14
16
|
<%= configurations_sidebar_menu_item t(:zones), admin_zones_path %>
|
15
17
|
<%= configurations_sidebar_menu_item t(:countries), admin_countries_path %>
|
16
|
-
|
18
|
+
<% if Spree::Config[:default_country_id] %>
|
19
|
+
<%= configurations_sidebar_menu_item t(:states), admin_country_states_path(Spree::Config[:default_country_id]) %>
|
20
|
+
<% end %>
|
17
21
|
<%= configurations_sidebar_menu_item t(:payment_methods), admin_payment_methods_path %>
|
18
22
|
<%= configurations_sidebar_menu_item t(:taxonomies), admin_taxonomies_path %>
|
19
23
|
<%= configurations_sidebar_menu_item t(:shipping_methods), admin_shipping_methods_path %>
|