spree_backend 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/admin/address_states.js +19 -15
  3. data/app/assets/javascripts/admin/admin.js.erb +1 -5
  4. data/app/assets/javascripts/admin/nested-attribute.js +15 -11
  5. data/app/assets/javascripts/admin/option_type_autocomplete.js.erb +20 -16
  6. data/app/assets/javascripts/admin/orders/edit.js +17 -12
  7. data/app/assets/javascripts/admin/orders/edit_form.js +16 -12
  8. data/app/assets/javascripts/admin/product_picker.js +22 -16
  9. data/app/assets/javascripts/admin/promotions.js +34 -35
  10. data/app/assets/javascripts/admin/shipments.js.erb +35 -27
  11. data/app/assets/javascripts/admin/spree-select2.js.erb +2 -1
  12. data/app/assets/javascripts/admin/spree_backend.js +0 -1
  13. data/app/assets/javascripts/admin/states.js +10 -8
  14. data/app/assets/javascripts/admin/stock_management.js.coffee +2 -2
  15. data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +32 -19
  16. data/app/assets/javascripts/admin/user_picker.js +21 -13
  17. data/app/assets/javascripts/admin/variant_autocomplete.js.erb +16 -4
  18. data/app/assets/stylesheets/admin/plugins/_select2.scss +5 -3
  19. data/app/assets/stylesheets/admin/sections/_alerts.scss +27 -0
  20. data/app/assets/stylesheets/admin/spree_admin.scss +1 -0
  21. data/app/controllers/spree/admin/base_controller.rb +11 -13
  22. data/app/controllers/spree/admin/images_controller.rb +4 -5
  23. data/app/controllers/spree/admin/mail_methods_controller.rb +1 -1
  24. data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
  25. data/app/controllers/spree/admin/orders_controller.rb +3 -7
  26. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  27. data/app/controllers/spree/admin/resource_controller.rb +6 -2
  28. data/app/helpers/spree/admin/navigation_helper.rb +4 -2
  29. data/app/helpers/spree/admin/stock_locations_helper.rb +15 -0
  30. data/app/views/spree/admin/countries/index.html.erb +2 -2
  31. data/app/views/spree/admin/general_settings/edit.html.erb +3 -3
  32. data/app/views/spree/admin/option_types/index.html.erb +15 -5
  33. data/app/views/spree/admin/orders/_shipment.html.erb +2 -2
  34. data/app/views/spree/admin/orders/customer_details/_form.html.erb +8 -8
  35. data/app/views/spree/admin/orders/index.html.erb +4 -3
  36. data/app/views/spree/admin/payment_methods/index.html.erb +7 -4
  37. data/app/views/spree/admin/payments/_form.html.erb +1 -1
  38. data/app/views/spree/admin/payments/show.html.erb +2 -2
  39. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +1 -1
  40. data/app/views/spree/admin/product_properties/index.html.erb +9 -13
  41. data/app/views/spree/admin/products/index.html.erb +3 -3
  42. data/app/views/spree/admin/products/stock.html.erb +10 -8
  43. data/app/views/spree/admin/promotions/index.html.erb +6 -6
  44. data/app/views/spree/admin/properties/index.html.erb +12 -5
  45. data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
  46. data/app/views/spree/admin/prototypes/index.html.erb +9 -2
  47. data/app/views/spree/admin/reports/index.html.erb +2 -3
  48. data/app/views/spree/admin/shared/_address_form.html.erb +11 -11
  49. data/app/views/spree/admin/shared/_alert.html.erb +3 -3
  50. data/app/views/spree/admin/shared/_routes.html.erb +1 -0
  51. data/app/views/spree/admin/shared/_tabs.html.erb +2 -2
  52. data/app/views/spree/admin/shared/_translations.html.erb +3 -0
  53. data/app/views/spree/admin/shipping_categories/index.html.erb +9 -2
  54. data/app/views/spree/admin/shipping_methods/_form.html.erb +10 -0
  55. data/app/views/spree/admin/shipping_methods/index.html.erb +9 -5
  56. data/app/views/spree/admin/stock_locations/_form.html.erb +15 -11
  57. data/app/views/spree/admin/stock_locations/index.html.erb +9 -6
  58. data/app/views/spree/admin/stock_movements/index.html.erb +7 -0
  59. data/app/views/spree/admin/stock_transfers/index.html.erb +19 -18
  60. data/app/views/spree/admin/stock_transfers/new.html.erb +24 -21
  61. data/app/views/spree/admin/stock_transfers/show.html.erb +13 -9
  62. data/app/views/spree/admin/tax_categories/index.html.erb +12 -8
  63. data/app/views/spree/admin/tax_rates/_form.html.erb +8 -8
  64. data/app/views/spree/admin/tax_rates/index.html.erb +12 -11
  65. data/app/views/spree/admin/taxonomies/_list.html.erb +5 -5
  66. data/app/views/spree/admin/taxonomies/index.html.erb +11 -4
  67. data/app/views/spree/admin/taxons/_form.html.erb +6 -5
  68. data/app/views/spree/admin/taxons/edit.html.erb +17 -2
  69. data/app/views/spree/admin/trackers/index.html.erb +10 -10
  70. data/app/views/spree/admin/variants/_autocomplete.js.erb +3 -3
  71. data/app/views/spree/admin/variants/index.html.erb +9 -7
  72. data/app/views/spree/admin/zones/_country_members.html.erb +10 -0
  73. data/app/views/spree/admin/zones/_form.html.erb +4 -1
  74. data/app/views/spree/admin/zones/_state_members.html.erb +10 -0
  75. data/app/views/spree/admin/zones/edit.html.erb +3 -7
  76. data/app/views/spree/admin/zones/index.html.erb +11 -10
  77. data/vendor/assets/javascripts/trunk8.js +362 -226
  78. metadata +11 -11
  79. data/app/views/spree/admin/zones/_country_member.html.erb +0 -5
  80. data/app/views/spree/admin/zones/_member_type.html.erb +0 -19
  81. data/app/views/spree/admin/zones/_state_member.html.erb +0 -5
  82. data/vendor/assets/javascripts/jquery.horizontalNav.js +0 -141
