spree_backend 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +4 -4
  3. data/app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee +4 -4
  4. data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +6 -4
  5. data/app/assets/javascripts/spree/backend/taxons.js.coffee +12 -6
  6. data/app/assets/stylesheets/spree/backend/components/_main.scss +2 -1
  7. data/app/controllers/spree/admin/customer_returns_controller.rb +1 -1
  8. data/app/controllers/spree/admin/orders_controller.rb +1 -1
  9. data/app/controllers/spree/admin/products_controller.rb +6 -3
  10. data/app/controllers/spree/admin/search_controller.rb +3 -1
  11. data/app/controllers/spree/admin/taxonomies_controller.rb +0 -6
  12. data/app/helpers/spree/admin/base_helper.rb +2 -2
  13. data/app/views/spree/admin/adjustments/edit.html.erb +1 -1
  14. data/app/views/spree/admin/adjustments/index.html.erb +3 -3
  15. data/app/views/spree/admin/adjustments/new.html.erb +5 -5
  16. data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
  17. data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
  18. data/app/views/spree/admin/customer_returns/new.html.erb +4 -16
  19. data/app/views/spree/admin/images/edit.html.erb +5 -5
  20. data/app/views/spree/admin/images/index.html.erb +1 -1
  21. data/app/views/spree/admin/log_entries/index.html.erb +2 -2
  22. data/app/views/spree/admin/option_types/edit.html.erb +2 -2
  23. data/app/views/spree/admin/orders/_add_line_item.html.erb +1 -1
  24. data/app/views/spree/admin/orders/_add_product.html.erb +1 -1
  25. data/app/views/spree/admin/orders/cart.html.erb +5 -5
  26. data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
  27. data/app/views/spree/admin/orders/customer_details/edit.html.erb +1 -1
  28. data/app/views/spree/admin/orders/edit.html.erb +1 -1
  29. data/app/views/spree/admin/payments/credit.html.erb +1 -1
  30. data/app/views/spree/admin/payments/index.html.erb +1 -1
  31. data/app/views/spree/admin/payments/new.html.erb +4 -4
  32. data/app/views/spree/admin/payments/show.html.erb +6 -6
  33. data/app/views/spree/admin/product_properties/index.html.erb +6 -6
  34. data/app/views/spree/admin/products/_add_stock_form.html.erb +0 -2
  35. data/app/views/spree/admin/products/_form.html.erb +30 -21
  36. data/app/views/spree/admin/products/edit.html.erb +6 -6
  37. data/app/views/spree/admin/products/stock.html.erb +2 -2
  38. data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +1 -1
  39. data/app/views/spree/admin/refunds/edit.html.erb +2 -2
  40. data/app/views/spree/admin/refunds/new.html.erb +2 -2
  41. data/app/views/spree/admin/reimbursements/edit.html.erb +3 -3
  42. data/app/views/spree/admin/reimbursements/index.html.erb +2 -2
  43. data/app/views/spree/admin/reimbursements/show.html.erb +2 -2
  44. data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
  45. data/app/views/spree/admin/return_authorizations/edit.html.erb +5 -5
  46. data/app/views/spree/admin/return_authorizations/index.html.erb +4 -4
  47. data/app/views/spree/admin/return_authorizations/new.html.erb +4 -4
  48. data/app/views/spree/admin/shared/_order_tabs.html.erb +9 -9
  49. data/app/views/spree/admin/shared/_product_tabs.html.erb +5 -5
  50. data/app/views/spree/admin/shared/_table_filter.html.erb +1 -1
  51. data/app/views/spree/admin/shared/_translations.html.erb +2 -1
  52. data/app/views/spree/admin/shipping_methods/_form.html.erb +17 -13
  53. data/app/views/spree/admin/state_changes/index.html.erb +1 -1
  54. data/app/views/spree/admin/taxonomies/edit.erb +8 -4
  55. data/app/views/spree/admin/taxons/edit.html.erb +2 -2
  56. data/app/views/spree/admin/users/addresses.html.erb +5 -5
  57. data/app/views/spree/admin/users/edit.html.erb +14 -14
  58. data/app/views/spree/admin/users/items.html.erb +7 -7
  59. data/app/views/spree/admin/users/orders.html.erb +6 -6
  60. data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -7
  61. data/app/views/spree/admin/variants/edit.html.erb +4 -4
  62. data/app/views/spree/admin/variants/index.html.erb +5 -5
  63. data/config/routes.rb +1 -4
  64. data/lib/spree/backend/engine.rb +1 -1
  65. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +216 -0
  66. data/vendor/assets/{javascripts/jquery.jstree/themes/apple → stylesheets/jquery.jstree/themes/spree}/throbber.gif +0 -0
  67. metadata +8 -13
  68. data/app/assets/javascripts/spree/backend/select_payments.js.coffee +0 -7
  69. data/app/views/spree/admin/shared/_report_criteria.html.erb +0 -17
  70. data/vendor/assets/javascripts/jquery.jstree/themes/apple/bg.jpg +0 -0
  71. data/vendor/assets/javascripts/jquery.jstree/themes/apple/d.png +0 -0
  72. data/vendor/assets/javascripts/jquery.jstree/themes/apple/dot_for_ie.gif +0 -0
  73. data/vendor/assets/javascripts/jquery.jstree/themes/apple/style.scss +0 -61
