solidus_backend 2.0.3 → 2.1.0.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_backend might be problematic. Click here for more details.

Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend/handlebars_extensions.coffee +14 -6
  3. data/app/assets/javascripts/spree/backend/images/upload.js +203 -0
  4. data/app/assets/javascripts/spree/backend/option_value_picker.js +2 -1
  5. data/app/assets/javascripts/spree/backend/stock_management/index_update_forms.coffee +1 -1
  6. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +5 -1
  7. data/app/assets/javascripts/spree/backend/taxons.js.coffee +1 -1
  8. data/app/assets/javascripts/spree/backend/templates/index.js +15 -0
  9. data/app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs +12 -0
  10. data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +13 -11
  11. data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +12 -10
  12. data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +7 -5
  13. data/app/assets/javascripts/spree/backend.js +57 -3
  14. data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +1 -1
  15. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +2 -0
  16. data/app/assets/stylesheets/spree/backend/components/_table-filter.scss +3 -1
  17. data/app/assets/stylesheets/spree/backend/components/_tabs.scss +2 -0
  18. data/app/assets/stylesheets/spree/backend/sections/_adjustments.scss +3 -0
  19. data/app/assets/stylesheets/spree/backend/sections/_products.scss +29 -17
  20. data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +6 -0
  21. data/app/assets/stylesheets/spree/backend/shared/_header.scss +2 -0
  22. data/app/assets/stylesheets/spree/backend/shared/_layout.scss +5 -0
  23. data/app/assets/stylesheets/spree/backend/shared/_utilities.scss +1 -2
  24. data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -3
  25. data/app/controllers/spree/admin/orders_controller.rb +2 -0
  26. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  27. data/app/controllers/spree/admin/prices_controller.rb +7 -1
  28. data/app/controllers/spree/admin/products_controller.rb +0 -6
  29. data/app/controllers/spree/admin/promotions_controller.rb +0 -2
  30. data/app/controllers/spree/admin/users_controller.rb +3 -0
  31. data/app/helpers/spree/admin/adjustments_helper.rb +1 -1
  32. data/app/helpers/spree/admin/base_helper.rb +0 -35
  33. data/app/helpers/spree/admin/stock_transfers_helper.rb +14 -0
  34. data/app/models/spree/backend_configuration.rb +2 -2
  35. data/app/views/spree/admin/adjustment_reasons/index.html.erb +1 -1
  36. data/app/views/spree/admin/adjustment_reasons/shared/_form.html.erb +14 -16
  37. data/app/views/spree/admin/adjustments/_adjustment.html.erb +4 -1
  38. data/app/views/spree/admin/adjustments/_form.html.erb +24 -20
  39. data/app/views/spree/admin/cancellations/index.html.erb +2 -3
  40. data/app/views/spree/admin/countries/_form.html.erb +4 -4
  41. data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
  42. data/app/views/spree/admin/customer_returns/new.html.erb +5 -7
  43. data/app/views/spree/admin/general_settings/edit.html.erb +55 -46
  44. data/app/views/spree/admin/images/_form.html.erb +13 -11
  45. data/app/views/spree/admin/images/_image_row.html.erb +22 -0
  46. data/app/views/spree/admin/images/create.js.erb +9 -0
  47. data/app/views/spree/admin/images/edit.html.erb +12 -8
  48. data/app/views/spree/admin/images/index.html.erb +57 -49
  49. data/app/views/spree/admin/option_types/_form.html.erb +2 -2
  50. data/app/views/spree/admin/option_types/index.html.erb +1 -1
  51. data/app/views/spree/admin/orders/_add_line_item.html.erb +5 -3
  52. data/app/views/spree/admin/orders/_add_product.html.erb +5 -3
  53. data/app/views/spree/admin/orders/_shipment.html.erb +14 -6
  54. data/app/views/spree/admin/orders/cart.html.erb +1 -1
  55. data/app/views/spree/admin/orders/confirm/_customer_details.html.erb +17 -15
  56. data/app/views/spree/admin/orders/customer_details/_form.html.erb +28 -26
  57. data/app/views/spree/admin/orders/customer_details/show.html.erb +1 -1
  58. data/app/views/spree/admin/orders/edit.html.erb +1 -1
  59. data/app/views/spree/admin/orders/index.html.erb +70 -63
  60. data/app/views/spree/admin/payment_methods/_form.html.erb +54 -48
  61. data/app/views/spree/admin/payment_methods/index.html.erb +7 -5
  62. data/app/views/spree/admin/payments/_form.html.erb +2 -2
  63. data/app/views/spree/admin/payments/index.html.erb +1 -1
  64. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +32 -30
  65. data/app/views/spree/admin/payments/source_forms/_storecredit.html.erb +1 -0
  66. data/app/views/spree/admin/payments/source_views/_gateway.html.erb +1 -1
  67. data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +8 -1
  68. data/app/views/spree/admin/prices/_form.html.erb +38 -43
  69. data/app/views/spree/admin/prices/_master_variant_table.html.erb +41 -0
  70. data/app/views/spree/admin/prices/_table.html.erb +35 -33
  71. data/app/views/spree/admin/prices/index.html.erb +37 -35
  72. data/app/views/spree/admin/product_properties/index.html.erb +0 -7
  73. data/app/views/spree/admin/products/_form.html.erb +153 -144
  74. data/app/views/spree/admin/products/edit.html.erb +1 -1
  75. data/app/views/spree/admin/products/index.html.erb +19 -13
  76. data/app/views/spree/admin/products/new.html.erb +5 -38
  77. data/app/views/spree/admin/promotion_categories/_form.html.erb +1 -1
  78. data/app/views/spree/admin/promotion_rules/create.js.erb +6 -0
  79. data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
  80. data/app/views/spree/admin/promotions/_form.html.erb +48 -44
  81. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
  82. data/app/views/spree/admin/promotions/_rules.html.erb +8 -4
  83. data/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +9 -5
  84. data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +30 -24
  85. data/app/views/spree/admin/promotions/edit.html.erb +2 -2
  86. data/app/views/spree/admin/promotions/index.html.erb +22 -20
  87. data/app/views/spree/admin/promotions/new.html.erb +1 -1
  88. data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +11 -5
  89. data/app/views/spree/admin/promotions/rules/_item_total.html.erb +18 -8
  90. data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +7 -5
  91. data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +13 -6
  92. data/app/views/spree/admin/promotions/rules/_option_value.html.erb +11 -7
  93. data/app/views/spree/admin/promotions/rules/_product.html.erb +11 -7
  94. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +15 -9
  95. data/app/views/spree/admin/promotions/rules/_user.html.erb +5 -3
  96. data/app/views/spree/admin/promotions/rules/_user_role.html.erb +12 -0
  97. data/app/views/spree/admin/properties/_form.html.erb +2 -2
  98. data/app/views/spree/admin/properties/index.html.erb +7 -5
  99. data/app/views/spree/admin/refund_reasons/index.html.erb +1 -1
  100. data/app/views/spree/admin/refund_reasons/shared/_form.html.erb +14 -16
  101. data/app/views/spree/admin/refunds/edit.html.erb +2 -2
  102. data/app/views/spree/admin/refunds/new.html.erb +4 -4
  103. data/app/views/spree/admin/shared/_configuration_menu.html.erb +0 -4
  104. data/app/views/spree/admin/shared/_head.html.erb +1 -1
  105. data/app/views/spree/admin/shared/_product_sub_menu.html.erb +0 -3
  106. data/app/views/spree/admin/shared/_rebuild_vat_prices_checkbox.html.erb +1 -1
  107. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +2 -2
  108. data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
  109. data/app/views/spree/admin/shared/_variant_search.html.erb +12 -8
  110. data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
  111. data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
  112. data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
  113. data/app/views/spree/admin/shipping_methods/_form.html.erb +74 -81
  114. data/app/views/spree/admin/shipping_methods/index.html.erb +3 -3
  115. data/app/views/spree/admin/states/_form.html.erb +2 -2
  116. data/app/views/spree/admin/states/index.html.erb +9 -5
  117. data/app/views/spree/admin/stock_locations/_form.html.erb +42 -28
  118. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +4 -4
  119. data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
  120. data/app/views/spree/admin/stock_movements/_form.html.erb +1 -1
  121. data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
  122. data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +1 -1
  123. data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +10 -1
  124. data/app/views/spree/admin/stock_transfers/index.html.erb +29 -27
  125. data/app/views/spree/admin/stock_transfers/show.html.erb +26 -24
  126. data/app/views/spree/admin/store_credits/_form.html.erb +3 -3
  127. data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +1 -1
  128. data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
  129. data/app/views/spree/admin/store_credits/index.html.erb +2 -2
  130. data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +49 -47
  131. data/app/views/spree/admin/style_guide/topics/messaging/_loading.html.erb +11 -1
  132. data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
  133. data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
  134. data/app/views/spree/admin/tax_rates/_form.html.erb +28 -28
  135. data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
  136. data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
  137. data/app/views/spree/admin/taxons/_form.html.erb +6 -6
  138. data/app/views/spree/admin/taxons/index.html.erb +2 -2
  139. data/app/views/spree/admin/users/_addresses_form.html.erb +19 -15
  140. data/app/views/spree/admin/users/_form.html.erb +9 -6
  141. data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
  142. data/app/views/spree/admin/users/addresses.html.erb +1 -1
  143. data/app/views/spree/admin/users/edit.html.erb +2 -2
  144. data/app/views/spree/admin/users/items.html.erb +2 -2
  145. data/app/views/spree/admin/users/orders.html.erb +2 -2
  146. data/app/views/spree/admin/variants/_form.html.erb +73 -49
  147. data/app/views/spree/admin/variants/_table_filter.html.erb +12 -8
  148. data/app/views/spree/admin/variants/index.html.erb +2 -2
  149. data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
  150. data/app/views/spree/admin/zones/_form.html.erb +34 -31
  151. data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
  152. data/app/views/spree/admin/zones/index.html.erb +1 -3
  153. data/app/views/spree/layouts/admin.html.erb +4 -4
  154. data/config/routes.rb +0 -11
  155. data/solidus_backend.gemspec +4 -1
  156. data/spec/controllers/spree/admin/payments_controller_spec.rb +2 -3
  157. data/spec/controllers/spree/admin/prices_controller_spec.rb +5 -3
  158. data/spec/features/admin/configuration/general_settings_spec.rb +12 -0
  159. data/spec/features/admin/configuration/payment_methods_spec.rb +3 -2
  160. data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
  161. data/spec/features/admin/homepage_spec.rb +0 -3
  162. data/spec/features/admin/orders/adjustments_spec.rb +28 -25
  163. data/spec/features/admin/orders/customer_details_spec.rb +1 -1
  164. data/spec/features/admin/orders/order_details_spec.rb +27 -1
  165. data/spec/features/admin/orders/payments_spec.rb +1 -1
  166. data/spec/features/admin/products/edit/images_spec.rb +28 -1
  167. data/spec/features/admin/products/pricing_spec.rb +17 -2
  168. data/spec/features/admin/products/products_spec.rb +0 -104
  169. data/spec/features/admin/store_credits_spec.rb +3 -3
  170. data/spec/features/admin/users_spec.rb +7 -1
  171. metadata +21 -32
  172. data/app/assets/javascripts/spree/backend/nested-attribute.js +0 -27
  173. data/app/assets/stylesheets/spree/backend/sections/_adjustments_table.scss +0 -8
  174. data/app/assets/stylesheets/spree/backend/sections/_edit_checkouts.scss +0 -72
  175. data/app/assets/stylesheets/spree/backend/sections/_tax_zones.scss +0 -15
  176. data/app/controllers/spree/admin/prototypes_controller.rb +0 -26
  177. data/app/controllers/spree/admin/trackers_controller.rb +0 -6
  178. data/app/views/spree/admin/prototypes/_form.html.erb +0 -36
  179. data/app/views/spree/admin/prototypes/_prototypes.html.erb +0 -25
  180. data/app/views/spree/admin/prototypes/available.js.erb +0 -2
  181. data/app/views/spree/admin/prototypes/edit.html.erb +0 -15
  182. data/app/views/spree/admin/prototypes/index.html.erb +0 -50
  183. data/app/views/spree/admin/prototypes/new.html.erb +0 -9
  184. data/app/views/spree/admin/prototypes/new.js.erb +0 -5
  185. data/app/views/spree/admin/prototypes/select.js.erb +0 -4
  186. data/app/views/spree/admin/prototypes/show.html.erb +0 -42
  187. data/app/views/spree/admin/trackers/_form.html.erb +0 -28
  188. data/app/views/spree/admin/trackers/edit.html.erb +0 -19
  189. data/app/views/spree/admin/trackers/index.html.erb +0 -54
  190. data/app/views/spree/admin/trackers/new.html.erb +0 -18
  191. data/spec/features/admin/configuration/analytics_tracker_spec.rb +0 -50
  192. data/spec/features/admin/products/prototypes_spec.rb +0 -110
