spree_backend 3.1.0.rc1 → 3.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/spree/backend/components/_labels.scss +1 -1
  3. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +2 -1
  4. data/app/controllers/spree/admin/resource_controller.rb +2 -8
  5. data/app/helpers/spree/admin/base_helper.rb +0 -5
  6. data/app/views/spree/admin/countries/_form.html.erb +6 -4
  7. data/app/views/spree/admin/countries/edit.html.erb +2 -5
  8. data/app/views/spree/admin/countries/new.html.erb +2 -5
  9. data/app/views/spree/admin/option_types/edit.html.erb +2 -3
  10. data/app/views/spree/admin/option_types/new.html.erb +1 -4
  11. data/app/views/spree/admin/orders/cart.html.erb +0 -3
  12. data/app/views/spree/admin/orders/edit.html.erb +0 -3
  13. data/app/views/spree/admin/payment_methods/_form.html.erb +5 -4
  14. data/app/views/spree/admin/payment_methods/edit.html.erb +2 -5
  15. data/app/views/spree/admin/payment_methods/new.html.erb +1 -4
  16. data/app/views/spree/admin/products/edit.html.erb +0 -1
  17. data/app/views/spree/admin/products/new.html.erb +1 -4
  18. data/app/views/spree/admin/promotion_categories/_form.html.erb +2 -1
  19. data/app/views/spree/admin/promotion_categories/edit.html.erb +2 -5
  20. data/app/views/spree/admin/promotion_categories/new.html.erb +1 -4
  21. data/app/views/spree/admin/promotions/_form.html.erb +1 -0
  22. data/app/views/spree/admin/promotions/edit.html.erb +5 -8
  23. data/app/views/spree/admin/promotions/new.html.erb +2 -5
  24. data/app/views/spree/admin/properties/edit.html.erb +2 -5
  25. data/app/views/spree/admin/properties/new.html.erb +1 -4
  26. data/app/views/spree/admin/prototypes/edit.html.erb +2 -5
  27. data/app/views/spree/admin/prototypes/new.html.erb +1 -4
  28. data/app/views/spree/admin/refund_reasons/edit.html.erb +1 -2
  29. data/app/views/spree/admin/refund_reasons/new.html.erb +2 -2
  30. data/app/views/spree/admin/refunds/edit.html.erb +2 -2
  31. data/app/views/spree/admin/refunds/new.html.erb +1 -1
  32. data/app/views/spree/admin/reimbursements/edit.html.erb +1 -1
  33. data/app/views/spree/admin/reports/sales_total.html.erb +1 -4
  34. data/app/views/spree/admin/return_authorization_reasons/edit.html.erb +1 -2
  35. data/app/views/spree/admin/return_authorization_reasons/new.html.erb +2 -2
  36. data/app/views/spree/admin/return_authorizations/edit.html.erb +2 -2
  37. data/app/views/spree/admin/return_authorizations/index.html.erb +5 -1
  38. data/app/views/spree/admin/roles/_form.html.erb +3 -2
  39. data/app/views/spree/admin/roles/edit.html.erb +3 -4
  40. data/app/views/spree/admin/roles/new.html.erb +2 -3
  41. data/app/views/spree/admin/shared/_address_form.html.erb +24 -16
  42. data/app/views/spree/admin/shared/named_types/_edit.html.erb +2 -5
  43. data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -0
  44. data/app/views/spree/admin/shared/named_types/_new.html.erb +1 -4
  45. data/app/views/spree/admin/shipping_categories/_form.html.erb +5 -2
  46. data/app/views/spree/admin/shipping_categories/edit.html.erb +2 -5
  47. data/app/views/spree/admin/shipping_categories/new.html.erb +1 -4
  48. data/app/views/spree/admin/shipping_methods/_form.html.erb +8 -8
  49. data/app/views/spree/admin/shipping_methods/edit.html.erb +2 -1
  50. data/app/views/spree/admin/shipping_methods/new.html.erb +1 -0
  51. data/app/views/spree/admin/states/_form.html.erb +1 -0
  52. data/app/views/spree/admin/states/edit.html.erb +2 -5
  53. data/app/views/spree/admin/states/new.html.erb +1 -4
  54. data/app/views/spree/admin/stock_locations/_form.html.erb +3 -2
  55. data/app/views/spree/admin/stock_locations/edit.html.erb +1 -5
  56. data/app/views/spree/admin/stock_locations/new.html.erb +2 -5
  57. data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
  58. data/app/views/spree/admin/stock_movements/new.html.erb +2 -4
  59. data/app/views/spree/admin/stock_transfers/new.html.erb +2 -1
  60. data/app/views/spree/admin/stock_transfers/show.html.erb +2 -1
  61. data/app/views/spree/admin/store_credit_categories/_form.html.erb +3 -2
  62. data/app/views/spree/admin/store_credit_categories/edit.html.erb +4 -1
  63. data/app/views/spree/admin/store_credit_categories/new.html.erb +3 -0
  64. data/app/views/spree/admin/store_credits/edit.html.erb +5 -3
  65. data/app/views/spree/admin/store_credits/index.html.erb +4 -4
  66. data/app/views/spree/admin/store_credits/new.html.erb +5 -3
  67. data/app/views/spree/admin/tax_categories/_form.html.erb +1 -0
  68. data/app/views/spree/admin/tax_categories/edit.html.erb +2 -5
  69. data/app/views/spree/admin/tax_categories/new.html.erb +1 -4
  70. data/app/views/spree/admin/tax_rates/_form.html.erb +5 -2
  71. data/app/views/spree/admin/tax_rates/edit.html.erb +2 -5
  72. data/app/views/spree/admin/tax_rates/new.html.erb +1 -4
  73. data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
  74. data/app/views/spree/admin/taxonomies/edit.erb +2 -5
  75. data/app/views/spree/admin/taxonomies/new.html.erb +2 -4
  76. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  77. data/app/views/spree/admin/taxons/edit.html.erb +3 -1
  78. data/app/views/spree/admin/trackers/_form.html.erb +8 -7
  79. data/app/views/spree/admin/trackers/edit.html.erb +6 -3
  80. data/app/views/spree/admin/trackers/new.html.erb +1 -0
  81. data/app/views/spree/admin/users/_form.html.erb +1 -1
  82. data/app/views/spree/admin/users/_sidebar.html.erb +4 -0
  83. data/app/views/spree/admin/users/_user_page_actions.html.erb +0 -1
  84. data/app/views/spree/admin/users/addresses.html.erb +5 -4
  85. data/app/views/spree/admin/users/edit.html.erb +4 -4
  86. data/app/views/spree/admin/users/items.html.erb +5 -4
  87. data/app/views/spree/admin/users/new.html.erb +1 -4
  88. data/app/views/spree/admin/users/orders.html.erb +5 -4
  89. data/app/views/spree/admin/zones/_form.html.erb +1 -0
  90. data/app/views/spree/admin/zones/edit.html.erb +2 -1
  91. data/app/views/spree/admin/zones/new.html.erb +1 -0
  92. data/spec/controllers/spree/admin/resource_controller_spec.rb +0 -26
  93. data/spec/features/admin/products/option_types_spec.rb +3 -2
  94. data/spec/features/admin/promotions/adjustments_spec.rb +19 -15
  95. data/spec/features/admin/returns/return_authorizations_spec.rb +1 -1
  96. data/spec/features/admin/users_spec.rb +1 -1
  97. metadata +6 -6