@@ -5,19 +5,19 @@
5
5
 
6
6
  <% content_for :sidebar do %>
7
7
  <ul class="nav nav-pills nav-stacked" data-hook="admin_product_tabs">
8
- <%= content_tag :li, :class => ('active' if current == 'Product Details') do %>
8
+ <%= content_tag :li, class: ('active' if current == :details) do %>
9
9
  <%= link_to_with_icon 'edit', Spree.t(:details), edit_admin_product_url(@product) %>
10
10
  <% end if can?(:admin, Spree::Product) %>
11
- <%= content_tag :li, :class => ('active' if current == 'Images') do %>
11
+ <%= content_tag :li, class: ('active' if current == :images) do %>
12
12
  <%= link_to_with_icon 'picture', Spree.t(:images), spree.admin_product_images_url(@product) %>
13
13
  <% end if can?(:admin, Spree::Image) %>
14
- <%= content_tag :li, :class => ('active' if current == 'Variants') do %>
14
+ <%= content_tag :li, class: ('active' if current == :variants) do %>
15
15
  <%= link_to_with_icon 'th-large', Spree.t(:variants), spree.admin_product_variants_url(@product) %>
16
16
  <% end if can?(:admin, Spree::Variant) %>
17
- <%= content_tag :li, :class => ('active' if current == 'Product Properties') do %>
17
+ <%= content_tag :li, class: ('active' if current == :properties) do %>
18
18
  <%= link_to_with_icon 'list-alt', Spree.t(:properties), spree.admin_product_product_properties_url(@product) %>
19
19
  <% end if can?(:admin, Spree::ProductProperty) %>
20
- <%= content_tag :li, :class => ('active' if current == 'Stock Management') do %>
20
+ <%= content_tag :li, class: ('active' if current == :stock) do %>
21
21
  <%= link_to_with_icon 'home', Spree.t(:stock), stock_admin_product_url(@product) %>
22
22
  <% end if can?(:stock, Spree::Product) %>
23
23
  </ul>
@@ -8,7 +8,7 @@
8
8
  <%= Spree.t(:filter) %>
9
9
  </button>
10
10
  </span>
11
- <%= form_tag nil, id: "quick-search" do %>
11
+ <%= form_tag request.fullpath, id: "quick-search" do %>
12
12
  <%= text_field_tag :quick_search, nil, class: "form-control js-quick-search", placeholder: Spree.t(:quick_search) %>
13
13
  <% end %>
14
14
  </div>
@@ -20,7 +20,8 @@
20
20
  :find_a_taxon => Spree.t(:find_a_taxon),
21
21
  :item_stock_placeholder => Spree.t(:choose_location),
22
22
  :loading => Spree.t(:loading),
23
- :month_names => I18n.t(:month_names, :scope => :date).reject(&:blank?),
23
+ :month_names => I18n.t(:month_names, :scope => :date).instance_eval {|o|
24
+ o.try(:reject, &:blank?) || o},
24
25
  :more => Spree.t(:more),
25
26
  :name => Spree.t(:name),
26
27
  :next => Spree.t(:next),
@@ -11,7 +11,7 @@
11
11
  <div data-hook="admin_shipping_method_form_display_field" class="col-md-6">
12
12
  <%= f.field_container :display_on, :class => ['form-group'] do %>
13
13
  <%= f.label :display_on, Spree.t(:display) %>
14
- <%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2'}) %>
14
+ <%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, { :class => 'select2' }) %>
15
15
  <%= error_message_on :shipping_method, :display_on %>
16
16
  <% end %>
17
17
  </div>
@@ -21,7 +21,7 @@
21
21
  <div data-hook="admin_shipping_method_form_internal_name_field" class="col-md-4">
22
22
  <%= f.field_container :admin_name, :class => ['form-group'] do %>
23
23
  <%= f.label :admin_name, Spree.t(:internal_name) %>