@@ -1,6 +1,6 @@
1
1
  <div data-hook="admin_named_type_form_fields" class="row">
2
2
  <div class="row">
3
- <div class="alpha four columns">
3
+ <div class="col-xs-3">
4
4
  <%= f.field_container :name do %>
5
5
  <%= f.label :name, class: 'required' %><br />
6
6
  <%= f.text_field :name, :class => 'fullwidth' %>
@@ -48,7 +48,7 @@
48
48
  </tbody>
49
49
  </table>
50
50
  <% else %>
51
- <div class="alpha twelve columns no-objects-found">
51
+ <div class="col-xs-9 no-objects-found">
52
52
  <%= render 'spree/admin/shared/no_objects_found',
53
53
  resource: resource,
54
54
  new_resource_url: new_object_url %>
@@ -43,7 +43,7 @@
43
43
  </tbody>
44
44
  </table>
45
45
  <% else %>
46
- <div class="alpha twelve columns no-objects-found">
46
+ <div class="col-xs-9 no-objects-found">
47
47
  <%= render 'spree/admin/shared/no_objects_found',
48
48
  resource: Spree::ShippingCategory,
49
49
  new_resource_url: new_object_url %>
@@ -1,5 +1,5 @@
1
- <div data-hook="admin_shipping_method_form_fields" class="alpha twelve columns">
2
- <div data-hook="admin_shipping_method_form_name_field" class="alpha six columns">
1
+ <div data-hook="admin_shipping_method_form_fields" class="row">
2
+ <div data-hook="admin_shipping_method_form_name_field" class="col-xs-5">
3
3
  <%= f.field_container :name do %>
