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,5 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= plural_resource_name(Spree::StockTransfer) %> (<%= @stock_transfer.number %>)
2
+ <%= link_to Spree.t(:stock_transfers), spree.admin_stock_transfers_url %> /
3
+ <%= @stock_transfer.number %>
3
4
  <% end %>
4
5
 
5
6
  <% content_for :page_actions do %>
@@ -1,8 +1,9 @@
1
1
  <div data-hook="admin_store_credit_category_form_fields">
2
- <div data-hook="store_credit_category_name" class="form-group">
2
+ <%= f.field_container :name, class: ['form-group'], 'data-hook' => 'store_credit_category_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_store_credit_category_fields"></div>
8
9
  </div>
@@ -1,7 +1,10 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::StoreCreditCategory.model_name.human) %>
2
+ <%= link_to Spree.t(:store_credit_categories), spree.admin_store_credit_categories_url %> /
3
+ <%= @store_credit_category.name %>
3
4
  <% end %>
4
5
 
6
+ <%= render 'spree/admin/shared/error_messages', target: @store_credit_category %>
7
+
5
8
  <%= form_for [:admin, @store_credit_category] do |f| %>
6
9
  <fieldset>
7
10
  <%= render partial: 'form', locals: { f: f } %>
@@ -1,7 +1,10 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:store_credit_categories), spree.admin_store_credit_categories_url %> /
2
3
  <%= Spree.t(:new_store_credit_category) %>
3
4
  <% end %>
4
5
 
6
+ <%= render 'spree/admin/shared/error_messages', target: @store_credit_category %>
7
+
5
8
  <%= form_for [:admin, @store_credit_category] do |f| %>
6
9
  <fieldset>
7
10
  <%= render partial: 'form', locals: { f: f } %>
@@ -1,9 +1,11 @@
1
+ <%= render partial: 'spree/admin/users/sidebar', locals: { current: :store_credits } %>
2
+
1
3
  <% content_for :page_title do %>
2
- <%= link_to "#{@user.email}", spree.edit_admin_user_url(@user) %> / <%= Spree.t(:editing_resource, resource: Spree::StoreCredit.model_name.human) %>
4
+ <%= link_to @user.email, spree.edit_admin_user_url(@user) %> /
5
+ <%= link_to Spree.t(:store_credits), spree.admin_user_store_credits_path(@user) %> /
6
+ <%= Spree.t(:editing_resource, resource: Spree::StoreCredit.model_name.human) %>
3
7
  <% end %>
4
8
 
5
- <%= render partial: 'spree/admin/users/sidebar', locals: { current: :store_credits } %>
6
-
7
9
  <%= form_for @store_credit, url: spree.admin_user_store_credit_path(@user, @store_credit) do |f| %>
8
10
  <fieldset>
9
11
  <%= render partial: 'form', locals: { f: f } %>
@@ -1,11 +1,11 @@
1
+ <%= render partial: 'spree/admin/users/sidebar', locals: { current: :store_credits } %>
2
+
1
3
  <% content_for :page_title do %>
2
- <%= link_to "#{@user.email}", spree.edit_admin_user_url(@user) %> / <%= Spree.t(:"admin.user.store_credits") %>
4
+ <%= link_to @user.email, spree.edit_admin_user_url(@user) %> /
5
+ <%= Spree.t(:"admin.user.store_credits") %>
3
6
  <% end %>
4
7
 
5
- <%= render partial: 'spree/admin/users/sidebar', locals: { current: :store_credits } %>
6
-
7
8
  <% content_for :page_actions do %>
8
- <%= back_to_list_button(Spree.user_class.model_name.human, spree.admin_users_path) %>
9
9
  <%= button_link_to Spree.t(:add_store_credit), spree.new_admin_user_store_credit_path(@user), class: "btn-success", icon: 'add' %>
10
10
  <% end %>
11
11
 