24
- <%= f.text_field :admin_name, :class => 'form-control', :label => false %>
24
+ <%= f.text_field :admin_name, :class => 'form-control', :label => false %>
25
25
  <%= error_message_on :shipping_method, :admin_name %>
26
26
  <% end %>
27
27
  </div>
@@ -29,7 +29,7 @@
29
29
  <div data-hook="admin_shipping_method_form_code" class="col-md-4">
30
30
  <%= f.field_container :code, :class => ['form-group'] do %>
31
31
  <%= f.label :code, Spree.t(:code) %>
32
- <%= f.text_field :code, :class => 'form-control', :label => false %>
32
+ <%= f.text_field :code, :class => 'form-control', :label => false %>
33
33
  <%= error_message_on :shipping_method, :code %>
34
34
  <% end %>
35
35
  </div>
@@ -56,10 +56,12 @@
56
56
  <div class="panel-body">
57
57
  <%= f.field_container :categories, :class => ['form-group'] do %>
58
58
  <% Spree::ShippingCategory.all.each do |category| %>
59
- <%= label_tag do %>
60
- <%= check_box_tag('shipping_method[shipping_categories][]', category.id, @shipping_method.shipping_categories.include?(category)) %>
61
- <%= category.name %>
62
- <% end %>
59
+ <div class="checkbox">
60
+ <%= label_tag do %>
61
+ <%= check_box_tag('shipping_method[shipping_categories][]', category.id, @shipping_method.shipping_categories.include?(category)) %>
62
+ <%= category.name %>
63
+ <% end %>
64
+ </div>
63
65
  <% end %>
64
66
  <%= error_message_on :shipping_method, :shipping_category_id %>
65
67
  <% end %>
@@ -79,13 +81,15 @@
79
81
  <%= f.field_container :zones, :class => ['form-group'] do %>
80
82
  <% shipping_method_zones = @shipping_method.zones.to_a %>
81
83
  <% Spree::Zone.all.each do |zone| %>
82
- <%= label_tag do %>
83
- <%= check_box_tag('shipping_method[zones][]', zone.id, shipping_method_zones.include?(zone)) %>
84
- <%= zone.name %>
85
- <% end %>
84
+ <div class="checkbox">
85
+ <%= label_tag do %>
86
+ <%= check_box_tag('shipping_method[zones][]', zone.id, shipping_method_zones.include?(zone)) %>
87
+ <%= zone.name %>
88
+ <% end %>
89
+ </div>
86
90
  <% end %>
87
91
  <%= error_message_on :shipping_method, :zone_id %>
88
- <% end %>
92
+ <% end %>
89
93
  </div>
90
94
  </div>
91
95
  </div>
@@ -106,7 +110,7 @@
106
110
 
107
111
  <div class="panel-body">
108
112
  <%= f.field_container :categories, :class => ['form-group'] do %>
109
- <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "select2" %>
113
+ <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, { include_blank: true }, class: "select2" %>
110
114
  <%= error_message_on :shipping_method, :tax_category_id %>
111
115
  <% end %>
112
116
  </div>
@@ -1,4 +1,4 @@
1
- <%= render partial: 'spree/admin/shared/order_tabs', locals: { current: 'State Changes' } %>
1
+ <%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :state_changes } %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= plural_resource_name(Spree::StateChange) %>
@@ -14,9 +14,13 @@
14
14
  <script>
15
15
  Spree.routes.taxonomy_taxons_path = "<%= spree.api_taxonomy_taxons_path(@taxonomy) %>";
16
16
  Spree.routes.admin_taxonomy_taxons_path = "<%= spree.admin_taxonomy_taxons_path(@taxonomy) %>";
17
- Spree.routes.jstree_theme_path = "<%= stylesheet_path("jquery.jstree/themes/apple/style.css") %>";
17
+ Spree.routes.jstree_theme_path = "<%= stylesheet_path("jquery.jstree/themes/spree/style.css") %>";
18
18
  </script>
19
- <div id="taxonomy_tree" class="tree"></div>
19
+ <div id="taxonomy_tree" class="tree">
20
+ <div class="alert alert-warning">
21
+ <%= Spree.t(:loading_tree) %>
22
+ </div>
23
+ </div>
20
24
  </div>
21
25
 
22
26
  <div class="alert alert-info">
@@ -24,9 +28,9 @@
24
28
  </div>
25
29
 
26
30
  <div class="form-actions">
27
- <%= button_link_to Spree.t('actions.cancel'), admin_taxonomies_path, icon: 'delete' %>
28
- <span class="or"><%= Spree.t(:or) %></span>
29
31
  <%= button Spree.t('actions.update'), 'ok', 'submit', { class: 'btn-success' } %>