4
4
  <%= f.label :name %><br />
5
5
  <%= f.text_field :name, :class => 'fullwidth' %>
@@ -7,51 +7,39 @@
7
7
  <% end %>
8
8
  </div>
9
9
 
10
- <div data-hook="admin_shipping_method_form_display_field" class="omega six columns">
11
- <%= f.field_container :display_on do %>
12
- <%= f.label :display_on %><br />
13
- <%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2 fullwidth'}) %>
14
- <%= error_message_on :shipping_method, :display_on %>
10
+ <div data-hook="admin_shipping_method_form_internal_name_field" class="col-xs-5">
11
+ <%= f.field_container :admin_name do %>
12
+ <%= f.label :admin_name %><br />
13
+ <%= f.text_field :admin_name, :class => 'fullwidth', :label => false %>
14
+ <%= error_message_on :shipping_method, :admin_name %>
15
15
  <% end %>
16
16
  </div>
17
17
 
18
- <div class="alpha omega twelve columns">
19
- <div data-hook="admin_shipping_method_form_internal_name_field" class="alpha six columns">
20
- <%= f.field_container :admin_name do %>
21
- <%= f.label :admin_name %><br />
22
- <%= f.text_field :admin_name, :class => 'fullwidth', :label => false %>
23
- <%= error_message_on :shipping_method, :admin_name %>
24
- <% end %>
25
- </div>
26
-
27
- <div data-hook="admin_shipping_method_form_code" class="omega six columns">
28
- <%= f.field_container :code do %>
29
- <%= f.label :code %><br />
30
- <%= f.text_field :code, :class => 'fullwidth', :label => false %>
31
- <%= error_message_on :shipping_method, :code %>
32
- <% end %>
33
- </div>
18
+ <div data-hook="admin_shipping_method_form_code" class="col-xs-5">
19
+ <%= f.field_container :code do %>
20
+ <%= f.label :code %><br />
21
+ <%= f.text_field :code, :class => 'fullwidth', :label => false %>
22
+ <%= error_message_on :shipping_method, :code %>
23
+ <% end %>
34
24
  </div>