@@ -1,4 +1,3 @@
1
1
  <%= render partial: 'spree/admin/shared/named_types/edit', locals: {
2
- page_title: Spree.t(:editing_rma_reason),
3
- back_button_text: Spree.t(:back_to_rma_reason_list)
2
+ collection_url_label: Spree.t(:return_authorization_reasons)
4
3
  } %>
@@ -1,4 +1,4 @@
1
1
  <%= render partial: 'spree/admin/shared/named_types/new', locals: {
2
- page_title: Spree.t(:new_rma_reason),
3
- back_button_text: Spree.t(:back_to_rma_reason_list)
2
+ collection_url_label: Spree.t(:return_authorization_reasons),
3
+ page_title: Spree.t(:new_rma_reason)
4
4
  } %>
@@ -2,13 +2,13 @@
2
2
  <% if @return_authorization.can_cancel? %>
3
3
  <%= button_link_to Spree.t('actions.cancel'), fire_admin_order_return_authorization_url(@order, @return_authorization, e: 'cancel'), method: :put, data: { confirm: Spree.t(:are_you_sure) }, icon: "delete" %>
4
4
  <% end %>
5
- <%= button_link_to Spree.t(:back), spree.admin_order_return_authorizations_url(@order), icon: 'arrow-left' %>
6
5
  <% end %>
7
6
 
8
7
  <%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :return_authorizations } %>
9
8
 
10
9
  <% content_for :page_title do %>