32
+ <span class="or"><%= Spree.t(:or) %></span>
33
+ <%= button_link_to Spree.t('actions.cancel'), admin_taxonomies_path, icon: 'delete' %>
30
34
  </div>
31
35
  </fieldset>
32
36
  <% end %>
@@ -8,9 +8,9 @@
8
8
  <%= render 'form', f: f %>
9
9
 
10
10
  <div class="form-actions" data-hook="buttons">
11
- <%= button_link_to Spree.t('actions.cancel'), edit_admin_taxonomy_url(@taxonomy), icon: "remove" %>
12
- <%= Spree.t(:or) %>
13
11
  <%= button Spree.t('actions.update'), 'save' %>
12
+ <%= Spree.t(:or) %>
13
+ <%= button_link_to Spree.t('actions.cancel'), edit_admin_taxonomy_url(@taxonomy), icon: "remove" %>
14
14
  </div>
15
15
  <% end %>
16
16
 
@@ -2,21 +2,21 @@
2
2
  <%= link_to "#{@user.email}", edit_admin_user_url(@user) %> / <%= Spree.t(:editing_resource, resource: plural_resource_name(Spree::Address)) %>
3
3
  <% end %>
4
4
 
5
- <%= render :partial => 'spree/admin/users/sidebar', :locals => { :current => :address } %>
6
- <%= render :partial => 'spree/admin/users/user_page_actions' %>
5
+ <%= render partial: 'spree/admin/users/sidebar', locals: { current: :address } %>
6
+ <%= render partial: 'spree/admin/users/user_page_actions' %>
7
7
 
8
8
  <div data-hook="admin_user_addresses" id="admin_user_edit_addresses">
9
9
  <div data-hook="admin_user_edit_form_header">
10
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @user } %>
10
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @user } %>
11
11
  </div>
12
12
 
13
13
  <div data-hook="admin_user_address_edit_form">
14
14
  <%= form_for [:admin, @user], as: :user, url: addresses_admin_user_url(@user), method: :put do |f| %>
15
15
 
16
- <%= render :partial => 'addresses_form', :locals => { :f => f } %>
16
+ <%= render partial: 'addresses_form', locals: { f: f } %>
17
17
 
18
18
  <div class="form-actions text-center well" data-hook="admin_user_edit_form_button">
19
- <%= render :partial => 'spree/admin/shared/edit_resource_links', :locals => { :collection_url => spree.admin_users_url } %>
19
+ <%= render partial: 'spree/admin/shared/edit_resource_links', locals: { collection_url: spree.admin_users_url } %>
20
20
  </div>
21
21
  <% end %>
22
22
  </div>
@@ -2,8 +2,8 @@
2
2
  <%= Spree.t(:editing_user) %> <%= @user.email %>
3
3
  <% end %>
4
4
 
5
- <%= render :partial => 'spree/admin/users/sidebar', :locals => { :current => :account } %>
6
- <%= render :partial => 'spree/admin/users/user_page_actions' %>
5
+ <%= render partial: 'spree/admin/users/sidebar', locals: { current: :account } %>
6
+ <%= render partial: 'spree/admin/users/user_page_actions' %>
7
7
 
8
8
  <div data-hook="admin_user_edit_general_settings" class="panel panel-default">
9
9
  <div class="panel-heading">
@@ -14,15 +14,15 @@
14
14
 
15
15
  <div class="panel-body">
16
16
  <div data-hook="admin_user_edit_form_header">
17
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @user } %>
17
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @user } %>
18
18
  </div>
19
19
 
20
20
  <div data-hook="admin_user_edit_form">
21
21
  <%= form_for [:admin, @user], as: :user, url: spree.admin_user_url(@user), method: :put do |f| %>
22
- <%= render :partial => 'form', :locals => { :f => f } %>
22
+ <%= render partial: 'form', locals: { f: f } %>
23
23
 
24
24
  <div data-hook="admin_user_edit_form_button">
25
- <%= render :partial => 'spree/admin/shared/edit_resource_links', :locals => { :collection_url => spree.admin_users_url } %>
25
+ <%= render partial: 'spree/admin/shared/edit_resource_links', locals: { collection_url: spree.admin_users_url } %>
26
26
  </div>
27
27
  <% end %>
28
28
  </div>
@@ -32,7 +32,7 @@
32
32
  <div data-hook="admin_user_api_key" id="admin_user_edit_api_key" class="panel panel-default">
33
33
  <div class="panel-heading">
34
34
  <h1 class="panel-title">
35
- <%= Spree.t('access', :scope => 'api') %>
35
+ <%= Spree.t('access', scope: 'api') %>
36
36
  </h1>