35
25
 
36
- <div class="alpha omega twelve columns">
37
- <div class="alpha six columns">
38
- <%= f.field_container :carrier do %>
39
- <%= f.label :carrier %><br />
40
- <%= f.text_field :carrier, :class => 'fullwidth', :label => false %>
41
- <%= error_message_on :shipping_method, :carrier %>
42
- <% end %>
43
- </div>
26
+ <div class="col-xs-5">
27
+ <%= f.field_container :carrier do %>
28
+ <%= f.label :carrier %><br />
29
+ <%= f.text_field :carrier, :class => 'fullwidth', :label => false %>
30
+ <%= error_message_on :shipping_method, :carrier %>
31
+ <% end %>
32
+ </div>
44
33
 
45
- <div class="omega six columns">
46
- <%= f.field_container :service_level do %>
47
- <%= f.label :service_level %><br />
48
- <%= f.text_field :service_level, :class => 'fullwidth', :label => false %>
49
- <%= error_message_on :shipping_method, :service_level %>
50
- <% end %>
51
- </div>
34
+ <div class="col-xs-5">
35
+ <%= f.field_container :service_level do %>
36
+ <%= f.label :service_level %><br />
37
+ <%= f.text_field :service_level, :class => 'fullwidth', :label => false %>
38
+ <%= error_message_on :shipping_method, :service_level %>
39
+ <% end %>
52
40
  </div>
53
41
 
54
- <div data-hook="admin_shipping_method_form_tracking_url_field" class="alpha twelve columns">
42
+ <div data-hook="admin_shipping_method_form_tracking_url_field" class="col-xs-10">
55
43
  <%= f.field_container :tracking_url do %>
56
44
  <%= f.label :tracking_url %><br />
57
45
  <%= f.text_field :tracking_url, :class => 'fullwidth', :placeholder => Spree.t(:tracking_url_placeholder) %>
@@ -60,53 +48,58 @@
60
48
  </div>
61
49
  </div>
62
50
 
63
- <div class="alpha six columns">
64
- <div data-hook="admin_shipping_method_form_availability_fields" class="alpha six columns">
65
- <fieldset class="categories no-border-bottom">
66
- <legend align="center"><%= plural_resource_name(Spree::ShippingCategory) %></legend>
67
- <%= f.field_container :categories do %>
68
- <% Spree::ShippingCategory.all.each do |category| %>
69
- <%= label_tag do %>
70
- <%= check_box_tag('shipping_method[shipping_categories][]', category.id, @shipping_method.shipping_categories.include?(category)) %>
71
- <%= category.name %><br>
51
+ <%= f.field_container :available_to_users do %>
52
+ <%= f.check_box(:available_to_users) %>
53
+ <%= f.label :available_to_users %>
54
+ <%= error_message_on :shipping_method, :available_to_users %>
55
+ <% end %>
56
+
57
+ <div class="row">
58
+ <div class="col-xs-5">
59
+ <div data-hook="admin_shipping_method_form_availability_fields">
60
+ <fieldset class="categories no-border-bottom">
61
+ <legend align="center"><%= plural_resource_name(Spree::ShippingCategory) %></legend>
62
+ <%= f.field_container :categories do %>
63
+ <% Spree::ShippingCategory.all.each do |category| %>
64
+ <%= label_tag do %>
65
+ <%= check_box_tag('shipping_method[shipping_categories][]', category.id, @shipping_method.shipping_categories.include?(category)) %>
66
+ <%= category.name %><br>
67
+ <% end %>
72
68
  <% end %>
69
+ <%= error_message_on :shipping_method, :shipping_category_id %>
73
70
  <% end %>
74
- <%= error_message_on :shipping_method, :shipping_category_id %>
75
- <% end %>
76
- </fieldset>
77
- </div>
71
+ </fieldset>
72
+ </div>
78
73
 
79
- <div class="alpha six columns">
80
- <fieldset class="no-border-bottom">
81
- <legend align="center"><%= plural_resource_name(Spree::Zone) %></legend>
82
- <%= f.field_container :zones do %>
83
- <% shipping_method_zones = @shipping_method.zones.to_a %>
84
- <% Spree::Zone.all.each do |zone| %>
85
- <%= label_tag do %>
86
- <%= check_box_tag('shipping_method[zones][]', zone.id, shipping_method_zones.include?(zone)) %>
87
- <%= zone.name %>
74
+ <div>
75
+ <fieldset class="no-border-bottom">
76
+ <legend align="center"><%= plural_resource_name(Spree::Zone) %></legend>
77
+ <%= f.field_container :zones do %>
78
+ <% shipping_method_zones = @shipping_method.zones.to_a %>
79
+ <% Spree::Zone.all.each do |zone| %>
80
+ <%= label_tag do %>
81
+ <%= check_box_tag('shipping_method[zones][]', zone.id, shipping_method_zones.include?(zone)) %>
82
+ <%= zone.name %>
83
+ <% end %>
84
+ <br>
88
85
  <% end %>
89
- <br>
86
+ <%= error_message_on :shipping_method, :zone_id %>
90
87
  <% end %>