@@ -1,9 +1,11 @@
1
+ <%= render partial: 'spree/admin/users/sidebar', locals: { current: :store_credits } %>
2
+
1
3
  <% content_for :page_title do %>
2
- <%= link_to "#{@user.email}", spree.edit_admin_user_url(@user) %> / <%= Spree.t(:new_store_credit) %>
4
+ <%= link_to @user.email, spree.edit_admin_user_url(@user) %> /
5
+ <%= link_to Spree.t(:store_credits), spree.admin_user_store_credits_path(@user) %> /
6
+ <%= Spree.t(:add_store_credit) %>
3
7
  <% end %>
4
8
 
5
- <%= render partial: 'spree/admin/users/sidebar', locals: { current: :store_credits } %>
6
-
7
9
  <%= form_for @store_credit, url: spree.admin_user_store_credits_path(@user, @store_credit) do |f| %>
8
10
  <fieldset>
9
11
  <%= render partial: 'form', locals: { f: f } %>
@@ -2,6 +2,7 @@
2
2
  <%= f.field_container :name, :class => ['form-group'] do %>
3
3
  <%= f.label :name, Spree.t(:name) %>
4
4
  <%= f.text_field :name, :class => 'form-control' %>
5
+ <%= f.error_message_on :name %>
5
6
  <% end %>
6
7
 
7
8
  <%= f.field_container :tax_code, :class => ['form-group'] do %>
@@ -1,9 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::TaxCategory.model_name.human) %>
3
- <% end %>
4
-
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::TaxCategory.model_name.human, admin_tax_categories_path) %>
2
+ <%= link_to Spree.t(:tax_categories), spree.admin_tax_categories_url %> /
3
+ <%= @tax_category.name %>
7
4
  <% end %>
8
5
 
9
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @tax_category } %>
@@ -1,11 +1,8 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:tax_categories), spree.admin_tax_categories_url %> /
2
3
  <%= Spree.t(:new_tax_category) %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::TaxCategory.model_name.human, admin_tax_categories_path) %>
7
- <% end %>
8
-
9
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @tax_category } %>
10
7
 
11
8
  <%= form_for [:admin, @tax_category] do |f| %>
@@ -13,8 +13,11 @@
13
13
  <%= f.text_field :name, :class => 'form-control' %>
14
14
  </div>
15
15
  <div data-hook="rate" class="form-group">
16
- <%= f.label :amount, Spree.t(:rate) %>
17
- <%= f.text_field :amount, :class => 'form-control' %>
16
+ <%= f.field_container :amount, class: ["form-group"] do %>
17
+ <%= f.label :amount, Spree.t(:rate) %>
18
+ <%= f.text_field :amount, :class => 'form-control' %>
19
+ <%= f.error_message_on :amount %>
20
+ <% end %>
18
21
  <p class="help-block">
19
22
  <%= Spree.t(:tax_rate_amount_explanation) %>
20
23
  </p>
@@ -1,9 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::TaxRate.model_name.human) %>
3
- <% end %>
4
-
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::TaxRate.model_name.human, admin_tax_rates_path) %>
2
+ <%= link_to Spree.t(:tax_rates), spree.admin_tax_rates_url %> /
3
+ <%= @tax_rate.name %>
7
4
  <% end %>
8
5
 
9
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @tax_rate } %>
@@ -1,11 +1,8 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:tax_rates), spree.admin_tax_rates_url %> /
2
3
  <%= Spree.t(:new_tax_rate) %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::TaxRate.model_name.human, admin_tax_rates_path) %>
7
- <% end %>
8
-
9
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @tax_rate } %>
10
7
 
11
8
  <%= form_for [:admin, @tax_rate] do |f| %>
@@ -1,7 +1,7 @@
1
1
  <div data-hook="admin_inside_taxonomy_form" class="form-group">
2
2
  <%= f.field_container :name, class: ['form-group'] do %>