37
37
  </div>
38
38
 
@@ -40,29 +40,29 @@
40
40
  <% if @user.spree_api_key.present? %>
41
41
  <div class="form-group">
42
42
  <div id="current-api-key">
43
- <label><%= Spree.t('key', :scope => 'api') %>: </label>
43
+ <label><%= Spree.t('key', scope: 'api') %>: </label>
44
44
  <strong><%= @user.spree_api_key %></strong>
45
45
  </div>
46
46
  </div>
47
47
  <div class="form-actions">
48
- <%= form_tag spree.clear_api_key_admin_user_path(@user), :method => :put do %>
49
- <%= button Spree.t('clear_key', :scope => 'api'), 'delete', 'submit', class: "btn-danger" %>
48
+ <%= form_tag spree.clear_api_key_admin_user_path(@user), method: :put do %>
49
+ <%= button Spree.t('clear_key', scope: 'api'), 'delete', 'submit', class: "btn-danger" %>
50
50
  <% end %>
51
51
 
52
52
  <span class="or"><%= Spree.t(:or)%></span>
53
53
 
54
- <%= form_tag spree.generate_api_key_admin_user_path(@user), :method => :put do %>
55
- <%= button Spree.t('regenerate_key', :scope => 'api'), 'save' %>
54
+ <%= form_tag spree.generate_api_key_admin_user_path(@user), method: :put do %>
55
+ <%= button Spree.t('regenerate_key', scope: 'api'), 'save' %>
56
56
  <% end %>
57
57
  </div>
58
58
 
59
59
  <% else %>
60
60
 
61
- <div class="alert alert-warning"><%= Spree.t('no_key', :scope => 'api') %></div>
61
+ <div class="alert alert-warning"><%= Spree.t('no_key', scope: 'api') %></div>
62
62
 
63
63
  <div class="form-actions">
64
- <%= form_tag spree.generate_api_key_admin_user_path(@user), :method => :put do %>
65
- <%= button Spree.t('generate_key', :scope => 'api'), 'key' %>
64
+ <%= form_tag spree.generate_api_key_admin_user_path(@user), method: :put do %>
65
+ <%= button Spree.t('generate_key', scope: 'api'), 'key' %>
66
66
  <% end %>
67
67
  </div>
68
68
  <% end %>
@@ -2,8 +2,8 @@
2
2
  <%= link_to "#{@user.email}", edit_admin_user_url(@user) %> / <%= Spree.t(:"admin.user.items_purchased") %>
3
3
  <% end %>
4
4
 
5
- <%= render :partial => 'spree/admin/users/sidebar', :locals => { :current => :items } %>
6
- <%= render :partial => 'spree/admin/users/user_page_actions' %>
5
+ <%= render partial: 'spree/admin/users/sidebar', locals: { current: :items } %>
6
+ <%= render partial: 'spree/admin/users/user_page_actions' %>
7
7
 
8
8
  <fieldset data-hook="admin_user_items_purchased">
9
9
  <%= paginate @orders %>
@@ -12,13 +12,13 @@
12
12
  <%# TODO add search interface %>
13
13
  <table class="table table-condensed table-bordered stock-contents" id="listing_items" data-hook="stock-contents">
14
14
  <thead>