91
- <%= error_message_on :shipping_method, :zone_id %>
92
- <% end %>
93
- </fieldset>
88
+ </fieldset>
89
+ </div>
94
90
  </div>
95
- </div>
96
-
97
- <div data-hook="admin_shipping_method_form_calculator_fields" class="omega six columns">
98
- <%= render :partial => 'spree/admin/shared/calculator_fields', :locals => { :f => f } %>
99
- </div>
100
-
101
- <div class="alpha six columns">
102
- <div class="alpha six columns">
103
- <fieldset class="tax_categories no-border-bottom">
104
- <legend align="center"><%= Spree::TaxCategory.model_name.human %></legend>
105
- <%= f.field_container :tax_categories do %>
106
- <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "select2 fullwidth" %>
107
- <%= error_message_on :shipping_method, :tax_category_id %>
108
- <% end %>
109
- </fieldset>
91
+ <div class="col-xs-5">
92
+ <div data-hook="admin_shipping_method_form_calculator_fields">
93
+ <%= render :partial => 'spree/admin/shared/calculator_fields', :locals => { :f => f } %>
94
+ </div>
95
+ <div>
96
+ <fieldset class="tax_categories no-border-bottom">
97
+ <legend align="center"><%= Spree::TaxCategory.model_name.human %></legend>
98
+ <%= f.field_container :tax_categories do %>
99
+ <%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "select2 fullwidth" %>
100
+ <%= error_message_on :shipping_method, :tax_category_id %>
101
+ <% end %>
102
+ </fieldset>
103
+ </div>
110
104
  </div>
111
105
  </div>
112
-
@@ -27,7 +27,7 @@
27
27
  <th><%= Spree::ShippingMethod.human_attribute_name(:name) %></th>
28
28
  <th><%= Spree::Zone.model_name.human %></th>
29
29
  <th><%= Spree::Calculator.model_name.human %></th>
30
- <th><%= Spree::ShippingMethod.human_attribute_name(:display_on) %></th>
30
+ <th><%= Spree::ShippingMethod.human_attribute_name(:available_to_users) %></th>
31
31
  <th data-hook="admin_shipping_methods_index_header_actions" class="actions"></th>
32
32
  </tr>
33
33
  </thead>
@@ -37,7 +37,7 @@
37
37
  <td class="align-center"><%= shipping_method.admin_name + ' / ' if shipping_method.admin_name.present? %><%= shipping_method.name %></td>
38
38
  <td class="align-center"><%= shipping_method.zones.collect(&:name).join(", ") if shipping_method.zones %></td>
39
39
  <td class="align-center"><%= shipping_method.calculator.description %></td>
40
- <td class="align-center"><%= shipping_method.display_on.blank? ? Spree.t(:both) : Spree.t(shipping_method.display_on.downcase.tr(" ", "_")) %></td>
40
+ <td class="align-center"><%= shipping_method.available_to_users? ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
41
41
  <td data-hook="admin_shipping_methods_index_row_actions" class="actions">
42
42
  <% if can?(:update, shipping_method) %>
43
43
  <%= link_to_edit shipping_method, :no_text => true %>
@@ -52,7 +52,7 @@
52
52
  </tbody>
53
53
  </table>
54
54
  <% else %>
55
- <div class="alpha twelve columns no-objects-found">
55
+ <div class="col-xs-9 no-objects-found">
56
56
  <%= render 'spree/admin/shared/no_objects_found',
57
57
  resource: Spree::ShippingMethod,
58
58
  new_resource_url: new_object_url %>
@@ -1,11 +1,11 @@
1
1
  <div data-hook="admin_state_form_fields" class="row">
2
- <div class="alpha six columns">
2
+ <div class="col-xs-6">
3
3
  <%= f.field_container :name do %>
4
4
  <%= f.label :name %>
5
5
  <%= f.text_field :name, :class => 'fullwidth' %>
6
6
  <% end %>
7
7
  </div>
8
- <div class="omega six columns">
8
+ <div class="col-xs-6">
9
9
  <%= f.field_container :abbr do %>
10
10
  <%= f.label :abbr %>
11
11
  <%= f.text_field :abbr, :class => 'fullwidth' %>
@@ -13,11 +13,15 @@
13
13
  <% end %>
14
14
  <% end %>
15
15
 
16
- <div data-hook="country" class="field row">
17
- <%= label_tag :country, Spree::Country.model_name.human %>
18
- <select id="country" class='observe_field select2 fullwidth' data-base-url="<%=admin_states_path(:format => :js) %>?country_id=" data-update="#state-list">
19
- <%= options_from_collection_for_select(@countries, :id, :name, @country.id) %>
20
- </select>
16
+ <div class="row">
17
+ <div class="col-xs-12">
18
+ <div data-hook="country" class="field">
19
+ <%= label_tag :country, Spree::Country.model_name.human %>
20
+ <select id="country" class='observe_field select2 fullwidth' data-base-url="<%=admin_states_path(:format => :js) %>?country_id=" data-update="#state-list">
21
+ <%= options_from_collection_for_select(@countries, :id, :name, @country.id) %>
22
+ </select>
23
+ </div>
24
+ </div>
21
25
  </div>
22
26
 
23
27
  <div id="new_state" data-hook>
@@ -1,5 +1,5 @@
1
1
  <div data-hook="admin_stock_locations_form_fields" class="row">
2
- <div class="alpha nine columns" data-hook="stock_location_names">
2
+ <div class="col-xs-7" data-hook="stock_location_names">
3
3
  <div data-hook="stock_location_name">