3
3
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
4
- <%= error_message_on :taxonomy, :name, :class => 'error-message' %>
5
- <%= text_field :taxonomy, :name, :class => 'form-control' %>
4
+ <%= f.text_field :name, :class => 'form-control' %>
5
+ <%= f.error_message_on :name, :class => 'error-message' %>
6
6
  <% end %>
7
7
  </div>
@@ -1,11 +1,8 @@
1
1
  <%= render partial: 'js_head' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
- <%= Spree.t(:taxonomy_edit) %>
5
- <% end %>
6
-
7
- <% content_for :page_actions do %>
8
- <%= back_to_list_button(Spree::Taxonomy.model_name.human, admin_taxonomies_path) %>
4
+ <%= link_to Spree.t(:taxonomies), spree.admin_taxonomies_url %> /
5
+ <%= @taxonomy.name %>
9
6
  <% end %>
10
7
 
11
8
  <div id="ajax_error" class="errorExplanation" style="display:none;"></div>
@@ -1,10 +1,8 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:taxonomies), spree.admin_taxonomies_url %> /
2
3
  <%= Spree.t(:new_taxonomy) %>
3
4
  <% end %>
4
-
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree::Taxonomy.model_name.human, admin_taxonomies_path) %>
7
- <% end %>
5
+ <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @taxonomy } %>
8
6
 
9
7
  <%= form_for [:admin, @taxonomy] do |f| %>
10
8
  <fieldset>
@@ -4,7 +4,7 @@
4
4
  <%= f.field_container :name, class: ['form-group'] do %>
5
5
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
6
6
  <%= text_field :taxon, :name, :class => 'form-control' %>
7
- <%= error_message_on :taxon, :name, :class => 'error-message' %>
7
+ <%= f.error_message_on :name, :class => 'error-message' %>
8
8
  <% end %>
9
9
 
10
10
  <%= f.field_container :permalink_part, class: ['form-group'] do %>
@@ -1,5 +1,7 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:taxon_edit) %>
2
+ <%= link_to Spree.t(:taxonomies), spree.admin_taxonomies_url %> /
3
+ <%= link_to @taxonomy.name, spree.edit_admin_taxonomy_url(@taxonomy) %> /
4
+ <%= @taxon.name %>
3
5
  <% end %>
4
6
 
5
7
  <%# Because otherwise the form would attempt to use to_param of @taxon %>
@@ -1,9 +1,10 @@
1
1
  <div data-hook="admin_tracker_form_fields" class="row">
2
- <div class="col-md-4">
3
- <div data-hook="analytics_id" class="form-group">
4
- <%= label_tag nil, Spree.t(:google_analytics_id) %>
5
- <%= text_field :tracker, :analytics_id, :class => 'form-control' %>
6
- </div>
2
+ <div class="col-md-4" data-hook="analytics_id">
3
+ <%= f.field_container :analytics_id, class: ["form-group"], "data-hook" => "analytics_id" do %>
4
+ <%= f.label :analytics_id, Spree.t(:google_analytics_id) %>
5
+ <%= f.text_field :analytics_id, :class => 'form-control' %>
6
+ <%= f.error_message_on :analytics_id %>
7
+ <% end %>
7
8
  </div>
8
9
  <div class="col-md-4">
9
10
  <div data-hook="active" class="form-group">
@@ -18,11 +19,11 @@
18
19
  <%= label_tag :tracker_active_false do %>
19
20
  <%= radio_button(:tracker, :active, false) %>
20
21
  <%= Spree.t(:say_no) %>
21
- <% end %>
22
+ <% end %>
22
23
  </div>
23
24
  </div>
24
25
  </div>
25
-
26
+
26
27
  <div data-hook="additional_tracker_fields"></div>
27
28
 
28
29
  </div>
@@ -1,10 +1,13 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::Tracker.model_name.human) %>
2
+ <%= link_to Spree.t(:analytics_trackers), spree.admin_trackers_url %> /
3
+ <%= @tracker.analytics_id %>
3
4
  <% end %>
4
5
 
5
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @tracker } %>
6
7
 