15
- <th><%= sort_link @search, :completed_at, I18n.t(:completed_at, :scope => 'activerecord.attributes.spree/order'), {}, {:title => 'orders_completed_at_title'} %></th>
15
+ <th><%= sort_link @search, :completed_at, I18n.t(:completed_at, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_completed_at_title'} %></th>
16
16
  <th colspan=2><%= Spree.t(:description) %></th>
17
- <th><%= I18n.t(:price, :scope => 'activerecord.attributes.spree/line_item') %></th>
18
- <th><%= I18n.t(:quantity, :scope => 'activerecord.attributes.spree/line_item') %></th>
17
+ <th><%= I18n.t(:price, scope: 'activerecord.attributes.spree/line_item') %></th>
18
+ <th><%= I18n.t(:quantity, scope: 'activerecord.attributes.spree/line_item') %></th>
19
19
  <th><%= Spree.t(:total) %></th>
20
- <th><%= sort_link @search, :state, I18n.t(:state, :scope => 'activerecord.attributes.spree/order'), {}, {:title => 'orders_state_title'} %></th>
21
- <th><%= sort_link @search, :number, Spree.t(:order_num, :scope => 'admin.user'), {}, {:title => 'orders_number_title'} %></th>
20
+ <th><%= sort_link @search, :state, I18n.t(:state, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_state_title'} %></th>
21
+ <th><%= sort_link @search, :number, Spree.t(:order_num, scope: 'admin.user'), {}, {title: 'orders_number_title'} %></th>
22
22
  </thead>
23
23
  <tbody>
24
24
  <% @orders.each do |order| %>
@@ -2,8 +2,8 @@
2
2
  <%= link_to "#{@user.email}", edit_admin_user_url(@user) %> / <%= Spree.t(:"admin.user.order_history") %>
3
3
  <% end %>
4
4
 
5
- <%= render :partial => 'spree/admin/users/sidebar', :locals => { :current => :orders } %>
6
- <%= render :partial => 'spree/admin/users/user_page_actions' %>
5
+ <%= render partial: 'spree/admin/users/sidebar', locals: { current: :orders } %>
6
+ <%= render partial: 'spree/admin/users/user_page_actions' %>
7
7
 
8
8
  <fieldset data-hook="admin_user_order_history">
9
9
  <%= paginate @orders %>
@@ -13,10 +13,10 @@
13
13
  <table class="table table-condensed table-bordered" id="listing_orders" data-hook>
14
14
  <thead>
15
15
  <tr data-hook="admin_orders_index_headers">
16
- <th><%= sort_link @search, :completed_at, I18n.t(:completed_at, :scope => 'activerecord.attributes.spree/order'), {}, {:title => 'orders_completed_at_title'} %></th>
17
- <th><%= sort_link @search, :number, I18n.t(:number, :scope => 'activerecord.attributes.spree/order'), {}, {:title => 'orders_number_title'} %></th>
18
- <th><%= sort_link @search, :state, I18n.t(:state, :scope => 'activerecord.attributes.spree/order'), {}, {:title => 'orders_state_title'} %></th>
19
- <th><%= sort_link @search, :total, I18n.t(:total, :scope => 'activerecord.attributes.spree/order'), {}, {:title => 'orders_total_title'} %></th>
16
+ <th><%= sort_link @search, :completed_at, I18n.t(:completed_at, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_completed_at_title'} %></th>
17
+ <th><%= sort_link @search, :number, I18n.t(:number, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_number_title'} %></th>
18
+ <th><%= sort_link @search, :state, I18n.t(:state, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_state_title'} %></th>
19
+ <th><%= sort_link @search, :total, I18n.t(:total, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_total_title'} %></th>
20
20
  </tr>
21
21
  </thead>
22
22
  <tbody>
@@ -1,13 +1,11 @@
1
1
  <script type='text/template' id='variant_autocomplete_template'>
2
2
  <div class='variant-autocomplete-item media'>
3
3
  <figure class='variant-image media-left'>
4
- <span class="thumbnail no-marginb">
5
- {{#if variant.image }}
6
- <img src='{{variant.image}}' />
7
- {{ else }}
8
- <img src='<%= image_path("noimage/mini.png") %>' />
9
- {{/if}}
10
- </span>
4
+ {{#if variant.image }}
5
+ <img src='{{variant.image}}' class="thumbnail no-marginb" />
6
+ {{ else }}
7
+ <img src='<%= image_path("noimage/mini.png") %>' class="thumbnail no-marginb" />
8
+ {{/if}}
11
9
  </figure>
12
10
 
13
11
  <div class='variant-details media-body'>
@@ -1,13 +1,13 @@
1
- <%= render :partial => 'spree/admin/shared/product_tabs', :locals => { :current => 'Variants' } %>
1
+ <%= render partial: 'spree/admin/shared/product_tabs', locals: { current: :variants } %>
2
2
 
3
- <%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @variant } %>
3
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @variant } %>
4
4
 
5
5
  <%= form_for [:admin, @product, @variant] do |f| %>
6
6
  <fieldset>
7
7
  <div data-hook="admin_variant_edit_form">
8
- <%= render :partial => 'form', :locals => { :f => f } %>
8
+ <%= render partial: 'form', locals: { f: f } %>
9
9
  </div>
10
10
 
11
- <%= render :partial => 'spree/admin/shared/edit_resource_links' %>
11
+ <%= render partial: 'spree/admin/shared/edit_resource_links' %>
12
12
  </fieldset>
13
13
  <% end %>
@@ -1,4 +1,4 @@
1
- <%= render :partial => 'spree/admin/shared/product_tabs', :locals => {:current => 'Variants'} %>
1
+ <%= render partial: 'spree/admin/shared/product_tabs', locals: {current: :variants} %>
2
2
 
3
3
  <%# Place for new variant form %>
4
4
  <div id="new_variant" data-hook></div>
@@ -25,8 +25,8 @@
25
25
  <td><%= variant.display_price.to_html %></td>
26
26
  <td><%= variant.sku %></td>
27
27
  <td class="actions actions-2 text-right">
28
- <%= link_to_edit(variant, :no_text => true) if can?(:edit, variant) && !variant.deleted? %>
29
- <%= link_to_delete(variant, :no_text => true) if can?(:destroy, variant) && !variant.deleted? %>
28
+ <%= link_to_edit(variant, no_text: true) if can?(:edit, variant) && !variant.deleted? %>
29
+ <%= link_to_delete(variant, no_text: true) if can?(:destroy, variant) && !variant.deleted? %>
30
30
  </td>
31
31
  </tr>
32
32
  <% end %>
@@ -55,7 +55,7 @@
55
55
  <% end %>
56
56
  <% else %>
57
57
  <% content_for :page_actions do %>
58
- <%= button_link_to(Spree.t(:new_variant), spree.new_admin_product_variant_url(@product), { :remote => :true, :icon => 'add', :'data-update' => 'new_variant', :class => 'btn-success', id: 'new_var_link' }) if can? :create, Spree::Variant %>
59
- <%= button_link_to (@deleted.blank? ? Spree.t(:show_deleted) : Spree.t(:show_active)), spree.admin_product_variants_url(@product, :deleted => @deleted.blank? ? "on" : "off"), { :class => 'btn-default', :icon => 'filter' } %>
58
+ <%= button_link_to(Spree.t(:new_variant), spree.new_admin_product_variant_url(@product), { remote: :true, icon: 'add', :'data-update' => 'new_variant', class: 'btn-success', id: 'new_var_link' }) if can? :create, Spree::Variant %>
59
+ <%= button_link_to (@deleted.blank? ? Spree.t(:show_deleted) : Spree.t(:show_active)), spree.admin_product_variants_url(@product, deleted: @deleted.blank? ? "on" : "off"), { class: 'btn-default', icon: 'filter' } %>
60
60
  <% end %>
61
61
  <% end %>
data/config/routes.rb CHANGED
@@ -105,7 +105,7 @@ Spree::Core::Engine.add_routes do
105
105
  resources :refunds, only: [:new, :create, :edit, :update]
106
106
  end
107
107
 
108
- resources :reimbursements, only: [:create, :show, :edit, :update] do
108
+ resources :reimbursements, only: [:index, :create, :show, :edit, :update] do
109
109
  member do
110
110
  post :perform
111
111
  end
@@ -125,9 +125,6 @@ Spree::Core::Engine.add_routes do
125
125
  collection do
126
126
  post :update_positions
127
127
  end
128
- member do
129
- get :get_children
130
- end
131
128
  resources :taxons
132
129
  end
133
130
 
@@ -23,7 +23,7 @@ module Spree
23
23
  spree/backend/address_states.js
24
24
  jqPlot/excanvas.min.js
25
25
  spree/backend/images/new.js
26
- jquery.jstree/themes/apple/*
26
+ jquery.jstree/themes/spree/*
27
27
  fontawesome-webfont*
28
28
  select2_locale*
29
29
  jquery.alerts/images/*
@@ -0,0 +1,216 @@
1
+ /*
2
+ * jsTree Spree theme 1.0
3
+ */
4
+
5
+ .jstree-spree {
6
+
7
+ li, li ul {
8
+ border-color: #ededed;
9
+ border-style: solid;
10
+ }
11
+
12
+ li {
13
+ margin-left: 26px;
14
+ border-width: 0 0 1px 0;
15
+
16
+ &:last-of-type {
17
+ border-bottom-width: 0;
18
+ }
19
+
20
+ ul {
21
+ border-width: 1px 0 0 0;
22
+ }
23
+ }
24
+
25
+ ins {
26
+ position: relative;
27
+ cursor: pointer;
28
+ width: 24px;
29
+ line-height: 1;
30
+ height: 38px;
31
+ vertical-align: middle;
32
+ font-family: 'Glyphicons Halflings';
33
+ color: #555;
34
+
35
+ &:before {
36
+ position: absolute;
37
+ top: 12px;
38
+ padding-left: 4px;
39
+ font-size: 12px;
40
+ }
41
+ }
42
+
43
+ .jstree-open > ins:before { content: '\e114' }
44
+
45
+ .jstree-closed > ins:before { content: '\e080' }
46
+
47
+ .jstree-leaf > ins {
48
+ background-position: -36px 0;
49
+ }
50
+
51
+ .jstree-locked a {
52
+ color: silver;
53
+ cursor: default;
54
+ }
55
+
56
+ a {
57
+ line-height: 38px;
58
+ height: 38px;
59
+ padding: 0;
60
+ color: #555;
61
+ cursor: context-menu;
62
+ -webkit-user-select: none;
63
+ -moz-user-select: none;
64
+ user-select: none;
65
+
66
+ &.jstree-search {
67
+ color: aqua;
68
+ }
69
+
70
+ &.jstree-loading .jstree-icon {
71
+ background: image-url("jquery.jstree/themes/spree/throbber.gif") center center no-repeat !important;
72
+
73
+ &:before { content: '' }
74
+ }
75
+
76
+ .jstree-icon {
77
+ vertical-align: middle;
78
+ font-family: 'Glyphicons Halflings';
79
+ line-height: 20px;
80
+ width: 20px;
81
+ height: 24px;
82
+ text-align: center;
83
+ margin-right: 8px;
84
+ pointer-events: none;
85
+
86
+ &:before {
87
+ content: "\e118";
88
+ top: 1px;
89
+ padding-left: 0;
90
+ }
91
+ }
92
+ }
93
+
94
+ .jstree-rename-input {
95
+ height: 38px !important;
96
+ line-height: 38px !important;
97
+ left: 46px !important;
98
+ padding: 0 5px !important;
99
+ }
100
+
101
+ .jstree-hovered {
102
+ background: #e7f4f9;
103
+ border: 1px solid #d8f0fa;
104
+ padding: 0 3px 0 1px;
105
+ text-shadow: 1px 1px 1px silver;
106
+ }
107
+
108
+ .jstree-clicked {
109
+ background: #beebff;
110
+ border: 1px solid #99defd;
111
+ padding: 0 3px 0 1px;
112
+ }
113
+
114
+ .jstree-no-dots li,
115
+ .jstree-no-dots .jstree-leaf > ins {
116
+ background: transparent;
117
+ }
118
+
119
+ .jstree-no-dots .jstree-open > ins {
120
+ background-position: -18px 0;
121
+ }
122
+
123
+ .jstree-no-dots .jstree-closed > ins {
124
+ background-position: 0 0;
125
+ }
126
+
127
+ .jstree-no-icons a .jstree-icon {
128
+ display: none;
129
+ }
130
+
131
+ .jstree-search {
132
+ font-style: italic;
133
+ }
134
+
135
+ .jstree-no-icons .jstree-checkbox {
136
+ display: inline-block;
137
+ }
138
+
139
+ .jstree-no-checkboxes .jstree-checkbox {
140
+ display: none !important;
141
+ }
142
+
143
+ .jstree-checked > a > .jstree-checkbox {
144
+ background-position: -38px -19px;
145
+ }
146
+
147
+ .jstree-unchecked > a > .jstree-checkbox {
148
+ background-position: -2px -19px;
149
+ }
150
+
151
+ .jstree-undetermined > a > .jstree-checkbox {
152
+ background-position: -20px -19px;
153
+ }
154
+
155
+ .jstree-checked > a > .checkbox:hover {
156
+ background-position: -38px -37px;
157
+ }
158
+
159
+ .jstree-unchecked > a > .jstree-checkbox:hover {
160
+ background-position: -2px -37px;
161
+ }
162
+
163
+ .jstree-undetermined > a > .jstree-checkbox:hover {
164
+ background-position: -20px -37px;
165
+ }
166
+ }
167
+
168
+ #vakata-dragged.jstree-spree ins {
169
+ background: transparent !important;
170
+ }
171
+
172
+ #vakata-contextmenu.jstree-spree-context {
173
+ background: #fbfbfb;
174
+ border: 1px solid #eee;
175
+ margin-top: 15px;
176
+ margin-left: -4px;
177
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
178
+ -moz-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
179
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
180
+
181
+ li {
182
+
183
+ ins { display: none }
184
+ a { line-height: 38px }
185
+ }
186
+
187
+ a { color: #555; }
188
+
189
+ a:hover,
190
+ .vakata-hover > a {
191
+ color: inherit;
192
+ padding: 0 5px;
193
+ background: #ededed;
194
+ border: 1px solid #ededed;
195
+ -webkit-border-radius: 2px;
196
+ border-radius: 2px;
197
+ }
198
+
199
+ li.jstree-contextmenu-disabled a ,
200
+ li.jstree-contextmenu-disabled a:hover {
201
+ color: silver;
202
+ background: transparent;
203
+ border: 0;
204
+ padding: 1px 4px;
205
+ }
206
+
207
+ li.vakata-separator {
208
+ background: white;
209
+ border-top: 1px solid #e0e0e0;
210
+ margin: 0;
211
+ }
212
+
213
+ .icon {
214
+ margin: 0 10px 0 5px;
215
+ }
216
+ }