4
4
  <%= f.field_container :name do %>
5
5
  <%= f.label :name, class: 'required' %><br />
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <div class="omega three columns" data-hook="stock_location_status">
23
+ <div class="col-xs-3" data-hook="stock_location_status">
24
24
  <%= f.field_container :active do %>
25
25
  <label for="active"><%= Spree.t(:status) %></label>
26
26
  <ul>
@@ -56,44 +56,58 @@
56
56
  <% end %>
57
57
  </div>
58
58
 
59
- <div class="alpha six columns field" data-hook="stock_location_address1">
60
- <%= f.label :address1 %>
61
- <%= f.text_field :address1, class: 'fullwidth' %>
59
+ <div class="col-xs-5" data-hook="stock_location_address1">
60
+ <div class="field">
61
+ <%= f.label :address1 %>
62
+ <%= f.text_field :address1, class: 'fullwidth' %>
63
+ </div>
62
64
  </div>
63
65
 
64
- <div class="omega six columns field" data-hook="stock_location_city">
65
- <%= f.label :city %>
66
- <%= f.text_field :city, class: 'fullwidth' %>
66
+ <div class="col-xs-5" data-hook="stock_location_city">
67
+ <div class="field">
68
+ <%= f.label :city %>
69
+ <%= f.text_field :city, class: 'fullwidth' %>
70
+ </div>
67
71
  </div>
68
72
 
69
- <div class="alpha six columns field" data-hook="stock_location_address2">
70
- <%= f.label :address2 %>
71
- <%= f.text_field :address2, class: 'fullwidth' %>
73
+ <div class="col-xs-5" data-hook="stock_location_address2">
74
+ <div class="field">
75
+ <%= f.label :address2 %>
76
+ <%= f.text_field :address2, class: 'fullwidth' %>
77
+ </div>
72
78
  </div>
73
79
 
74
- <div class="three columns field" data-hook="stock_location_zipcode">
75
- <%= f.label :zipcode %>
76
- <%= f.text_field :zipcode, class: 'fullwidth' %>
80
+ <div class="col-xs-2" data-hook="stock_location_zipcode">
81
+ <div class="field">
82
+ <%= f.label :zipcode %>
83
+ <%= f.text_field :zipcode, class: 'fullwidth' %>
84
+ </div>
77
85
  </div>
78
86
 
79
- <div class="omega three columns field" data-hook="stock_location_phone">
80
- <%= f.label :phone %>
81
- <%= f.phone_field :phone, class: 'fullwidth' %>
87
+ <div class="col-xs-3" data-hook="stock_location_phone">
88
+ <div class="field">
89
+ <%= f.label :phone %>
90
+ <%= f.phone_field :phone, class: 'fullwidth' %>
91
+ </div>
82
92
  </div>
83
93
 
84
- <div class="alpha six columns field" data-hook="stock_location_country">
85
- <%= f.label :country_id %>
86
- <span id="country"><%= f.collection_select :country_id, available_countries, :id, :name, {}, { class: 'select2 fullwidth' } %></span>
94
+ <div class="col-xs-5" data-hook="stock_location_country">
95
+ <div class="field">
96
+ <%= f.label :country_id %>
97
+ <span id="country"><%= f.collection_select :country_id, available_countries, :id, :name, {}, { class: 'select2 fullwidth' } %></span>
98
+ </div>
87
99
  </div>
88
100
 
89
- <div class="omega six columns field" data-hook="stock_location_state">
90
- <% if f.object.country %>
91
- <%= f.label :state_id %>
92
- <span id="state" class="region">
93
- <%= f.text_field :state_name, style: "display: #{f.object.country.states.empty? ? 'block' : 'none' };", disabled: !f.object.country.states.empty?, class: 'fullwidth state_name' %>
94
- <%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, { include_blank: true }, {class: 'select2 fullwidth', style: "display: #{f.object.country.states.empty? ? 'none' : 'block' };", disabled: f.object.country.states.empty?} %>
95
- </span>
96
- <% end %>
101
+ <div class="col-xs-5" data-hook="stock_location_state">
102
+ <div class="field">
103
+ <% if f.object.country %>
104
+ <%= f.label :state_id %>
105
+ <span id="state" class="region">
106
+ <%= f.text_field :state_name, style: "display: #{f.object.country.states.empty? ? 'block' : 'none' };", disabled: !f.object.country.states.empty?, class: 'fullwidth state_name' %>
107
+ <%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, { include_blank: true }, {class: 'select2 fullwidth', style: "display: #{f.object.country.states.empty? ? 'none' : 'block' };", disabled: f.object.country.states.empty?} %>
108
+ </span>
109
+ <% end %>
110
+ </div>
97
111
  </div>
98
112
  </div>
99
113
 
@@ -2,27 +2,27 @@
2
2
  <fieldset>
3
3
  <legend align="center"><%= Spree.t(:move_stock_between_locations)%></legend>
4
4
  <div data-hook="admin_stock_movements_form_fields" class="row">
5
- <div class="five columns">
5
+ <div class="col-xs-3">
6
6
  <div class="field" id="stock_movement_transfer_from_field">
7
7
  <%= label_tag :stock_location_from_id, Spree.t(:transfer_from_location) %>
8
8
  <%= select_tag :stock_location_from_id, options_from_collection_for_select(@stock_locations, :id, :name), class: 'select2 fullwidth' %>
9
9
  </div>
10
10
  </div>