@@ -1,18 +1,18 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
- <%= Spree.t('stock_transfers') %>
4
+ <%= Spree.t(:stock_transfers) %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
8
  <li>
9
- <%= button_link_to Spree.t('new_stock_transfer'), new_admin_stock_transfer_path, { :icon => 'icon-forward' } %>
9
+ <%= button_link_to Spree.t(:new_stock_transfer), new_admin_stock_transfer_path, { :icon => 'icon-forward' } %>
10
10
  </li>
11
11
  <% end %>
12
12
 
13
13
  <div data-hook="admin_orders_index_search">
14
14
  <fieldset>
15
- <legend align="center"><%= Spree.t('search') %></legend>
15
+ <legend align="center"><%= Spree.t(:search) %></legend>
16
16
  <%= search_form_for @q, :url => admin_stock_transfers_path do |f| %>
17
17
 
18
18
  <div class="field-block alpha four columns">
@@ -24,7 +24,7 @@
24
24
 
25
25
  <div class="four columns">
26
26
  <div class="field">
27
- <%= f.label :source_location, Spree.t('source') %>
27
+ <%= f.label :source_location, Spree.t(:source) %>
28
28
  <%= f.select :source_location_id_eq,
29
29
  options_from_collection_for_select(@stock_locations, :id, :name, @q.source_location_id_eq),
30
30
  { include_blank: true }, class: 'select2 fullwidth' %>
@@ -33,7 +33,7 @@
33
33
 
34
34
  <div class="omega four columns">
35
35
  <div class="field">
36
- <%= f.label :destination_location, Spree.t('destination') %>
36
+ <%= f.label :destination_location, Spree.t(:destination) %>
37
37
  <%= f.select :destination_location_id_eq,
38
38
  options_from_collection_for_select(@stock_locations, :id, :name, @q.destination_location_id_eq),
39
39
  { include_blank: true }, class: 'select2 fullwidth' %>
@@ -44,14 +44,14 @@
44
44
 
45
45
  <div class="actions filter-actions">
46
46
  <div data-hook="admin_stock_transfers_index_search_buttons">
47
- <%= button Spree.t('filter_results'), 'icon-search' %>
47
+ <%= button Spree.t(:filter_results), 'icon-search' %>
48
48
  </div>
49
49
  </div>
50
50
  <% end %>
51
51
  </fieldset>
52
52
  </div>
53
53
 
54
- <% if !@stock_transfers.empty? %>
54
+ <% if @stock_transfers.any? %>
55
55
  <table class='index' id='listing_stock_transfers' data-hook>
56
56
  <colgroup>
57
57
  <col style='width: 25%' />
@@ -62,20 +62,20 @@
62
62
  </colgroup>
63
63
  <thead>
64
64
  <tr data-hook='stock_transfers_header'>
65
- <th><%= Spree.t('created_at') %></th>
66
- <th><%= Spree.t('reference') %></th>
67
- <th><%= Spree.t('source') %></th>
68
- <th><%= Spree.t('destination') %></th>
65
+ <th><%= Spree.t(:created_at) %></th>
66
+ <th><%= Spree.t(:reference) %></th>
67
+ <th><%= Spree.t(:source) %></th>
68
+ <th><%= Spree.t(:destination) %></th>
69
69
  <th class='actions'></th>