7
8
  <%= form_for [:admin, @tracker] do |f| %>
8
- <%= render :partial => 'form', :locals => { :f => f } %>
9
- <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
9
+ <fieldset>
10
+ <%= render :partial => 'form', :locals => { :f => f } %>
11
+ <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
12
+ </fieldset>
10
13
  <% end %>
@@ -1,4 +1,5 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:analytics_trackers), spree.admin_trackers_url %> /
2
3
  <%= Spree.t(:new_tracker) %>
3
4
  <% end %>
4
5
 
@@ -3,7 +3,7 @@
3
3
  <%= f.field_container :email, class: ['form-group'] do %>
4
4
  <%= f.label :email, Spree.t(:email) %>
5
5
  <%= f.email_field :email, :class => 'form-control' %>
6
- <%= error_message_on :user, :email %>
6
+ <%= f.error_message_on :email %>
7
7
  <% end %>
8
8
 
9
9
  <div data-hook="admin_user_form_roles" class="form-group">
@@ -1,3 +1,7 @@
1
+ <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:users), spree.admin_users_path %> /
3
+ <% end %>
4
+
1
5
  <% content_for :sidebar do %>
2
6
  <ul class="nav nav-pills nav-stacked" data-hook="admin_user_tab_options">
3
7
  <li<%== ' class="active"' if current == :account %>>
@@ -1,4 +1,3 @@
1
1
  <% content_for :page_actions do %>
2
- <%= back_to_list_button(Spree.user_class.model_name.human, spree.admin_users_path) %>
3
2
  <%= button_link_to Spree.t(:create_new_order), spree.new_admin_order_path(user_id: @user.id), class: "btn-success", icon: 'add' %>
4
3
  <% end %>
@@ -1,10 +1,11 @@
1
- <% content_for :page_title do %>
2
- <%= link_to "#{@user.email}", edit_admin_user_url(@user) %> / <%= Spree.t(:editing_resource, resource: plural_resource_name(Spree::Address)) %>
3
- <% end %>
4
-
5
1
  <%= render partial: 'spree/admin/users/sidebar', locals: { current: :address } %>
6
2
  <%= render partial: 'spree/admin/users/user_page_actions' %>
7
3
 
4
+ <% content_for :page_title do %>
5
+ <%= link_to @user.email, spree.edit_admin_user_url(@user) %> /
6
+ <%= Spree.t(:addresses) %>
7
+ <% end %>
8
+
8
9
  <div data-hook="admin_user_addresses" id="admin_user_edit_addresses">
9
10
  <div data-hook="admin_user_edit_form_header">
10
11
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @user } %>
@@ -1,10 +1,10 @@
1
- <% content_for :page_title do %>
2
- <%= Spree.t(:editing_user) %> <%= @user.email %>
3
- <% end %>
4
-
5
1
  <%= render partial: 'spree/admin/users/sidebar', locals: { current: :account } %>
6
2
  <%= render partial: 'spree/admin/users/user_page_actions' %>
7
3
 
4
+ <% content_for :page_title do %>
5
+ <%= @user.email %>
6
+ <% end %>
7
+
8
8
  <div data-hook="admin_user_edit_general_settings" class="panel panel-default">
9
9
  <div class="panel-heading">
10
10
  <h1 class="panel-title">
@@ -1,10 +1,11 @@
1
- <% content_for :page_title do %>
2
- <%= link_to "#{@user.email}", edit_admin_user_url(@user) %> / <%= Spree.t(:"admin.user.items_purchased") %>
3
- <% end %>
4
-
5
1
  <%= render partial: 'spree/admin/users/sidebar', locals: { current: :items } %>
6
2
  <%= render partial: 'spree/admin/users/user_page_actions' %>
7
3
 
4
+ <% content_for :page_title do %>
5
+ <%= link_to @user.email, spree.edit_admin_user_url(@user) %> /
6
+ <%= Spree.t(:"admin.user.items_purchased") %>
7
+ <% end %>
8
+
8
9
  <fieldset data-hook="admin_user_items_purchased">