11
- / <%= Spree.t(:return_authorization) %> <%= @return_authorization.number %> (<%= Spree.t(@return_authorization.state.downcase) %>)
10
+ / <%= link_to Spree.t(:return_authorizations), spree.admin_order_return_authorizations_url %>
11
+ / <%= @return_authorization.number %> (<%= Spree.t(@return_authorization.state.downcase) %>)
12
12
  <% end %>
13
13
 
14
14
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @return_authorization } %>
@@ -25,7 +25,11 @@
25
25
  <% @return_authorizations.each do |return_authorization| %>
26
26
  <tr id="<%= spree_dom_id(return_authorization) %>" data-hook="rma_row">
27
27
  <td><%= return_authorization.number %></td>
28
- <td><%= Spree.t(return_authorization.state.downcase) %></td>
28
+ <td>
29
+ <span class="label label-<%= return_authorization.state %>">
30
+ <%= Spree.t("return_authorization_states.#{return_authorization.state}") %>
31
+ </span>
32
+ </td>
29
33
  <td><%= return_authorization.display_pre_tax_total.to_html %></td>
30
34
  <td><%= pretty_time(return_authorization.created_at) %></td>
31
35
  <td class="actions actions-2">
@@ -1,8 +1,9 @@
1
1
  <div data-hook="admin_role_form_fields">
2
- <div data-hook="role_name" class="form-group">
2
+ <%= f.field_container :name, class: ["form-group"], 'data-hook' => "role_name" do %>
3
3
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
4
4
  <%= f.text_field :name, class: 'form-control' %>
5
- </div>
5
+ <%= f.error_message_on :name %>
6
+ <% end %>
6
7
 
7
8
  <div data-hook="additional_role_fields"></div>
8
9
  </div>
@@ -1,10 +1,9 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::Role.model_name.human) %>
2
+ <%= link_to Spree.t(:roles), spree.admin_roles_url %> /
3
+ <%= @role.name.capitalize %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::Role.model_name.human, admin_roles_path) %>
7
- <% end %>
6
+ <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @role } %>
8
7
 
9
8
  <%= form_for [:admin, @role] do |f| %>
10
9
  <fieldset>
@@ -1,10 +1,9 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:roles), spree.admin_roles_url %> /
2
3
  <%= Spree.t(:new_role) %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::Role.model_name.human, admin_roles_path) %>
7
- <% end %>
6
+ <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @role } %>
8
7
 
9
8
  <%= form_for [:admin, @role] do |f| %>
10
9
  <fieldset>
@@ -1,42 +1,49 @@
1
1
  <% s_or_b = type.chars.first %>
2
2
 
3
3
  <div id="<%= type %>" data-hook="address_fields">
4
- <div class="form-group <%= "#{type}-row" %>">
4
+ <%= field_container f.object, :firstname, class: ["form-group", "#{type}-row"] do %>
5
5
  <%= f.label :firstname, Spree.t(:first_name) %>
6
6
  <%= f.text_field :firstname, class: 'form-control' %>
7
- </div>
7
+ <%= error_message_on f.object, :firstname %>
8
+ <% end %>
8
9
 
9
- <div class="form-group <%= "#{type}-row" %>">
10
+ <%= field_container f.object, :lastname, class: ["form-group", "#{type}-row"] do %>
10
11
  <%= f.label :lastname, Spree.t(:last_name) %>
11
12
  <%= f.text_field :lastname, class: 'form-control' %>
12
- </div>
13
+ <%= error_message_on f.object, :lastname %>
14
+ <% end %>
13
15
 
14
16
  <% if Spree::Config[:company] %>
15
- <div class="form-group <%= "#{type}-row" %>">
17
+ <%= field_container f.object, :company, class: ["form-group", "#{type}-row"] do %>
16
18
  <%= f.label :company, Spree.t(:company) %>
17
19
  <%= f.text_field :company, class: 'form-control' %>
18
- </div>
20
+ <%= error_message_on f.object, :company %>
21
+ <% end %>
19
22
  <% end %>
20
23
 
21
- <div class="form-group <%= "#{type}-row" %>">
24
+ <%= field_container f.object, :address1, class: ["form-group", "#{type}-row"] do %>
22
25
  <%= f.label :address1, Spree.t(:street_address) %>
23
26
  <%= f.text_field :address1, class: 'form-control' %>
24
- </div>
27
+ <%= error_message_on f.object, :address1 %>
28
+ <% end %>
25
29
 