70
70
  </tr>
71
71
  </thead>
72
72
  <tbody>
73
73
  <% @stock_transfers.each do |stock_transfer| %>
74
74
  <tr id="<%= spree_dom_id stock_transfer %>" data-hook="stock_transfer_row" class="<%= cycle('odd', 'even')%>">
75
- <td><%= stock_transfer.created_at %></td>
76
- <td class='align-center'><%= stock_transfer.reference %></td>
77
- <td><%= stock_transfer.source_location.try(:name) %></td>
78
- <td><%= stock_transfer.destination_location.try(:name) %></td>
75
+ <td class="align-center"><%= stock_transfer.created_at %></td>
76
+ <td class="align-center"><%= stock_transfer.reference %></td>
77
+ <td class="align-center"><%= stock_transfer.source_location.try(:name) %></td>
78
+ <td class="align-center"><%= stock_transfer.destination_location.try(:name) %></td>
79
79
  <td class='actions'>
80
80
  <%= link_to '', admin_stock_transfer_path(stock_transfer),
81
81
  title: 'view', class: 'view icon_link with-tip icon-eye-open no-text',
@@ -86,8 +86,9 @@
86
86
  </tbody>
87
87
  </table>
88
88
  <% else %>
89
- <div class="no-objects-found">
90
- <%= Spree.t('empty') %>
89
+ <div class="alpha twelve columns no-objects-found">
90
+ <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/stock_transfer')) %>,
91
+ <%= link_to Spree.t(:add_one), spree.new_admin_stock_transfer_path %>!
91
92
  </div>
92
93
  <% end %>
93
94
 
@@ -1,12 +1,12 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
- <%= Spree.t('new_stock_transfer') %>
4
+ <%= Spree.t(:new_stock_transfer) %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
8
  <li>
9
- <%= button_link_to Spree.t('back_to_stock_transfers_list'), admin_stock_transfers_path, :icon => 'icon-arrow-left' %>
9
+ <%= button_link_to Spree.t(:back_to_stock_transfers_list), admin_stock_transfers_path, :icon => 'icon-arrow-left' %>
10
10
  </li>
11
11
  <% end %>
12
12
 