11
- <div class="five columns">
11
+ <div class="col-xs-3">
12
12
  <div class="field" id="stock_movement_transfer_to_field">
13
13
  <%= label_tag :stock_location_to_id, Spree.t(:transfer_to_location) %>
14
14
  <%= select_tag :stock_location_to_id, options_from_collection_for_select(@stock_locations, :id, :name), class: 'select2 fullwidth' %>
15
15
  </div>
16
16
  </div>
17
17
 
18
- <div class="five columns">
18
+ <div class="col-xs-3">
19
19
  <div class="field" id="stock_movement_variant_id_field">
20
20
  <%= label_tag 'variant_id', Spree::Variant.model_name.human %>
21
21
  <%= select_tag :variant_id, options_from_collection_for_select(@variants, :id, :name_and_sku), class: 'select2 fullwidth' %>
22
22
  </div>
23
23
  </div>
24
24
 
25
- <div class="five columns">
25
+ <div class="col-xs-3">
26
26
  <div class="field" id="stock_movement_quantity_field">
27
27
  <%= label_tag 'quantity', Spree::StockMovement.human_attribute_name(:quantity) %>
28
28
  <%= number_field_tag :quantity, 1, class: 'fullwidth' %>
@@ -78,7 +78,7 @@
78
78
  </tbody>
79
79
  </table>
80
80
  <% else %>
81
- <div class="alpha twelve columns no-objects-found">
81
+ <div class="col-xs-9 no-objects-found">
82
82
  <%= render 'spree/admin/shared/no_objects_found',
83
83
  resource: Spree::StockLocation,
84
84
  new_resource_url: new_object_url %>
@@ -1,5 +1,5 @@
1
1
  <div data-hook="admin_stock_movements_form_fields" class="row">
2
- <div class="alpha twelve columns">
2
+ <div class="col-xs-9">
3
3
  <%= f.field_container :quantity do %>
4
4
  <%= f.label :quantity %>
5
5
  <%= f.text_field :quantity %>
@@ -44,7 +44,7 @@
44
44
  </tbody>
45
45
  </table>
46
46
  <% else %>
47
- <div class="alpha twelve columns no-objects-found">
47
+ <div class="col-xs-9 no-objects-found">
48
48
  <%= render 'spree/admin/shared/no_objects_found',
49
49
  resource: Spree::StockMovement,
50
50
  new_resource_url: new_object_url %>
@@ -1,4 +1,4 @@
1
- <div id="source-movements-table" class="twelve columns alpha">
1
+ <div id="source-movements-table" class="col-xs-9">
2
2
  <table class="index sortable">
3
3
  <colgroup>
4
4
  <col style="width: 40%" />
@@ -18,15 +18,24 @@
18
18
  <tbody>
19
19
  <% transfer_items.each do |item| %>
20
20
  <%- variant = item.variant %>
21
- <tr data-transfer-item-id="<%= item.id %>">
21
+ <tr data-transfer-item-id="<%= item.id %>" class='<%= "deleted" if variant.deleted? %>'>
22
22
  <td class="align-center no-padding">
23
23
  <div class='variant-container' data-variant-id="<%= variant.id %>">
24
24
  <div class='variant-image'>
25
25
  <%= image_tag(variant.display_image(fallback: false).attachment(:small)) %>
26
26
  </div>
27
27
  <div class='variant-details'>
28
+
28
29
  <table class='stock-variant-field-table'>
29
30
  <tbody>
31
+ <% if variant.deleted? %>
32
+ <tr>
33
+ <td colspan="2">
34
+ <%= I18n.t(:deleted, scope: [:spree, :hints, "spree/variant"]) %>
35
+ <%= deleted_variant_admin_hint(variant) %>
36
+ </td>
37
+ </tr>
38
+ <% end %>
30
39
  <% @variant_display_attributes.each do |display_attribute| %>
31
40
  <tr>
32
41
  <td><%= Spree.t(display_attribute[:translation_key]) %></td>
@@ -17,41 +17,43 @@
17
17
  <% content_for :table_filter do %>
18
18
  <div data-hook="admin_stock_transfers_index_search">
19
19
  <%= search_form_for [:admin, @search] do |f| %>
20
- <div class="field-block alpha four columns">
21
- <div class="field">
22
- <%= f.label nil, Spree::StockLocation.model_name.human %>
23
- <%= f.select :source_location_id_or_destination_location_id_eq, options_from_collection_for_select(@stock_locations, :id, :name, params[:q][:source_location_id_or_destination_location_id_eq]), {include_blank: true}, {class: 'select2 fullwidth'} %>
20
+ <div class="row">
21
+ <div class="field-block col-xs-3">
22
+ <div class="field">
23
+ <%= f.label nil, Spree::StockLocation.model_name.human %>
24
+ <%= f.select :source_location_id_or_destination_location_id_eq, options_from_collection_for_select(@stock_locations, :id, :name, params[:q][:source_location_id_or_destination_location_id_eq]), {include_blank: true}, {class: 'select2 fullwidth'} %>
25
+ </div>
24
26
  </div>
25
- </div>
26
27
 
27
- <div class="field-block alpha four columns">
28
- <div class="date-range-filter field">
29
- <%= f.label nil, Spree.t(:date_range) %>
30
- <div class="date-range-fields">
31
- <%= f.text_field :created_at_gt, class: 'datepicker datepicker-from', include_blank: true, value: params[:q][:created_at_gt], placeholder: Spree.t(:start) %>
28
+ <div class="field-block col-xs-3">
29
+ <div class="date-range-filter field">
30
+ <%= f.label nil, Spree.t(:date_range) %>
31
+ <div class="date-range-fields">
32
+ <%= f.text_field :created_at_gt, class: 'datepicker datepicker-from', include_blank: true, value: params[:q][:created_at_gt], placeholder: Spree.t(:start) %>
32
33
 