26
- <div class="form-group <%= "#{type}-row" %>">
30
+ <%= field_container f.object, :address2, class: ["form-group", "#{type}-row"] do %>
27
31
  <%= f.label :address2, Spree.t(:street_address_2) %>
28
32
  <%= f.text_field :address2, class: 'form-control' %>
29
- </div>
33
+ <%= error_message_on f.object, :address2 %>
34
+ <% end %>
30
35
 
31
- <div class="form-group <%= "#{type}-row" %>">
36
+ <%= field_container f.object, :city, class: ["form-group", "#{type}-row"] do %>
32
37
  <%= f.label :city, Spree.t(:city) %>
33
38
  <%= f.text_field :city, class: 'form-control' %>
34
- </div>
39
+ <%= error_message_on f.object, :city %>
40
+ <% end %>
35
41
 
36
- <div class="form-group <%= "#{type}-row" %>">
42
+ <%= field_container f.object, :zipcode, class: ["form-group", "#{type}-row"] do %>
37
43
  <%= f.label :zipcode, Spree.t(:zip) %>
38
44
  <%= f.text_field :zipcode, class: 'form-control' %>
39
- </div>
45
+ <%= error_message_on f.object, :zipcode %>
46
+ <% end %>
40
47
 
41
48
  <div class="form-group <%= "#{type}-row" %>">
42
49
  <%= f.label :country_id, Spree.t(:country) %>
@@ -55,10 +62,11 @@
55
62
  </span>
56
63
  </div>
57
64
 
58
- <div class="form-group <%= "#{type}-row" %>">
65
+ <%= field_container f.object, :phone, class: ["form-group", "#{type}-row"] do %>
59
66
  <%= f.label :phone, Spree.t(:phone) %>
60
67
  <%= f.phone_field :phone, class: 'form-control' %>
61
- </div>
68
+ <%= error_message_on f.object, :phone %>
69
+ <% end %>
62
70
  </div>
63
71
 
64
72
  <% content_for :head do %>
@@ -1,9 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= page_title %> / <%= @object.name %>
3
- <% end %>
4
-
5
- <% content_for :page_actions do %>
6
- <%= link_to_with_icon 'arrow-left', back_button_text, collection_url, class: 'btn btn-default' %>
2
+ <%= link_to collection_url_label, collection_url %> /
3
+ <%= @object.name %>
7
4
  <% end %>
8
5
 
9
6
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @object } %>
@@ -2,6 +2,7 @@
2
2
  <%= f.field_container :name, class: ['form-group'] do %>
3
3
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
4
4
  <%= f.text_field :name, class: 'form-control' %>
5
+ <%= f.error_message_on :name %>
5
6
  <% end %>
6
7
  <div class="checkbox">
7
8
  <%= label_tag :active do %>
@@ -1,11 +1,8 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to collection_url_label, collection_url %> /
2
3
  <%= page_title %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= link_to_with_icon 'arrow-left', back_button_text, collection_url, class: 'btn btn-default' %>
7
- <% end %>
8
-
9
6
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @object } %>
10
7
 
11
8
  <%= form_for [:admin, @object] do |f| %>
@@ -1,6 +1,9 @@
1
1
  <div data-hook="admin_shipping_category_form_fields">
2
2
  <div data-hook="name" class="form-group">
3
- <%= label_tag :shipping_category_name, Spree.t(:name) %><br>
4
- <%= f.text_field :name, class: 'form-control' %>
3
+ <%= f.field_container :name, class: ["form-group"] do %>
4
+ <%= f.label :name, Spree.t(:name) %><br>
5
+ <%= f.text_field :name, class: 'form-control' %>
6
+ <%= f.error_message_on :name %>
7
+ <% end %>
5
8
  </div>
6
9
  </div>
@@ -1,9 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::ShippingCategory.model_name.human) %>
3
- <% end %>
4
-
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::ShippingCategory.model_name.human, admin_shipping_categories_path) %>
2
+ <%= link_to Spree.t(:shipping_categories), spree.admin_shipping_categories_url %> /
3
+ <%= @shipping_category.name %>
7
4
  <% end %>
8
5
 
9
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @shipping_category } %>
@@ -1,11 +1,8 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:shipping_categories), spree.admin_shipping_categories_url %> /
2
3
  <%= Spree.t(:new_shipping_category) %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::ShippingCategory.model_name.human, admin_shipping_categories_path) %>
7
- <% end %>
8
-
9
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @shipping_category } %>
10
7
 
11
8
  <%= form_for [:admin, @shipping_category] do |f| %>