@@ -14,10 +14,10 @@
14
14
  {{#each variants}}
15
15
  <tr>
16
16
  <td>{{name}}</td>
17
- <td class="align-center">{{quantity}}</td>
18
- <td class="align-center">
19
- <button class='icon-trash transfer_remove_variant button'
20
- data-variant-id='{{id}}'>remove</button>
17
+ <td class='align-center'>{{quantity}}</td>
18
+ <td class='actions'>
19
+ <button class='icon_link icon-trash no-text transfer_remove_variant'
20
+ data-variant-id='{{id}}' data-action'remove'></button>
21
21
  </td>
22
22
  <input type='hidden' id='variant[]' name='variant[]' value='{{id}}'>
23
23
  <input type='hidden' id='quantity[]' name='quantity[]' value='{{quantity}}'>
@@ -27,12 +27,12 @@
27
27
 
28
28
  <%= form_tag admin_stock_transfers_path, :method => :post do %>
29
29
  <fieldset class="twelve columns alpha">
30
- <legend align="center"><%= Spree.t('transfer_stock')%></legend>
30
+ <legend align="center"><%= Spree.t(:transfer_stock) %></legend>
31
31
 
32
32
  <div class="row" data-hook="admin_stock_movements_form_fields">
33
33
  <div class="alpha six columns">
34
34
  <div class="field" id="stock_movement_reference_field">
35
- <%= label_tag 'reference', raw("#{Spree.t('reference')} (#{Spree.t('optional')})") %>
35
+ <%= label_tag 'reference', raw("#{Spree.t(:reference)} (#{Spree.t(:optional)})") %>
36
36
  <%= text_field_tag :reference, '', class: 'fullwidth' %>
37
37
  </div>
38
38
  </div>
@@ -46,54 +46,57 @@
46
46
  </div>
47
47
  <div class="alpha six columns">
48
48
  <div class="field" id="transfer_source_location_id_field">
49
- <%= label_tag :transfer_source_location_id, Spree.t('source') %>
49
+ <%= label_tag :transfer_source_location_id, Spree.t(:source) %>
50
50
  <%= select_tag :transfer_source_location_id, {}, class: 'select2 fullwidth' %>
51
51
  </div>
52
52
  </div>
53
53
  <div class="six columns omega">
54
54
  <div class="field" id="transfer_destination_location_id_field">
55
- <%= label_tag :transfer_destination_location_id, Spree.t('destination') %>
55
+ <%= label_tag :transfer_destination_location_id, Spree.t(:destination) %>
56
56
  <%= select_tag :transfer_destination_location_id, {}, class: 'select2 fullwidth' %>
57
57
  </div>
58
58
  </div>
59
59
  </div>
60
60
 
61
61
  <fieldset class="no-border-bottom" id="add-variant-to-transfer">
62
- <legend><%= Spree.t('add_variant') %></legend>
62
+ <legend><%= Spree.t(:add_variant) %></legend>
63
63
 
64
64
  <div class="alpha eight columns">
65
65
  <div class="field" id="stock_movement_variant_id_field">
66
- <%= label_tag 'variant_id', Spree.t('variant') %>
66
+ <%= label_tag 'variant_id', Spree.t(:variant) %>
67
67
  <%= select_tag 'transfer_variant', {}, class: 'fullwidth' %>
68
68
  </div>
69
69
  </div>
70
70
  <div class="two columns">
71
71
  <div class="field" id="stock_movement_quantity_field">
72
- <%= label_tag 'quantity', Spree.t('quantity') %>
72
+ <%= label_tag 'quantity', Spree.t(:quantity) %>
73
73
  <%= number_field_tag 'transfer_variant_quantity', 1, class: 'fullwidth', min: 0 %>
74
74
  </div>
75
75
  </div>
76
76
  <div class="two columns omega">
77
- <div class="field">
78
- <%= button Spree.t('add'), 'icon-plus button transfer_add_variant' %>
77
+ <div class="field" style="padding: 25px 0 0 0 !important">
78
+ <%= button Spree.t(:add), 'icon-plus button transfer_add_variant' %>
79
79
  </div>
80
80
  </div>
81
81
 
82
82
  </fieldset>
83
83
 
84
- <div class="no-objects-found">No variants added for transfer. Please, add one.</div>
84
+ <div class="alpha twelve columns no-objects-found">
85
+ <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/stock_transfer')) %>,
86
+ <%= link_to Spree.t(:add_one), spree.new_admin_tax_rate_path %>!
87
+ </div>
85
88
 
86
89
  <div id="transfer-variants-table" class="twelve columns alpha" style="display:none">
87
90
  <table class="index sortable">
88
91
  <colgroup>
89
- <col style="width: 60%" />
90
- <col style="width: 20%" />
92
+ <col style="width: 70%" />
91
93
  <col style="width: 20%" />
94
+ <col style="width: 10%" />
92
95
  </colgroup>
93
96
  <thead data-hook="transfer_variants_header">
94
97
  <th><%= Spree.t(:name) %></th>
95
98
  <th><%= Spree.t(:quantity) %></th>
96
- <th><%= Spree.t(:remove) %></th>
99
+ <th class="actions"></th>
97
100
  </thead>
98
101
  <tbody id="transfer_variants_tbody">
99
102
 
@@ -102,7 +105,7 @@
102
105
  </div>
103
106
 
104
107
  <div class="filter-actions actions" data-hook="buttons">
105
- <%= button Spree.t('transfer_stock'), 'icon-plus transfer_transfer' %>
108
+ <%= button Spree.t(:transfer_stock), 'icon-plus transfer_transfer' %>
106
109
  </div>
107
110
  </fieldset>
108
111
  <% end %>
@@ -1,45 +1,49 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
- <%= Spree.t('stock_transfer') %>
4
+ <%= Spree.t(:stock_transfer) %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
8
  <li>
9
- <%= button_link_to Spree.t('back_to_stock_transfers_list'), admin_stock_transfers_path, :icon => 'icon-arrow-left' %>
9
+ <%= button_link_to Spree.t(:back_to_stock_transfers_list), admin_stock_transfers_path, :icon => 'icon-arrow-left' %>
10
10
  </li>
11
11
  <li>
12
- <%= button_link_to Spree.t('new_stock_transfer'), new_admin_stock_transfer_path, { :icon => 'icon-forward' } %>
12
+ <%= button_link_to Spree.t(:new_stock_transfer), new_admin_stock_transfer_path, { :icon => 'icon-forward' } %>
13
13
  </li>
14
14
  <% end %>
15
15
 
16
16
  <fieldset class="no-border-bottom">
17
- <legend align="center"><%= Spree.t('stock_transfer') %></legend>
17
+ <legend align="center"><%= Spree.t(:stock_transfer) %></legend>
18
18
 
19
19
  <div class="alpha six columns">
20
20
  <div class="field">
21
- <label><%= Spree.t('reference') %>:</label>
21
+ <label><%= Spree.t(:reference) %></label>
22
22
  <div class="value"><%= @stock_transfer.reference %></div>
23
23
  </div>
24
24
  </div>
25
25
 
26
26
  <div class="omega six columns">
27
27
  <div class="field">
28
- <label><%= Spree.t('created') %>:</label>
28
+ <label><%= Spree.t(:created_at) %></label>
29
29
  <div class="value"><%= @stock_transfer.created_at %></div>
30
30
  </div>
31
31
  </div>
32
32
 
33
33
  <% if @stock_transfer.source_movements.present? %>
34
34
  <fieldset class="no-border-bottom">
35
- <legend><%= Spree.t('source') %> <i class="icon-arrow-right"></i> <%= @stock_transfer.source_location.name %></legend>
35
+ <legend id="stock-location-source">
36
+ <%= Spree.t(:source) %> <i class="icon-arrow-right"></i> <%= @stock_transfer.source_location.name %>
37
+ </legend>
36
38
  <%= render :partial => 'stock_movements', :object => @stock_transfer.source_movements %>
37
39
  </fieldset>
38
40
  <% end %>
39
41
 
40
42
  <% if @stock_transfer.destination_movements.present? %>
41
43
  <fieldset class="no-border-bottom">
42
- <legend><%= Spree.t('destination') %> <i class="icon-arrow-right"></i> <%= @stock_transfer.destination_location.name %></legend>
44
+ <legend id="stock-location-destination">
45
+ <%= Spree.t(:destination) %> <i class="icon-arrow-right"></i> <%= @stock_transfer.destination_location.name %>
46
+ </legend>
43
47
  <%= render :partial => 'stock_movements', :object => @stock_transfer.destination_movements %>
44
48
  </fieldset>
45
49
  <% end %>
@@ -1,4 +1,4 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:listing_tax_categories) %>
@@ -12,6 +12,7 @@
12
12
  </ul>
13
13
  <% end %>
14
14
 
15
+ <% if @tax_categories.any? %>
15
16
  <table class="index" id='listing_tax_categories' data-hook>
16
17
  <colgroup>
17
18
  <col style="width: 30%" />
@@ -33,16 +34,19 @@
33
34
  @delete_url = admin_tax_category_path(tax_category)
34
35
  %>
35
36
  <tr id="<%= spree_dom_id tax_category %>" data-hook="tax_row" class="<%= cycle('odd', 'even')%>">
36
- <td><%= tax_category.name %></td>
37
- <td><%= tax_category.description %></td>
38
- <td class="align-center"><%= tax_category.is_default.to_s.titleize %></td>
37
+ <td class="align-center"><%= tax_category.name %></td>
38
+ <td class="align-center"><%= tax_category.description %></td>
39
+ <td class="align-center"><%= tax_category.is_default? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
39
40
  <td class="actions">
40
41
  <%= link_to_edit tax_category, :no_text => true %>
41
42
  <%= link_to_delete tax_category, :no_text => true %>
42
43
  </tr>
43
44
  <% end %>
44
- <% if @tax_categories.empty? %>
45
- <tr data-hook="tax_none"><td colspan="4"><%= Spree.t(:none) %></td></tr>
46
- <% end %>
47
45
  </tbody>
48
- </table>
46
+ </table>
47
+ <% else %>
48
+ <div class="alpha twelve columns no-objects-found">
49
+ <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/tax_category')) %>,
50
+ <%= link_to Spree.t(:add_one), spree.new_admin_tax_category_path %>!
51
+ </div>
52
+ <% end %>
@@ -2,7 +2,7 @@
2
2
  <div class="alpha twelve columns">
3
3
  <fieldset data-hook="tax_rates" class=" no-border-bottom">
4
4
  <legend align="center"><%= Spree.t(:general_settings) %></legend>
5
-
5
+
6
6
  <div class="alpha six columns">
7
7
  <div data-hook="name" class="field">
8
8
  <%= f.label :name, Spree.t(:name) %>
@@ -11,11 +11,11 @@
11
11
  <div data-hook="rate" class="field">
12
12
  <%= f.label :amount, Spree.t(:rate) %>
13
13
  <%= f.text_field :amount, :class => 'fullwidth' %>
14
- <p><em><%= Spree.t(:tax_rate_amount_explanation) %></em></p>
14
+ <br/><span class="info"><%= Spree.t(:tax_rate_amount_explanation) %></span>
15
15
  </div>
16
16
  <div data-hook="included" class="field">
17
17
  <%= f.check_box :included_in_price %>
18
- <%= f.label :included_in_price, Spree.t(:included_in_price) %>
18
+ <%= f.label :included_in_price, Spree.t(:included_in_price) %>
19
19
  </div>
20
20
  </div>
21
21
 
@@ -23,20 +23,20 @@
23
23
  <div data-hook="zone" class="field">
24
24
  <%= f.label :zone, Spree.t(:zone) %>
25
25
  <%= f.collection_select(:zone_id, @available_zones, :id, :name, {}, {:class => 'select2 fullwidth'}) %>
26
- </div>
26
+ </div>
27
27
  <div data-hook="category" class="field">
28
28
  <%= f.label :tax_category_id, Spree.t(:tax_category) %>
29
29
  <%= f.collection_select(:tax_category_id, @available_categories,:id, :name, {}, {:class => 'select2 fullwidth'}) %>
30
30
  </div>
31
31
  <div data-hook="show_rate" class="field">
32
32
  <%= f.check_box :show_rate_in_label %>
33
- <%= f.label :show_rate_in_label, Spree.t(:show_rate_in_label) %>
34
- </div>
33
+ <%= f.label :show_rate_in_label, Spree.t(:show_rate_in_label) %>
34
+ </div>
35
35
  </div>
36
36
  </fieldset>
37
37
  </div>
38
-
38
+
39
39
  <div class="clear"></div>
40
40
 
41
- <%= render :partial => 'spree/admin/shared/calculator_fields', :locals => { :f => f } %>
41
+ <%= render 'spree/admin/shared/calculator_fields', :f => f %>
42
42
  </div>
@@ -1,4 +1,4 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:tax_rates) %>
@@ -10,11 +10,7 @@
10
10
  </li>