33
- <span class="range-divider">
34
- <i class="fa fa-arrow-right"></i>
35
- </span>
34
+ <span class="range-divider">
35
+ <i class="fa fa-arrow-right"></i>
36
+ </span>
36
37
 
37
- <%= f.text_field :created_at_lt, class: 'datepicker datepicker-to', include_blank: true, value: params[:q][:created_at_lt], placeholder: Spree.t(:stop) %>
38
+ <%= f.text_field :created_at_lt, class: 'datepicker datepicker-to', include_blank: true, value: params[:q][:created_at_lt], placeholder: Spree.t(:stop) %>
39
+ </div>
38
40
  </div>
39
41
  </div>
40
- </div>
41
42
 
42
- <div class="field-block alpha four columns">
43
- <div class="field">
44
- <%= f.label nil, Spree::StockTransfer.human_attribute_name(:number) %>
45
- <%= f.text_field :number_cont, value: params[:q][:number_cont] %>
43
+ <div class="field-block col-xs-3">
44
+ <div class="field">
45
+ <%= f.label nil, Spree::StockTransfer.human_attribute_name(:number) %>
46
+ <%= f.text_field :number_cont, value: params[:q][:number_cont] %>
47
+ </div>
46
48
  </div>
47
- </div>
48
49
 
49
- <div class="field-block alpha four columns">
50
- <div class="field checkbox">
51
- <label>
52
- <%= f.check_box :closed_at_null, { checked: @show_only_open }, '1', '0' %>
53
- <%= Spree.t(:show_only_open_transfers) %>
54
- </label>
50
+ <div class="field-block col-xs-3">
51
+ <div class="field checkbox">
52
+ <label>
53
+ <%= f.check_box :closed_at_null, { checked: @show_only_open }, '1', '0' %>
54
+ <%= Spree.t(:show_only_open_transfers) %>
55
+ </label>
56
+ </div>
55
57
  </div>
56
58
  </div>
57
59
 
@@ -107,7 +109,7 @@
107
109
  </tbody>
108
110
  </table>
109
111
  <% else %>
110
- <div class="alpha sixteen columns no-objects-found">
112
+ <div class="col-xs-9 no-objects-found">
111
113
  <%= render 'spree/admin/shared/no_objects_found',
112
114
  resource: Spree::StockTransfer,
113
115
  new_resource_url: new_object_url %>
@@ -16,30 +16,32 @@
16
16
  <p><%= @stock_transfer.description %></p>
17
17
  </div>
18
18
 
19
- <div class='field-block alpha three columns'>
20
- <label><%= Spree::StockTransfer.human_attribute_name(:created_by_id) %></label>
21
- <p><%= @stock_transfer.created_by.email %></p>
22
- </div>
23
-
24
- <div class='field-block alpha three columns'>
25
- <label><%= Spree::StockTransfer.human_attribute_name(:created_at) %></label>
26
- <p><%= @stock_transfer.created_at.try(:to_date) %></p>
27
- </div>
28
-
29
- <div class='field-block alpha three columns'>
30
- <label><%= Spree::StockTransfer.human_attribute_name(:finalized_at) %></label>
31
- <p><%= @stock_transfer.finalized_at.try(:to_date) %></p>
32
- </div>
33
-
34
- <div class='field-block alpha three columns'>
35
- <label><%= Spree::StockTransfer.human_attribute_name(:finalized_by_id) %></label>
36
- <p><%= @stock_transfer.finalized_by.try(:email) %></p>
37
- </div>
38
-
39
- <div class='field-block alpha three columns'>
40
- <label><%= Spree::StockTransfer.human_attribute_name(:shipped_at) %></label>
41
- <p><%= @stock_transfer.shipped_at.try(:to_date) %></p>
42
- </div>
19
+ <div class="row">
20
+ <div class='field-block col-xs-3'>
21
+ <label><%= Spree::StockTransfer.human_attribute_name(:created_by_id) %></label>
22
+ <p><%= @stock_transfer.created_by.email %></p>
23
+ </div>
24
+
25
+ <div class='field-block col-xs-2'>
26
+ <label><%= Spree::StockTransfer.human_attribute_name(:created_at) %></label>
27
+ <p><%= @stock_transfer.created_at.try(:to_date) %></p>
28
+ </div>
29
+
30
+ <div class='field-block col-xs-2'>
31
+ <label><%= Spree::StockTransfer.human_attribute_name(:finalized_at) %></label>
32
+ <p><%= @stock_transfer.finalized_at.try(:to_date) %></p>
33
+ </div>
34
+
35
+ <div class='field-block col-xs-3'>
36
+ <label><%= Spree::StockTransfer.human_attribute_name(:finalized_by_id) %></label>
37
+ <p><%= @stock_transfer.finalized_by.try(:email) %></p>
38
+ </div>
39
+
40
+ <div class='field-block col-xs-2'>
41
+ <label><%= Spree::StockTransfer.human_attribute_name(:shipped_at) %></label>
42
+ <p><%= @stock_transfer.shipped_at.try(:to_date) %></p>
43
+ </div>
44
+ </div>
43
45
  </fieldset>
44
46
 
45
47
  <fieldset>