@@ -4,7 +4,7 @@
4
4
  <%= f.field_container :name, :class => ['form-group'] do %>
5
5
  <%= f.label :name, Spree.t(:name) %>
6
6
  <%= f.text_field :name, :class => 'form-control' %>
7
- <%= error_message_on :shipping_method, :name %>
7
+ <%= f.error_message_on :name %>
8
8
  <% end %>
9
9
  </div>
10
10
 
@@ -12,7 +12,7 @@
12
12
  <%= f.field_container :display_on, :class => ['form-group'] do %>
13
13
  <%= f.label :display_on, Spree.t(:display) %>
14
14
  <%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, { :class => 'select2' }) %>
15
- <%= error_message_on :shipping_method, :display_on %>
15
+ <%= f.error_message_on :display_on %>
16
16
  <% end %>
17
17
  </div>
18
18
  </div>
@@ -22,7 +22,7 @@
22
22
  <%= f.field_container :admin_name, :class => ['form-group'] do %>
23
23
  <%= f.label :admin_name, Spree.t(:internal_name) %>
24
24
  <%= f.text_field :admin_name, :class => 'form-control', :label => false %>
25
- <%= error_message_on :shipping_method, :admin_name %>
25
+ <%= f.error_message_on :admin_name %>
26
26
  <% end %>
27
27
  </div>
28
28
 
@@ -30,7 +30,7 @@
30
30
  <%= f.field_container :code, :class => ['form-group'] do %>
31
31
  <%= f.label :code, Spree.t(:code) %>
32
32
  <%= f.text_field :code, :class => 'form-control', :label => false %>
33
- <%= error_message_on :shipping_method, :code %>
33
+ <%= f.error_message_on :code %>
34
34
  <% end %>
35
35
  </div>
36
36
 
@@ -38,7 +38,7 @@
38
38
  <%= f.field_container :tracking_url, :class => ['form-group'] do %>
39
39
  <%= f.label :tracking_url, Spree.t(:tracking_url) %>
40
40
  <%= f.text_field :tracking_url, :class => 'form-control', :placeholder => Spree.t(:tracking_url_placeholder) %>
41
- <%= error_message_on :shipping_method, :tracking_url %>
41
+ <%= f.error_message_on :tracking_url %>
42
42
  <% end %>
43
43
  </div>
44
44
  </div>
@@ -63,7 +63,7 @@
63
63
  <% end %>
64
64
  </div>
65
65
  <% end %>
66
- <%= error_message_on :shipping_method, :shipping_category_id %>
66
+ <%= f.error_message_on :shipping_category_id %>
67
67
  <% end %>
68
68
  </div>
69
69
  </div>
@@ -88,7 +88,7 @@
88
88
  <% end %>
89
89
  </div>
90
90
  <% end %>
91
- <%= error_message_on :shipping_method, :zone_id %>
91
+ <%= f.error_message_on :zone_id %>
92
92
  <% end %>
93
93
  </div>
94
94
  </div>
@@ -111,7 +111,7 @@
111
111
  <div class="panel-body">
112
112
  <%= f.field_container :categories, :class => ['form-group'] do %>
113
113
  <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, { include_blank: true }, class: "select2" %>
114
- <%= error_message_on :shipping_method, :tax_category_id %>
114
+ <%= f.error_message_on :tax_category_id %>
115
115
  <% end %>
116
116
  </div>
117
117
  </div>
@@ -1,5 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::ShippingMethod.model_name.human) %>
2
+ <%= link_to Spree.t(:shipping_methods), spree.admin_shipping_methods_url %> /
3
+ <%= @shipping_method.name %>
3
4
  <% end %>
4
5
 
5
6
  <div data-hook="admin_shipping_method_edit_form_header">
@@ -1,4 +1,5 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:shipping_methods), spree.admin_shipping_methods_url %> /
2
3
  <%= Spree.t(:new_shipping_method) %>
3
4
  <% end %>
4
5
 
@@ -3,6 +3,7 @@
3
3
  <%= f.field_container :name, class: ['form-group'] do %>
4
4
  <%= f.label :name, Spree.t(:name) %>
5
5
  <%= f.text_field :name, :class => 'form-control' %>
6
+ <%= f.error_message_on :name %>
6
7
  <% end %>
7
8
  </div>
8
9
  <div class="col-md-6">