11
11
  <% end %>
12
12
 
13
- <% unless @tax_rates.any? %>
14
- <div class="no-objects-found">
15
- <%= Spree.t(:no_results) %>
16
- </div>
17
- <% else %>
13
+ <% if @tax_rates.any? %>
18
14
  <table class="index">
19
15
  <colgroup>
20
16
  <col style="width: 15%">
@@ -41,12 +37,12 @@
41
37
  <tbody>
42
38
  <% @tax_rates.each do |tax_rate|%>
43
39
  <tr id="<%= spree_dom_id tax_rate %>" data-hook="rate_row" class="<%= cycle('odd', 'even')%>">
44
- <td><%=tax_rate.zone.try(:name) || Spree.t(:not_available) %></td>
45
- <td><%=tax_rate.name %></td>
46
- <td><%=tax_rate.tax_category.try(:name) || Spree.t(:not_available) %></td>
40
+ <td class="align-center"><%=tax_rate.zone.try(:name) || Spree.t(:not_available) %></td>
41
+ <td class="align-center"><%=tax_rate.name %></td>
42
+ <td class="align-center"><%=tax_rate.tax_category.try(:name) || Spree.t(:not_available) %></td>
47
43
  <td class="align-center"><%=tax_rate.amount %></td>
48
- <td class="align-center"><%=tax_rate.included_in_price %></td>
49
- <td class="align-center"><%=tax_rate.show_rate_in_label %></td>
44
+ <td class="align-center"><%=tax_rate.included_in_price? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
45
+ <td class="align-center"><%=tax_rate.show_rate_in_label? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
50
46
  <td class="align-center"><%=tax_rate.calculator.to_s %></td>