9
10
  <%= paginate @orders %>
10
11
 
@@ -1,11 +1,8 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:users), spree.admin_users_url %> /
2
3
  <%= Spree.t(:new_user) %>
3
4
  <% end %>
4
5
 
5
- <% content_for :page_actions do %>
6
- <%= back_to_list_button(Spree.user_class.model_name.human, admin_users_path) %>
7
- <% end %>
8
-
9
6
  <div data-hook="admin_user_new_form_header">
10
7
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @user } %>
11
8
  </div>
@@ -1,10 +1,11 @@
1
- <% content_for :page_title do %>
2
- <%= link_to "#{@user.email}", edit_admin_user_url(@user) %> / <%= Spree.t(:"admin.user.order_history") %>
3
- <% end %>
4
-
5
1
  <%= render partial: 'spree/admin/users/sidebar', locals: { current: :orders } %>
6
2
  <%= render partial: 'spree/admin/users/user_page_actions' %>
7
3
 
4
+ <% content_for :page_title do %>
5
+ <%= link_to @user.email, spree.edit_admin_user_url(@user) %> /
6
+ <%= Spree.t(:"admin.user.order_history") %>
7
+ <% end %>
8
+
8
9
  <fieldset data-hook="admin_user_order_history">
9
10
  <%= paginate @orders %>
10
11
 
@@ -9,6 +9,7 @@
9
9
  <%= zone_form.field_container :name, class: ['form-group'] do %>
10
10
  <%= zone_form.label :name, Spree.t(:name) %>
11
11
  <%= zone_form.text_field :name, :class => 'form-control' %>
12
+ <%= zone_form.error_message_on :name %>
12
13
  <% end %>
13
14
 
14
15
  <%= zone_form.field_container :description, class: ['form-group'] do %>
@@ -1,5 +1,6 @@
1
1
  <% content_for :page_title do %>
2
- <%= Spree.t(:editing_resource, resource: Spree::Zone.model_name.human) %>
2
+ <%= link_to Spree.t(:zones), spree.admin_zones_url %> /
3
+ <%= @zone.name %>
3
4
  <% end %>
4
5
 
5
6
  <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @zone } %>
@@ -1,4 +1,5 @@
1
1
  <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:zones), spree.admin_zones_url %> /
2
3
  <%= Spree.t(:new_zone) %>
3
4
  <% end %>
4
5
 
@@ -79,17 +79,6 @@ describe Spree::Admin::WidgetsController, :type => :controller do
79
79
  expect { subject }.to change { Widget.count }.by(1)
80
80
  end
81
81
 
82
- context 'failure' do
83
- let(:params) do
84
- {widget: {name: ''}} # blank name generates an error
85
- end
86
-
87
- it 'sets a flash error' do
88
- subject
89
- expect(flash[:error]).to eq assigns(:widget).errors.full_messages.join(', ')
90
- end
91
- end
92
-
93
82
  context 'without any parameters' do
94
83
  let(:params) { {} }
95
84
 
@@ -118,20 +107,6 @@ describe Spree::Admin::WidgetsController, :type => :controller do
118
107
  it 'updates the resource' do
119
108
  expect { subject }.to change { widget.reload.name }.from('a widget').to('widget renamed')
120
109
  end
121
-
122
- context 'failure' do
123
- let(:params) do
124
- {
125
- id: widget.to_param,
126
- widget: {name: ''}, # a blank name will trigger a validation error
127
- }
128
- end
129
-
130
- it 'sets a flash error' do
131
- subject
132
- expect(flash[:error]).to eq assigns(:widget).errors.full_messages.join(', ')
133
- end
134
- end
135
110
  end
136
111
 
137
112
  describe '#destroy' do
@@ -273,4 +248,3 @@ describe Spree::Admin::Submodule::PostsController, type: :controller do
273
248
  end
274
249
  end
275
250
  end
276
-