@@ -1,9 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::State.model_name.human) %> / <%= @state.name %>
3
- <% end %>
4
-
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::State.model_name.human, admin_country_states_path(@country)) %>
2
+ <%= link_to Spree.t(:states), spree.admin_country_states_url(@country) %> /
3
+ <%= @state.name %>
7
4
  <% end %>
8
5
 
9
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @state } %>
@@ -1,13 +1,10 @@
1
1
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @state } %>
2
2
 
3
3
  <% content_for :page_title do %>
4
+ <%= link_to Spree.t(:states), spree.admin_country_states_url(@country) %> /
4
5
  <%= Spree.t(:new_state) %>
5
6
  <% end %>
6
7
 
7
- <% content_for :page_actions do %>
8
- <%= back_to_list_button(Spree::State.model_name.human, admin_country_states_path(@country)) %>
9
- <% end %>
10
-
11
8
  <%= form_for [:admin, @country, @state] do |f| %>
12
9
  <fieldset>
13
10
  <%= render :partial => 'form', :locals => { :f => f } %>
@@ -3,8 +3,9 @@
3
3
  <div class="col-md-9" data-hook="stock_location_names">
4
4
  <div data-hook="stock_location_name">
5
5
  <%= f.field_container :name, class: ['form-group'] do %>
6
- <%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br />
7
- <%= f.text_field :name, class: 'form-control', required: true %>
6
+ <%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br />
7
+ <%= f.text_field :name, class: 'form-control', required: true %>
8
+ <%= f.error_message_on :name %>
8
9
  <% end %>
9
10
  </div>
10
11
  <div data-hook="stock_location_admin_name">
@@ -1,12 +1,8 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::StockLocation.model_name.human) %> /
2
+ <%= link_to Spree.t(:stock_locations), spree.admin_stock_locations_url %> /
3
3
  <%= @stock_location.name %>
4
4
  <% end %>
5
5
 
6
- <% content_for :page_actions do %>
7
- <%= back_to_list_button(Spree::StockLocation.model_name.human, admin_stock_locations_path) %>
8
- <% end %>
9
-
10
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @stock_location } %>
11
7
 
12
8
  <%= form_for [:admin, @stock_location] do |f| %>
@@ -1,12 +1,9 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:stock_locations), spree.admin_stock_locations_url %> /
2
3
  <%= Spree.t(:new_stock_location) %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= link_to_with_icon 'arrow-left', Spree.t(:back_to_stock_locations_list), admin_stock_locations_path, :class => 'btn btn-primary' %>
7
- <% end %>
8
-
9
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @stock_locations } %>
6
+ <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @stock_location } %>
10
7
 
11
8
  <%= form_for [:admin, @stock_location] do |f| %>
12
9
  <fieldset>
@@ -1,10 +1,10 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:stock_locations), spree.admin_stock_locations_path %> /
2
3
  <%= Spree.t(:stock_movements_for_stock_location, stock_location_name: @stock_location.name) %>
3
4
  <% end %>
4
5
 
5
6
  <% content_for :page_actions do %>
6
7
  <%= button_link_to Spree.t(:new_stock_movement), new_admin_stock_location_stock_movement_path(@stock_location), icon: 'add', class: 'btn-success', id: 'admin_new_stock_movement_link' %>
7
- <%= back_to_list_button(Spree::StockLocation.model_name.human, admin_stock_locations_path) %>
8
8
  <% end %>
9
9
 
10
10
  <% if @stock_movements.any? %>
@@ -1,11 +1,9 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:stock_locations), spree.admin_stock_locations_url %> /
3
+ <%= link_to Spree.t(:stock_movements), spree.admin_stock_location_stock_movements_path(stock_location) %> /
2
4
  <%= Spree.t(:new_stock_movement) %>
3
5
  <% end %>
4
6
 
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::StockMovement.model_name.human, admin_stock_location_stock_movements_path(stock_location)) %>
7
- <% end %>
8
-
9
7
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @stock_movement } %>
10
8
 
11
9
  <%= form_for [:admin, stock_location, @stock_movement] do |f| %>
@@ -1,4 +1,5 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:stock_transfers), spree.admin_stock_transfers_url %> /
2
3
  <%= Spree.t(:new_stock_transfer) %>
3
4
  <% end %>
4
5
 
@@ -48,7 +49,7 @@
48
49
  <%= label_tag :transfer_destination_location_id, Spree.t(:destination) %>
49
50
  <%= select_tag :transfer_destination_location_id, {}, class: 'select2' %>
50
51
  </div>
51
- </div>
52
+ </div>
52
53
  </div>
53
54
  </div>
54
55