51
47
  <td class="actions">
52
48
  <%= link_to_edit tax_rate, :no_text => true %>
@@ -56,4 +52,9 @@
56
52
  <% end %>
57
53
  </tbody>
58
54
  </table>
55
+ <% else %>
56
+ <div class="alpha twelve columns no-objects-found">
57
+ <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/tax_rate')) %>,
58
+ <%= link_to Spree.t(:add_one), spree.new_admin_tax_rate_path %>!
59
+ </div>
59
60
  <% end %>
@@ -1,10 +1,12 @@
1
1
  <table class="index sortable" id='listing_taxonomies' data-hook data-sortable-link="<%= update_positions_admin_taxonomies_url %>">
2
2
  <colgroup>
3
- <col style="width: 85%">
3
+ <col style="width: 10%">
4
+ <col style="width: 75%">
4
5
  <col style="width: 15%">
5
6
  </colgroup>
6
7
  <thead>
7
8
  <tr data-hook="taxonomies_header">
9
+ <th class="no-border"></th>
8
10
  <th><%= Spree.t(:name) %></th>
9
11
  <th class="actions"></th>
10
12
  </tr>
@@ -12,10 +14,8 @@
12
14
  <tbody>
13
15
  <% @taxonomies.each do |taxonomy| %>
14
16
  <tr id="<%= spree_dom_id taxonomy %>" data-hook="taxonomies_row" class="<%= cycle('odd', 'even')%>">
