spree_backend 2.3.1 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend/payments/new.js +4 -0
  3. data/app/assets/javascripts/spree/backend/promotions.js +32 -1
  4. data/app/assets/javascripts/spree/backend/select_payments.js.coffee +1 -1
  5. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js.erb +2 -2
  6. data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +6 -3
  7. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +4 -0
  8. data/app/assets/stylesheets/spree/backend/sections/_products.scss +6 -0
  9. data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +20 -1
  10. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +39 -0
  11. data/app/assets/stylesheets/spree/backend/shared/_icons.scss +5 -0
  12. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +8 -0
  13. data/app/assets/stylesheets/spree/backend/shared/_typography.scss +6 -0
  14. data/app/controllers/spree/admin/products_controller.rb +3 -3
  15. data/app/controllers/spree/admin/resource_controller.rb +14 -2
  16. data/app/helpers/spree/admin/adjustments_helper.rb +1 -1
  17. data/app/views/spree/admin/orders/edit.html.erb +6 -6
  18. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +1 -1
  19. data/app/views/spree/admin/products/_form.html.erb +21 -1
  20. data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +8 -6
  21. data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +8 -0
  22. data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +37 -0
  23. data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +36 -0
  24. data/app/views/spree/admin/return_authorizations/index.html.erb +0 -2
  25. data/app/views/spree/admin/shared/_configuration_menu.html.erb +0 -1
  26. data/app/views/spree/admin/shared/_order_submenu.html.erb +5 -5
  27. data/app/views/spree/admin/shared/_tabs.html.erb +1 -1
  28. data/app/views/spree/admin/shipping_methods/_form.html.erb +1 -1
  29. data/app/views/spree/admin/taxons/index.html.erb +1 -1
  30. data/app/views/spree/admin/users/_user_page_actions.html.erb +3 -0
  31. data/config/locales/en.yml +6 -0
  32. data/config/routes.rb +0 -1
  33. metadata +12 -10
  34. data/app/controllers/spree/admin/tax_settings_controller.rb +0 -17
  35. data/app/views/spree/admin/tax_settings/edit.html.erb +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16854ac8fc1bd9366a39802aa884534c018a62a4
4
- data.tar.gz: 4825fb14f9dc2e1bde39be757d5fa4cf7f46c686
3
+ metadata.gz: fcaab04407621b636170b40405d2b04784bae951
4
+ data.tar.gz: 2f875cb85b7b5f00f76caac5ff0d38b5a5e38afc
5
5
  SHA512:
6
- metadata.gz: bedebf0cf5ec5eabca3dca08a449a4e62331b9276af8e61e1779588a6d916bbaf120701995a972a705b195dce890eb16d9d4f6cc76e9d229fc61e287c8948c21
7
- data.tar.gz: aa153dc093b1c23c68b2d023ae61e6dc296833fbcebfaa8644c1c3c460762502ea0db50eda316ccf6d4509eb26a6124e346ecb623c81f545034901bbf8d72dc9
6
+ metadata.gz: 63bd4a7ede4219c5234a9b2d9d647e86c83332eb9048263e43e0059320cf4d9fe7b3db6f9e40f8726d28ab8cab06a310a30cabedb783ce0088923b288580910c
7
+ data.tar.gz: 9bd26dde28d827366a06776aada15334030d6b99506c02e7a8a1f19b9193acb14333a96a93cebd17021c318c7117b87f703ec06726d45142e967eb920abd2b2e
@@ -12,7 +12,9 @@ $(document).ready(function() {
12
12
  $('.payment_methods_radios').click(
13
13
  function() {
14
14
  $('.payment-methods').hide();
15
+ $('.payment-methods input').prop('disabled', true);
15
16
  if (this.checked) {
17
+ $('#payment_method_' + this.value).prop('disabled', false);
16
18
  $('#payment_method_' + this.value).show();
17
19
  }
18
20
  }
@@ -21,9 +23,11 @@ $(document).ready(function() {
21
23
  $('.payment_methods_radios').each(
22
24
  function() {
23
25
  if (this.checked) {
26
+ $('#payment_method_' + this.value).prop('disabled', false);
24
27
  $('#payment_method_' + this.value).show();
25
28
  } else {
26
29
  $('#payment_method_' + this.value).hide();
30
+ $('#payment_method_' + this.value).prop('disabled', true);
27
31
  }
28
32
 
29
33
  if ($("#card_new" + this.value).is("*")) {
@@ -33,6 +33,37 @@ var initProductActions = function () {
33
33
  });
34
34
  });
35
35
 
36
+ //
37
+ // Tiered Calculator
38
+ //
39
+ if ($('#tier-fields-template').length && $('#tier-input-name').length) {
40
+ var tierFieldsTemplate = Handlebars.compile($('#tier-fields-template').html());
41
+ var tierInputNameTemplate = Handlebars.compile($('#tier-input-name').html());
42
+
43
+ var originalTiers = $('.js-original-tiers').data('original-tiers');
44
+ $.each(originalTiers, function(base, value) {
45
+ var fieldName = tierInputNameTemplate({base: base}).trim();
46
+ $('.js-tiers').append(tierFieldsTemplate({
47
+ baseField: {value: base},
48
+ valueField: {name: fieldName, value: value}
49
+ }));
50
+ });
51
+
52
+ $(document).on('click', '.js-add-tier', function(event) {
53
+ event.preventDefault();
54
+ $('.js-tiers').append(tierFieldsTemplate({valueField: {name: null}}));
55
+ });
56
+
57
+ $(document).on('click', '.js-remove-tier', function(event) {
58
+ $(this).parents('.tier').remove();
59
+ });
60
+
61
+ $(document).on('change', '.js-base-input', function(event) {
62
+ var valueInput = $(this).parents('.tier').find('.js-value-input');
63
+ valueInput.attr('name', tierInputNameTemplate({base: $(this).val()}).trim());
64
+ });
65
+ }
66
+
36
67
  //
37
68
  // CreateLineItems Promotion Action
38
69
  //
@@ -87,4 +118,4 @@ $(document).ready(function () {
87
118
 
88
119
  initProductActions();
89
120
 
90
- });
121
+ });
@@ -4,4 +4,4 @@ $ ->
4
4
  $('input[name="payment[payment_method_id]"]').click ()->
5
5
  $('.payment-method-settings fieldset').addClass('hidden')
6
6
  id = $(this).parents('li').data('id')
7
- $("fieldset##{id}").removeClass('hidden')
7
+ $("fieldset[data-id='#{id}']").removeClass('hidden')
@@ -20,10 +20,10 @@ $(document).ready(function () {
20
20
  return {
21
21
  per_page: 50,
22
22
  page: page,
23
+ without_children: true,
23
24
  q: {
24
25
  name_cont: term
25
- },
26
- token: Spree.api_key
26
+ }
27
27
  };
28
28
  },
29
29
  results: function (data, page) {
@@ -9,6 +9,7 @@
9
9
 
10
10
  #ui-datepicker-div {
11
11
  @include border-radius($border-radius);
12
+
12
13
  border-color: $color-3;
13
14
  padding: 0;
14
15
  margin-top: 10px;
@@ -23,6 +24,7 @@
23
24
  margin-top: -10px;
24
25
  left: 25px;
25
26
  z-index: 1;
27
+ display: block;
26
28
  }
27
29
 
28
30
  .ui-datepicker-header {
@@ -47,14 +49,15 @@
47
49
  }
48
50
 
49
51
  .ui-icon {
52
+ @extend [class^="icon-"]:before;
53
+ @extend .fa;
54
+
50
55
  background-image: none;
51
56
  text-indent: 0;
52
57
  color: $color-1;
53
58
  width: 10px;
54
59
  margin-left: -5px;
55
- @extend [class^="icon-"]:before;
56
- @extend .fa;
57
-
60
+
58
61
  &:hover {
59
62
  color: very-light($color-2, 25);
60
63
  }
@@ -51,6 +51,10 @@ nav.menu {
51
51
  color: $color-body-text;
52
52
  }
53
53
 
54
+ &.fa:before {
55
+ padding-right: 4px;
56
+ }
57
+
54
58
  &:hover {
55
59
  i {
56
60
  color: $color-2;
@@ -16,6 +16,12 @@
16
16
  }
17
17
  }
18
18
 
19
+ [data-hook="admin_product_form_multiple_variants"] {
20
+ .info-actions {
21
+ text-align: right;
22
+ }
23
+ }
24
+
19
25
  .outstanding-balance {
20
26
  margin-bottom: 15px;
21
27
  text-transform: uppercase;
@@ -34,6 +34,25 @@
34
34
  margin-bottom: 0;
35
35
  }
36
36
 
37
+ .tier {
38
+ position: relative;
39
+ padding-bottom: 10px;
40
+
41
+ .remove {
42
+ position: absolute;
43
+ left: -15px;
44
+ top: 10px;
45
+
46
+ &:hover {
47
+ color: #c60f13;
48
+ }
49
+ }
50
+ }
51
+
52
+ .right-align {
53
+ text-align: right;
54
+ }
55
+
37
56
  .field {
38
57
  padding-bottom: 10px;
39
58
 
@@ -97,4 +116,4 @@
97
116
  border: none;
98
117
  padding-bottom: 0;
99
118
  }
100
- }
119
+ }
@@ -32,6 +32,45 @@ textarea {
32
32
  width: 100%;
33
33
  }
34
34
 
35
+ .input-group {
36
+ position: relative;
37
+ display: table;
38
+ border-collapse: separate;
39
+
40
+ .form-control,
41
+ .input-group-addon {
42
+ display: table-cell;
43
+
44
+ &:first-child {
45
+ border-top-right-radius: 0;
46
+ border-bottom-right-radius: 0;
47
+ }
48
+ &:last-child {
49
+ border-top-left-radius: 0;
50
+ border-bottom-left-radius: 0;
51
+ }
52
+ }
53
+
54
+ .form-control {
55
+ width: 100%;
56
+ }
57
+
58
+ .input-group-addon {
59
+ padding: 6px 10px;
60
+ border: 1px solid #cee1f4;
61
+ background: #eff5fc;
62
+ border-radius: 3px;
63
+
64
+ &:first-child {
65
+ border-right: none;
66
+ }
67
+
68
+ &:last-child {
69
+ border-left: none;
70
+ }
71
+ }
72
+ }
73
+
35
74
  label {
36
75
  font-weight: 600;
37
76
  text-transform: uppercase;
@@ -46,3 +46,8 @@ button, a {
46
46
  .icon-user { @extend .fa-user; }
47
47
  .icon-signout { @extend .fa-sign-out; }
48
48
  .icon-external-link { @extend .fa-external-link; }
49
+
50
+ // Avoid ugly default browser font (usually a serif) when an element has an icon AND text
51
+ .fa {
52
+ font-family: "FontAwesome", $base-font-family !important;
53
+ }
@@ -35,6 +35,14 @@
35
35
  margin-right: -10px;
36
36
  }
37
37
 
38
+ .container .column,
39
+ .container .columns {
40
+ // Float container right instead of left.
41
+ .right {
42
+ float: right;
43
+ }
44
+ }
45
+
38
46
  // Header
39
47
  //---------------------------------------------------
40
48
  #header {
@@ -77,6 +77,12 @@ ul {
77
77
  }
78
78
  }
79
79
 
80
+ ul.text_list {
81
+ border-top: none;
82
+ margin: 0;
83
+ list-style: disc inside none;
84
+ }
85
+
80
86
  dl {
81
87
  width: 100%;
82
88
  overflow: hidden;
@@ -59,7 +59,7 @@ module Spree
59
59
  if @new.save
60
60
  flash[:success] = Spree.t('notice_messages.product_cloned')
61
61
  else
62
- flash[:success] = Spree.t('notice_messages.product_not_cloned')
62
+ flash[:error] = Spree.t('notice_messages.product_not_cloned')
63
63
  end
64
64
 
65
65
  redirect_to edit_admin_product_url(@new)
@@ -123,9 +123,9 @@ module Spree
123
123
  end
124
124
 
125
125
  def product_includes
126
- [{ :variants => [:images, { :option_values => :option_type }], :master => [:images, :default_price]}]
126
+ [{ :variants => [:images], :master => [:images, :default_price]}]
127
127
  end
128
-
128
+
129
129
  def clone_object_url resource
130
130
  clone_admin_product_url resource
131
131
  end
@@ -37,7 +37,13 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
37
37
  end
38
38
  else
39
39
  invoke_callbacks(:update, :fails)
40
- respond_with(@object)
40
+ respond_with(@object) do |format|
41
+ format.html do
42
+ flash.now[:error] = @object.errors.full_messages.join(", ")
43
+ render action: 'edit'
44
+ end
45
+ format.js { render layout: false }
46
+ end
41
47
  end
42
48
  end
43
49
 
@@ -53,7 +59,13 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
53
59
  end
54
60
  else
55
61
  invoke_callbacks(:create, :fails)
56
- respond_with(@object)
62
+ respond_with(@object) do |format|
63
+ format.html do
64
+ flash.now[:error] = @object.errors.full_messages.join(", ")
65
+ render action: 'new'
66
+ end
67
+ format.js { render layout: false }
68
+ end
57
69
  end
58
70
  end
59
71
 
@@ -4,7 +4,7 @@ module Spree
4
4
  def adjustment_state(adjustment)
5
5
  state = adjustment.state.to_sym
6
6
  icon = { closed: 'lock', open: 'unlock' }
7
- content_tag(:span, '', class: icon[state])
7
+ content_tag(:span, '', class: "fa fa-#{ icon[state] }")
8
8
  end
9
9
 
10
10
  def display_adjustable(adjustable)
@@ -3,24 +3,24 @@
3
3
  <li><%= event_links %></li>
4
4
  <% end %>
5
5
  <% if can?(:resend, @order) %>
6
- <li><%= button_link_to Spree.t(:resend), resend_admin_order_url(@order), :method => :post, :icon => 'email' %></li>
6
+ <li><%= button_link_to Spree.t(:resend), resend_admin_order_url(@order), method: :post, icon: 'email' %></li>
7
7
  <% end %>
8
8
  <% if can?(:admin, Spree::Order) %>
9
- <li><%= button_link_to Spree.t(:back_to_orders_list), admin_orders_path, :icon => 'arrow-left' %></li>
9
+ <li><%= button_link_to Spree.t(:back_to_orders_list), admin_orders_path, icon: 'arrow-left' %></li>
10
10
  <% end %>
11
11
  <% end %>
12
12
 
13
- <%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Order Details' } %>
13
+ <%= render partial: 'spree/admin/shared/order_tabs', locals: { current: 'Order Details' } %>
14
14
 
15
15
  <div data-hook="admin_order_edit_header">
16
- <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
16
+ <%= render partial: 'spree/shared/error_messages', locals: { target: @order } %>
17
17
  </div>
18
18
 
19
19
  <% if @order.payments.exists? && @order.considered_risky? %>
20
20
  <%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.order("created_at DESC").first %>
21
21
  <% end %>
22
22
 
23
- <%= render :partial => 'add_product' if can?(:update, @order) %>
23
+ <%= render partial: 'add_product' if @order.shipment_state != 'shipped' && can?(:update, @order) %>
24
24
 
25
25
  <% if @order.line_items.empty? %>
26
26
  <div class="no-objects-found">
@@ -30,7 +30,7 @@
30
30
 
31
31
  <div data-hook="admin_order_edit_form">
32
32
  <div id="order-form-wrapper">
33
- <%= render :partial => 'form', :locals => { :order => @order } %>
33
+ <%= render partial: 'form', locals: { order: @order } %>
34
34
  </div>
35
35
  </div>
36
36
 
@@ -1,4 +1,4 @@
1
- <fieldset class="no-border-bottom">
1
+ <fieldset data-id='credit-card' class="no-border-bottom">
2
2
  <div class="field" data-hook="previous_cards">
3
3
  <% if previous_cards.any? %>
4
4
  <% previous_cards.each do |card| %>
@@ -60,7 +60,27 @@
60
60
  <% end %>
61
61
  </div>
62
62
 
63
- <% unless @product.has_variants? %>
63
+ <% if @product.has_variants? %>
64
+ <div data-hook="admin_product_form_multiple_variants">
65
+ <%= f.label :skus, Spree.t(:sku).pluralize %>
66
+ <span class="info">
67
+ <%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.count) %>
68
+ <ul class="text_list">
69
+ <% @product.variants.first(5).each do |variant| %>
70
+ <li><%= variant.sku %></li>
71
+ <% end %>
72
+ </ul>
73
+ <% if @product.variants.count > 5 %>
74
+ <%= Spree.t(:info_number_of_skus_not_shown, count: @product.variants.count - 5) %>
75
+ <% end %>
76
+ </span>
77
+ <div class="info-actions">
78
+ <% if can?(:admin, Spree::Variant) %>
79
+ <%= link_to_with_icon 'th-large', 'Manage Variants', admin_product_variants_url(@product) %>
80
+ <% end %>
81
+ </div>
82
+ </div>
83
+ <% else %>
64
84
  <div data-hook="admin_product_form_sku">
65
85
  <%= f.field_container :sku do %>
66
86
  <%= f.label :sku, Spree.t(:sku) %>
@@ -13,12 +13,14 @@
13
13
 
14
14
  <% unless promotion_action.new_record? %>
15
15
  <div class="settings field omega four columns">
16
- <% promotion_action.calculator.preferences.keys.map do |key| %>
17
- <% field_name = "#{param_prefix}[calculator_attributes][preferred_#{key}]" %>
18
- <%= label_tag field_name, Spree.t(key.to_s) %>
19
- <%= preference_field_tag(field_name,
20
- promotion_action.calculator.get_preference(key),
21
- :type => promotion_action.calculator.preference_type(key)) %>
16
+ <% type_name = promotion_action.calculator.type.demodulize.underscore %>
17
+ <% if lookup_context.exists?("fields",
18
+ ["spree/admin/promotions/calculators/#{type_name}"], true) %>
19
+ <%= render "spree/admin/promotions/calculators/#{type_name}/fields",
20
+ calculator: promotion_action.calculator, prefix: param_prefix %>
21
+ <% else %>
22
+ <%= render "spree/admin/promotions/calculators/default_fields",
23
+ calculator: promotion_action.calculator, prefix: param_prefix %>
22
24
  <% end %>
23
25
  <%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %>
24
26
  </div>
@@ -0,0 +1,8 @@
1
+ <% calculator.preferences.keys.map do |key| %>
2
+ <% field_name = "#{prefix}[calculator_attributes][preferred_#{key}]" %>
3
+ <%= label_tag field_name, Spree.t(key.to_s) %>
4
+ <%= preference_field_tag(
5
+ field_name,
6
+ calculator.get_preference(key),
7
+ type: calculator.preference_type(key)) %>
8
+ <% end %>
@@ -0,0 +1,37 @@
1
+ <%= label_tag "#{prefix}[calculator_attributes][preferred_base_amount]",
2
+ Spree.t(:base_amount) %>
3
+ <%= preference_field_tag(
4
+ "#{prefix}[calculator_attributes][preferred_base_amount]",
5
+ calculator.preferred_base_amount,
6
+ type: calculator.preference_type(:base_amount)) %>
7
+
8
+ <%= label_tag nil, Spree.t(:tiers) %>
9
+ <%= content_tag :div, nil, class: "hidden js-original-tiers",
10
+ data: { :'original-tiers' => Hash[calculator.preferred_tiers.sort] } %>
11
+ <div class="js-tiers"></div>
12
+ <button class="fa fa-plus button js-add-tier"><%= Spree.t(:add) %></button>
13
+
14
+ <script type="text/x-handlebars-template" id="tier-input-name">
15
+ <%= prefix %>[calculator_attributes][preferred_tiers][{{base}}]
16
+ </script>
17
+
18
+ <script type="text/x-handlebars-template" id="tier-fields-template">
19
+ <div class="fullwidth tier">
20
+ <a class="fa fa-trash remove js-remove-tier"></a>
21
+ <div class="two columns alpha omega">
22
+ <div class="input-group">
23
+ <span class="input-group-addon">$</span>
24
+ <input class="js-base-input form-control" type="text" value={{baseField.value}}>
25
+ </div>
26
+ </div>
27
+ <div class="two columns alpha omega right">
28
+ <div class="input-group">
29
+ <span class="input-group-addon">$</span>
30
+ <input class="js-value-input form-control"
31
+ name="{{valueField.name}}" type="text" value={{valueField.value}}>
32
+ </div>
33
+ </div>
34
+ <div class="clear"></div>
35
+ </div>
36
+ </script>
37
+
@@ -0,0 +1,36 @@
1
+ <%= label_tag "#{prefix}[calculator_attributes][preferred_base_percent]",
2
+ Spree.t(:base_percent) %>
3
+ <%= preference_field_tag(
4
+ "#{prefix}[calculator_attributes][preferred_base_percent]",
5
+ calculator.preferred_base_percent,
6
+ type: calculator.preference_type(:base_percent)) %>
7
+
8
+ <%= label_tag nil, Spree.t(:tiers) %>
9
+ <%= content_tag :div, nil, class: "hidden js-original-tiers",
10
+ data: { :'original-tiers' => Hash[calculator.preferred_tiers.sort] } %>
11
+ <div class="js-tiers"></div>
12
+ <button class="fa fa-plus button js-add-tier"><%= Spree.t(:add) %></button>
13
+
14
+ <script type="text/x-handlebars-template" id="tier-input-name">
15
+ <%= prefix %>[calculator_attributes][preferred_tiers][{{base}}]
16
+ </script>
17
+
18
+ <script type="text/x-handlebars-template" id="tier-fields-template">
19
+ <div class="fullwidth tier">
20
+ <a class="fa fa-trash remove js-remove-tier"></a>
21
+ <div class="two columns alpha omega">
22
+ <div class="input-group">
23
+ <span class="input-group-addon">$</span>
24
+ <input class="js-base-input form-control" type="text" value={{baseField.value}}>
25
+ </div>
26
+ </div>
27
+ <div class="two columns alpha omega right">
28
+ <div class="input-group">
29
+ <input class="js-value-input form-control right-align"
30
+ name="{{valueField.name}}" type="text" value={{valueField.value}}>
31
+ <span class="input-group-addon">%</span>
32
+ </div>
33
+ </div>
34
+ <div class="clear"></div>
35
+ </div>
36
+ </script>
@@ -48,5 +48,3 @@
48
48
  <%= Spree.t(:cannot_create_returns) %>
49
49
  </div>
50
50
  <% end %>
51
-
52
- <%= button_link_to Spree.t(:continue), admin_orders_url, :icon => 'arrow-right' %>
@@ -8,7 +8,6 @@
8
8
  <%= configurations_sidebar_menu_item Spree.t(:general_settings), edit_admin_general_settings_path %>
9
9
  <%= configurations_sidebar_menu_item Spree.t(:tax_categories), admin_tax_categories_path %>
10
10
  <%= configurations_sidebar_menu_item Spree.t(:tax_rates), admin_tax_rates_path %>
11
- <%= configurations_sidebar_menu_item Spree.t(:tax_settings), edit_admin_tax_settings_path %>
12
11
  <%= configurations_sidebar_menu_item Spree.t(:zones), admin_zones_path %>
13
12
  <%= configurations_sidebar_menu_item Spree.t(:countries), admin_countries_path %>
14
13
  <% if Spree::Config[:default_country_id] %>
@@ -1,32 +1,32 @@
1
1
  <nav class="menu">
2
2
  <ul data-hook="admin_order_tabs">
3
3
  <% if can? :update, @order %>
4
- <li<%== ' class="active"' if current == 'Order Details' %>>
4
+ <li<%== ' class="active"' if current == 'Order Details' %> data-hook='admin_order_tabs_order_details'>
5
5
  <%= link_to_with_icon 'edit', Spree.t(:order_details), edit_admin_order_url(@order) %>
6
6
  </li>
7
7
  <% end %>
8
8
 
9
9
  <% if can?(:update, @order) && checkout_steps.include?("address") %>
10
- <li<%== ' class="active"' if current == 'Customer Details' %>>
10
+ <li<%== ' class="active"' if current == 'Customer Details' %> data-hook='admin_order_tabs_customer_details'>
11
11
  <%= link_to_with_icon 'user', Spree.t(:customer_details), admin_order_customer_url(@order) %>
12
12
  </li>
13
13
  <% end %>
14
14
 
15
15
  <% if can? :index, Spree::Adjustment %>
16
- <li<%== ' class="active"' if current == 'Adjustments' %>>
16
+ <li<%== ' class="active"' if current == 'Adjustments' %> data-hook='admin_order_tabs_adjustments'>
17
17
  <%= link_to_with_icon 'cogs', Spree.t(:adjustments), admin_order_adjustments_url(@order) %>
18
18
  </li>
19
19
  <% end %>
20
20
 
21
21
  <% if can?(:index, Spree::Payment) %>
22
- <li<%== ' class="active"' if current == 'Payments' %>>
22
+ <li<%== ' class="active"' if current == 'Payments' %> data-hook='admin_order_tabs_payments'>
23
23
  <%= link_to_with_icon 'credit-card', Spree.t(:payments), admin_order_payments_url(@order) %>
24
24
  </li>
25
25
  <% end %>
26
26
 
27
27
  <% if can? :index, Spree::ReturnAuthorization %>
28
28
  <% if @order.completed? %>
29
- <li<%== ' class="active"' if current == 'Return Authorizations' %>>
29
+ <li<%== ' class="active"' if current == 'Return Authorizations' %> data-hook='admin_order_tabs_return_authorizations'>
30
30
  <%= link_to_with_icon 'share', Spree.t(:return_authorizations), admin_order_return_authorizations_url(@order) %>
31
31
  </li>
32
32
  <% end %>
@@ -7,7 +7,7 @@
7
7
  <% if can? :admin, Spree::Admin::ReportsController %>
8
8
  <%= tab :reports, :icon => 'file' %>
9
9
  <% end %>
10
- <%= tab :configurations, :general_settings, :tax_categories, :tax_rates, :tax_settings, :zones, :countries, :states, :payment_methods, :shipping_methods, :shipping_categories, :stock_transfers, :stock_locations, :trackers, :label => 'configuration', :icon => 'wrench', :url => spree.edit_admin_general_settings_path %>
10
+ <%= tab :configurations, :general_settings, :tax_categories, :tax_rates, :zones, :countries, :states, :payment_methods, :shipping_methods, :shipping_categories, :stock_transfers, :stock_locations, :trackers, :label => 'configuration', :icon => 'wrench', :url => spree.edit_admin_general_settings_path %>
11
11
  <% if can? :admin, Spree::Promotion %>
12
12
  <%= tab(:promotions, :url => spree.admin_promotions_path, :icon => 'bullhorn') %>
13
13
  <% end %>
@@ -77,7 +77,7 @@
77
77
  <fieldset class="tax_categories no-border-bottom">
78
78
  <legend align="center"><%= Spree.t(:tax_category) %></legend>
79
79
  <%= f.field_container :categories do %>
80
- <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {}, :class => "select2 fullwidth" %>
80
+ <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "select2 fullwidth" %>
81
81
  <%= error_message_on :shipping_method, :tax_category_id %>
82
82
  <% end %>
83
83
  </fieldset>
@@ -9,7 +9,7 @@
9
9
  <% end %>
10
10
 
11
11
  <%= render :partial => 'spree/admin/shared/product_sub_menu' %>
12
- <span id='sorting_explanation' style='display:none'>Click &amp; drag on the products to sort them.</span>
12
+ <span id='sorting_explanation' style='display:none'><%= Spree.t(:click_and_drag_on_the_products_to_sort_them) %></span>
13
13
  <ul id='taxon_products'></ul>
14
14
 
15
15
  <%= render :partial => "spree/admin/products/autocomplete", :formats => :js %>
@@ -2,4 +2,7 @@
2
2
  <li>
3
3
  <%= button_link_to Spree.t(:back_to_users_list), spree.admin_users_path, :icon => 'arrow-left' %>
4
4
  </li>
5
+ <li>
6
+ <%= button_link_to Spree.t(:create_new_order), spree.new_admin_order_path(user_id: @user.id), :icon => 'plus' %>
7
+ </li>
5
8
  <% end %>
@@ -0,0 +1,6 @@
1
+ en:
2
+ spree:
3
+ info_product_has_multiple_skus: "This product has %{count} variants:"
4
+ info_number_of_skus_not_shown:
5
+ one: "and one other"
6
+ other: "and %{count} others"
data/config/routes.rb CHANGED
@@ -138,7 +138,6 @@ Spree::Core::Engine.add_routes do
138
138
 
139
139
  resources :stock_items, :only => [:create, :update, :destroy]
140
140
  resources :tax_rates
141
- resource :tax_settings
142
141
 
143
142
  resources :trackers
144
143
  resources :payment_methods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-01 00:00:00.000000000 Z
11
+ date: 2014-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,40 +16,40 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.3.1
19
+ version: 2.3.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.3.1
26
+ version: 2.3.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.3.1
33
+ version: 2.3.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.3.1
40
+ version: 2.3.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - '='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 3.1.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - '='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 3.1.0
55
55
  - !ruby/object:Gem::Dependency
@@ -217,7 +217,6 @@ files:
217
217
  - app/controllers/spree/admin/stock_transfers_controller.rb
218
218
  - app/controllers/spree/admin/tax_categories_controller.rb
219
219
  - app/controllers/spree/admin/tax_rates_controller.rb
220
- - app/controllers/spree/admin/tax_settings_controller.rb
221
220
  - app/controllers/spree/admin/taxonomies_controller.rb
222
221
  - app/controllers/spree/admin/taxons_controller.rb
223
222
  - app/controllers/spree/admin/trackers_controller.rb
@@ -319,6 +318,9 @@ files:
319
318
  - app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
320
319
  - app/views/spree/admin/promotions/actions/_create_line_items.html.erb
321
320
  - app/views/spree/admin/promotions/actions/_free_shipping.html.erb
321
+ - app/views/spree/admin/promotions/calculators/_default_fields.html.erb
322
+ - app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb
323
+ - app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb
322
324
  - app/views/spree/admin/promotions/edit.html.erb
323
325
  - app/views/spree/admin/promotions/index.html.erb
324
326
  - app/views/spree/admin/promotions/new.html.erb
@@ -413,7 +415,6 @@ files:
413
415
  - app/views/spree/admin/tax_rates/edit.html.erb
414
416
  - app/views/spree/admin/tax_rates/index.html.erb
415
417
  - app/views/spree/admin/tax_rates/new.html.erb
416
- - app/views/spree/admin/tax_settings/edit.html.erb
417
418
  - app/views/spree/admin/taxonomies/_form.html.erb
418
419
  - app/views/spree/admin/taxonomies/_js_head.html.erb
419
420
  - app/views/spree/admin/taxonomies/_list.html.erb
@@ -458,6 +459,7 @@ files:
458
459
  - app/views/spree/layouts/admin.html.erb
459
460
  - app/views/spree/test_mailer/test_email.text.erb
460
461
  - config/initializers/form_builder.rb
462
+ - config/locales/en.yml
461
463
  - config/routes.rb
462
464
  - lib/spree/backend.rb
463
465
  - lib/spree/backend/action_callbacks.rb
@@ -1,17 +0,0 @@
1
- module Spree
2
- module Admin
3
- class TaxSettingsController < Spree::Admin::BaseController
4
-
5
- def update
6
- Spree::Config.set(params[:preferences])
7
-
8
- respond_to do |format|
9
- format.html {
10
- redirect_to edit_admin_tax_settings_path
11
- }
12
- end
13
- end
14
-
15
- end
16
- end
17
- end
@@ -1,18 +0,0 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
2
-
3
- <% content_for :page_title do %>
4
- <%= Spree.t(:tax_settings) %>
5
- <% end %>
6
-
7
- <%= form_tag admin_tax_settings_path, :method => :put do %>
8
- <div data-hook="shipment_vat" class="field align-center">
9
- <%= hidden_field_tag 'preferences[shipment_inc_vat]', '0' %>
10
- <%= check_box_tag 'preferences[shipment_inc_vat]', '1', Spree::Config[:shipment_inc_vat] %>
11
- <%= label_tag nil, Spree.t(:shipment_inc_vat) %>
12
-
13
- </div>
14
-
15
- <div class="form-buttons" data-hook="buttons">
16
- <%= button Spree.t('actions.update'), 'refresh' %>
17
- </div>
18
- <% end %>