15
- <td>
16
- <span class="handle"></span>
17
- <%= taxonomy.name %>
18
- </td>
17
+ <td class="no-border"><span class="handle"></span></td>
18
+ <td class="align-center"><%= taxonomy.name %></td>
19
19
  <td class="actions">
20
20
  <%= link_to_edit taxonomy.id, :no_text => true %>
21
21
  <%= link_to_delete taxonomy, :no_text => true %>
@@ -1,4 +1,4 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:taxonomies) %>
@@ -6,10 +6,17 @@
6
6
 
7
7
  <% content_for :page_actions do %>
8
8
  <li>
9
- <%= button_link_to Spree.t(:new_taxonomy), spree.new_admin_taxonomy_url, :icon => 'icon-plus', :id => 'admin_new_taxonomy_link' %></p>
9
+ <%= button_link_to Spree.t(:new_taxonomy), spree.new_admin_taxonomy_url, :icon => 'icon-plus', :id => 'admin_new_taxonomy_link' %>
10
10
  </li>
11
11
  <% end %>
12
12
 
13
- <div id='list-taxonomies' data-hook>
14
- <%= render :partial => 'list' %>
13
+ <% if @taxonomies.any? %>
14
+ <div id="list-taxonomies" data-hook>
15
+ <%= render 'list' %>
15
16
  </div>
17
+ <% else %>
18
+ <div class="alpha twelve columns no-objects-found">
19
+ <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/taxonomy')) %>,
20
+ <%= link_to Spree.t(:add_one), spree.new_admin_taxonomy_path %>!
21
+ </div>
22
+ <% end %>
@@ -2,14 +2,16 @@
2
2
  <div class="alpha five columns">
3
3
  <%= f.field_container :name do %>
4
4
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br />
5
- <%= error_message_on :taxon, :name, :class => 'fullwidth title' %>
6
5
  <%= text_field :taxon, :name, :class => 'fullwidth' %>
6
+ <%= error_message_on :taxon, :name, :class => 'fullwidth title' %>
7
7
  <% end %>
8
8
 
9
9
  <%= f.field_container :permalink_part do %>
10
- <%= f.label :permalink_part, Spree.t(:permalink) %><span class="required">*</span><br />
11
- <%= @taxon.permalink.split("/")[0...-1].join("/") + "/" %>
12
- <%= text_field_tag :permalink_part, @permalink_part %>
10
+ <%= f.label :permalink_part, Spree.t(:permalink) %> <span class="required">*</span><br />
11
+ <%= text_field_tag :permalink_part, @permalink_part, :class => 'fullwidth' %><br />
12
+ <span class="info" id="permalink_part_display">
13
+ <%= @taxon.permalink.split('/')[0...-1].join('/') + '/' %>
14
+ </span>
13
15
  <% end %>
14
16
 
15
17
  <%= f.field_container :icon do %>
@@ -41,5 +43,4 @@
41
43
  <%= f.text_field :meta_keywords, :class => 'fullwidth', :rows => 6 %>
42
44
  <% end %>
43
45
  </div>
44
-
45
46
  </div>
@@ -1,4 +1,4 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:taxon_edit) %>
@@ -13,7 +13,7 @@
13
13
  <% # Because otherwise the form would attempt to use to_param of @taxon %>
14
14
  <% form_url = admin_taxonomy_taxon_path(@taxonomy.id, @taxon.id) %>
15
15
  <%= form_for [:admin, @taxonomy, @taxon], :method => :put, :url => form_url, :html => { :multipart => true } do |f| %>
16
- <%= render :partial => 'form', :locals => { :f => f } %>
16
+ <%= render 'form', :f => f %>
17
17
 
18
18
  <div class="form-buttons" data-hook="buttons">
19
19
  <%= button Spree.t('actions.update'), 'icon-refresh' %>
@@ -21,3 +21,18 @@
21
21
  <%= button_link_to Spree.t('actions.cancel'), edit_admin_taxonomy_url(@taxonomy), :icon => "icon-remove" %>
22
22
  </div>
23
23
  <% end %>
24
+
25
+ <% content_for :head do %>
26
+ <%= javascript_tag do -%>
27
+ $(document).ready(function() {
28
+ var field = $('#permalink_part'),
29
+ target = $('#permalink_part_display'),
30
+ permalink_part_default = target.text().trim();
31
+
32
+ target.text(permalink_part_default + field.val());
33
+ field.on('keyup blur', function () {
34
+ target.text(permalink_part_default + $(this).val());
35
+ });
36
+ });
37
+ <% end -%>
38
+ <% end %>
@@ -1,4 +1,4 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/configuration_menu' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:analytics_trackers) %>
@@ -10,12 +10,7 @@
10
10
  </li>
11
11
  <% end %>
12
12
 
13
- <% unless @trackers.any? %>
14
- <div class="no-objects-found">
15
- <%= Spree.t(:no_trackers_found)%>,
16
- <%= link_to Spree.t(:add_one), new_object_url %>!
17
- </div>
18
- <% else %>
13
+ <% if @trackers.any? %>
19
14
  <table class="index">
20
15
  <colgroup>
21
16
  <col style="width: 30%">
@@ -34,8 +29,8 @@
34
29
  <tbody>
35
30
  <% @trackers.each do |tracker|%>
36
31
  <tr id="<%= spree_dom_id tracker %>" data-hook="admin_trackers_index_rows" class="<%= cycle('odd', 'even')%>">
37
- <td><%= tracker.analytics_id %></td>
38
- <td><%= tracker.environment.to_s.titleize %></td>
32
+ <td class="align-center"><%= tracker.analytics_id %></td>
33
+ <td class="align-center"><%= tracker.environment.to_s.titleize %></td>
39
34
  <td class="align-center"><%= tracker.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
40
35
  <td class="actions">
41
36
  <%= link_to_edit tracker, :no_text => true %>
@@ -45,4 +40,9 @@
45
40
  <% end %>
46
41
  </tbody>
47
42
  </table>
48
- <% end%>
43
+ <% else %>
44
+ <div class="no-objects-found">
45
+ <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/tracker')) %>,
46
+ <%= link_to Spree.t(:add_one), new_object_url %>!
47
+ </div>
48
+ <% end %>
@@ -13,7 +13,7 @@
13
13
  <h6 class="variant-name">{{variant.name}}</h6>
14
14
 
15
15
  <ul class='variant-data'>
16
- <li class='variant-sku'><strong>{{t 'sku'}}:</strong> {{variant.sku}}</li>
16
+ <li class='variant-sku'><strong><%= Spree.t(:sku) %>:</strong> {{variant.sku}}</li>
17
17
  </ul>
18
18
 
19
19
  {{#if variant.option_values}}
@@ -51,13 +51,13 @@
51
51
  {{#if this.available}}
52
52
  <td>
53
53
  {{this.count_on_hand}}
54
- {{#if this.backorderable}} (backorders allowed) {{/if}}
54
+ {{#if this.backorderable}} (<%= Spree.t(:backorders_allowed) %>) {{/if}}
55
55
  </td>
56
56
  <td>
57
57
  <input class="quantity" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
58
58
  </td>
59
59
  <td class="actions">
60
- <button class="add_variant no-text icon-plus icon_link with-tip" data-stock-location-id="{{this.stock_location_id}}" title="Add" data-action="add"></button>
60
+ <button class="add_variant no-text icon-plus icon_link with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add"></button>
61
61
  </td>
62
62
  {{else}}
63
63
  <td><%= Spree.t(:out_of_stock) %></td>
@@ -45,7 +45,10 @@
45
45
  </tbody>
46
46
  </table>
47
47
  <% else %>
48
- <div class="alpha twelve columns no-objects-found"><%= Spree.t(:no_results)%>.</div>
48
+ <div class="alpha twelve columns no-objects-found">
49
+ <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/variant')) %>,
50
+ <%= link_to Spree.t(:add_one), spree.new_admin_product_variant_path(@product) %>!
51
+ </div>
49
52
  <% end %>
50
53
 
51
54
  <% if @product.empty_option_values? %>
@@ -59,16 +62,15 @@
59
62
  <% content_for :page_actions do %>
60
63
  <ul class="inline-menu" data-hook="toolbar">
61
64
  <li id="new_var_link" data-hook>
62
- <%= link_to_with_icon('icon-plus',
63
- Spree.t(:new_variant),
64
- new_admin_product_variant_url(@product),
65
- :remote => :true,
66
- :'data-update' => 'new_variant',
65
+ <%= link_to_with_icon('icon-plus',
66
+ Spree.t(:new_variant),
67
+ new_admin_product_variant_url(@product),
68
+ :remote => :true,
69
+ :'data-update' => 'new_variant',
67
70
  :class => 'button'
68
71
  ) %>
69
72
  </li>
70
73
  <li><%= link_to_with_icon('icon-filter', @deleted.blank? ? Spree.t(:show_deleted) : Spree.t(:show_active), admin_product_variants_url(@product, :deleted => @deleted.blank? ? "on" : "off"), :class => 'button') %></li>
71
74
  </ul>
72
75
  <% end %>
73
-
74
76
  <% end %>