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
@@ -19,8 +19,8 @@
19
19
  <col style="width: 10%">
20
20
  <col style="width: 13%">
21
21
  <col style="width: 33%">
22
- <col style="width: 13%">
23
- <col style="width: 19%">
22
+ <col style="width: 16%">
23
+ <col style="width: 16%">
24
24
  <col style="width: 19%">
25
25
  <col style="width: 13%">
26
26
  </colgroup>
@@ -29,7 +29,8 @@
29
29
  <th class="no-border"></th>
30
30
  <th><%= Spree::PaymentMethod.human_attribute_name(:name) %></th>
31
31
  <th><%= Spree::PaymentMethod.human_attribute_name(:type) %></th>
32
- <th><%= Spree::PaymentMethod.human_attribute_name(:display_on) %></th>
32
+ <th><%= Spree::PaymentMethod.human_attribute_name(:available_to_users) %></th>
33
+ <th><%= Spree::PaymentMethod.human_attribute_name(:available_to_admin) %></th>
33
34
  <th><%= Spree::PaymentMethod.human_attribute_name(:active) %></th>
34
35
  <th data-hook="admin_payment_methods_index_header_actions" class="actions"></th>
35
36
  </tr>
@@ -40,7 +41,8 @@
40
41
  <td class="no-border"><span class="handle"></span></td>
41
42
  <td class="align-center"><%= method.name %></td>
42
43
  <td class="align-center"><%= method.type %></td>
43
- <td class="align-center"><%= method.display_on.blank? ? Spree.t(:both) : Spree.t(method.display_on) %></td>
44
+ <td class="align-center"><%= method.available_to_users ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
45
+ <td class="align-center"><%= method.available_to_admin ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
44
46
  <td class="align-center"><%= method.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
45
47
  <td data-hook="admin_payment_methods_index_row_actions" class="actions">
46
48
  <% if can?(:update, method.becomes(Spree::PaymentMethod)) %>
@@ -55,7 +57,7 @@
55
57
  </tbody>
56
58
  </table>
57
59
  <% else %>
58
- <div class="alpha twelve columns no-objects-found">
60
+ <div class="col-xs-9 no-objects-found">
59
61
  <%= render 'spree/admin/shared/no_objects_found',
60
62
  resource: Spree::PaymentMethod,
61
63
  new_resource_url: new_object_url %>
@@ -1,11 +1,11 @@
1
1
  <div data-hook="admin_payment_form_fields" class="row">
2
- <div class="alpha three columns">
2
+ <div class="col-xs-3">
3
3
  <div class="field">
4
4
  <%= f.label :amount %>
5
5
  <%= f.text_field :amount, :value => @order.display_outstanding_balance.money, :class => 'fullwidth' %>
6
6
  </div>
7
7
  </div>
8
- <div class="omega nine columns">
8
+ <div class="col-xs-9">
9
9
  <div class="field">
10
10
  <label><%= Spree::PaymentMethod.model_name.human %></label>
11
11
  <ul>
@@ -29,5 +29,5 @@
29
29
  <% end %>
30
30
 
31
31
  <% else %>
32
- <div class="alpha twelve columns no-objects-found"><%= Spree.t(:order_has_no_payments) %></div>
32
+ <div class="col-xs-9 no-objects-found"><%= Spree.t(:order_has_no_payments) %></div>
33
33
  <% end %>
@@ -13,41 +13,43 @@
13
13
 
14
14
  <div class="clear"></div>
15
15
 
16
- <div class="alpha four columns">
17
- <div data-hook="card_number">
18
- <div class="field">
19
- <%= hidden_field_tag "#{param_prefix}[cc_type]", '', {class: 'ccType'} %>
20
- <%= label_tag "card_number#{payment_method.id}", Spree::CreditCard.human_attribute_name(:number), class: 'required' %>
21
- <%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth cardNumber', :id => "card_number#{payment_method.id}", :maxlength => 19 %>
22
- <span id="card_type" style="display:none;">
23
- ( <span id="looks_like" ><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
24
- <span id="unrecognized"><%= Spree.t(:unrecognized_card_type) %></span>
25
- )
26
- </span>
16
+ <div class="row">
17
+ <div class="col-xs-5">
18
+ <div data-hook="card_number">
19
+ <div class="field">
20
+ <%= hidden_field_tag "#{param_prefix}[cc_type]", '', {class: 'ccType'} %>
21
+ <%= label_tag "card_number#{payment_method.id}", Spree::CreditCard.human_attribute_name(:number), class: 'required' %>
22
+ <%= text_field_tag "#{param_prefix}[number]", '', :class => 'required fullwidth cardNumber', :id => "card_number#{payment_method.id}", :maxlength => 19 %>
23
+ <span id="card_type" style="display:none;">
24
+ ( <span id="looks_like" ><%= Spree.t(:card_type_is) %> <span id="type"></span></span>
25
+ <span id="unrecognized"><%= Spree.t(:unrecognized_card_type) %></span>
26
+ )
27
+ </span>
28
+ </div>
27
29
  </div>
28
30
  </div>
29
- </div>
30
- <div class="alpha four columns">
31
- <div data-hook="card_name">
32
- <div class="field">
33
- <%= label_tag "card_name#{payment_method.id}", Spree::CreditCard.human_attribute_name(:name), class: 'required' %>
34
- <%= text_field_tag "#{param_prefix}[name]", '', id: "card_name#{payment_method.id}", class: 'required fullwidth', maxlength: 19 %>
31
+ <div class="col-xs-5">
32
+ <div data-hook="card_name">
33
+ <div class="field">
34
+ <%= label_tag "card_name#{payment_method.id}", Spree::CreditCard.human_attribute_name(:name), class: 'required' %>
35
+ <%= text_field_tag "#{param_prefix}[name]", '', id: "card_name#{payment_method.id}", class: 'required fullwidth', maxlength: 19 %>
36
+ </div>
35
37
  </div>
36
38
  </div>
37
- </div>
38
- <div class="three columns">
39
- <div data-hook="card_expiration" class="field">
40
- <%= label_tag "card_expiry#{payment_method.id}", Spree::CreditCard.human_attribute_name(:expiration), class: 'required' %>
41
- <%= text_field_tag "#{param_prefix}[expiry]", '', id: "card_expiry#{payment_method.id}", class: "required cardExpiry", placeholder: "MM / YY" %>
39
+ <div class="col-xs-4">
40
+ <div data-hook="card_expiration" class="field">
41
+ <%= label_tag "card_expiry#{payment_method.id}", Spree::CreditCard.human_attribute_name(:expiration), class: 'required' %>
42
+ <%= text_field_tag "#{param_prefix}[expiry]", '', id: "card_expiry#{payment_method.id}", class: "required cardExpiry", placeholder: "MM / YY" %>
43
+ </div>
42
44
  </div>
43
- </div>
44
- <div class="omega two columns">
45
- <div data-hook="card_code" class="field">
46
- <%= label_tag "card_code#{payment_method.id}", Spree::CreditCard.human_attribute_name(:card_code), class: 'required' %>
47
- <%= text_field_tag "#{param_prefix}[verification_value]", '', id: "card_code#{payment_method.id}", class: 'required fullwidth cardCode', size: 5 %>
48
- <a href="/content/cvv" class="info cvvLink" target="_blank">
49
- (<%= Spree.t(:what_is_this) %>)
50
- </a>
45
+ <div class="col-xs-3">
46
+ <div data-hook="card_code" class="field">
47
+ <%= label_tag "card_code#{payment_method.id}", Spree::CreditCard.human_attribute_name(:card_code), class: 'required' %>
48
+ <%= text_field_tag "#{param_prefix}[verification_value]", '', id: "card_code#{payment_method.id}", class: 'required fullwidth cardCode', size: 5 %>
49
+ <a href="/content/cvv" class="info cvvLink" target="_blank">
50
+ (<%= Spree.t(:what_is_this) %>)
51
+ </a>
52
+ </div>
51
53
  </div>
52
54
  </div>
53
55
 
@@ -0,0 +1 @@
1
+ <%= t('.not_supported') %>
@@ -2,7 +2,7 @@
2
2
  <legend align="center"><%= Spree::CreditCard.model_name.human %></legend>
3
3
 
4
4
  <div class="row">
5
- <div class="alpha six columns">
5
+ <div class="col-xs-4">
6
6
  <dl>
7
7
  <dt><%= Spree.t(:name_on_card) %>:</dt>
8
8
  <dd><%= payment.source.name %></dd>
@@ -2,7 +2,7 @@
2
2
  <legend align="center"><%= Spree::StoreCredit.model_name.human %></legend>
3
3
 
4
4
  <div class="row">
5
- <div class="alpha six columns">
5
+ <div class="col-xs-4">
6
6
  <dl>
7
7
  <dt><%= Spree::StoreCreditCategory.model_name.human %>:</dt>
8
8
  <dd><%= payment.source.category.name%></dd>
@@ -16,6 +16,13 @@
16
16
  <dt><%= Spree::StoreCredit.human_attribute_name(:issued_on) %>:</dt>
17
17
  <dd><%= l payment.source.created_at.to_date %></dd>
18
18
  </dl>
19
+
20
+ <p>
21
+ <%= link_to(
22
+ Spree.t("admin.store_credits.view"),
23
+ admin_user_store_credit_path(payment.source.user, payment.source)
24
+ ) %>
25
+ </p>
19
26
  </div>
20
27
  </div>
21
28
  </fieldset>
@@ -1,53 +1,48 @@
1
1
  <div data-hook="admin_product_price_fields">
2
2
 
3
3
  <div data-hook="admin_product_price_form">
4
- <div class="four columns alpha" data-hook="admin_product_price_form_variant">
5
- <%= f.field_container :variant do %>
6
- <%= f.label :variant %>
7
- <%= f.select :variant_id,
8
- @product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
9
- {},
10
- class: "select2 fullwidth", disabled: !f.object.new_record? %>
11
- <% end %>
12
- </div>
4
+ <div class="row">
5
+ <div class="col-xs-3" data-hook="admin_product_price_form_variant">
6
+ <%= f.field_container :variant do %>
7
+ <%= f.label :variant %>
8
+ <%= f.select :variant_id,
9
+ @product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
10
+ {},
11
+ class: "select2 fullwidth", disabled: !f.object.new_record? %>
12
+ <% end %>
13
+ </div>
13
14
 
14
- <div class="three columns alpha" data-hook="admin_product_price_form_currency">
15
- <%= f.field_container :currency do %>
16
- <%= f.label :currency %>
17
- <%= f.select :currency,
18
- Money::Currency.all.map { |c| ["#{c.iso_code} (#{c.name})", c.iso_code] },
19
- {},
20
- class: "select2 fullwidth", disabled: !f.object.new_record? %>
21
- <% end %>
22
- </div>
15
+ <div class="col-xs-2" data-hook="admin_product_price_form_currency">
16
+ <%= f.field_container :currency do %>
17
+ <%= f.label :currency %>
18
+ <%= f.select :currency,
19
+ Money::Currency.all.map { |c| ["#{c.iso_code} (#{c.name})", c.iso_code] },
20
+ {},
21
+ class: "select2 fullwidth", disabled: !f.object.new_record? %>
22
+ <% end %>
23
+ </div>
23
24
 
24
- <div class="three columns" data-hook="admin_product_price_form_country">
25
- <%= f.field_container :country do %>
26
- <%= f.label :country %>
27
- <%= f.field_hint :country %>
28
- <%= f.collection_select :country_iso, available_countries, :iso, :name,
29
- {
30
- include_blank: t(:any_country, scope: [:spree, :admin, :prices]),
31
- selected: Spree::Config.admin_vat_country_iso
32
- },
33
- { class: 'select2 fullwidth', disabled: !f.object.new_record? } %>
34
- <% end %>
35
- </div>
25
+ <div class="col-xs-2" data-hook="admin_product_price_form_country">
26
+ <%= f.field_container :country do %>
27
+ <%= f.label :country %>
28
+ <%= f.field_hint :country %>
29
+ <%= f.collection_select :country_iso, available_countries, :iso, :name,
30
+ {
31
+ include_blank: t(:any_country, scope: [:spree, :admin, :prices]),
32
+ selected: Spree::Config.admin_vat_country_iso
33
+ },
34
+ { class: 'select2 fullwidth', disabled: !f.object.new_record? } %>
35
+ <% end %>
36
+ </div>
36
37
 
37
- <div class="three columns" data-hook="admin_product_price_form_amount">
38
- <%= f.field_container :price do %>
39
- <%= f.label :price %>
40
- <%= f.text_field :price, value: f.object.money.format, class: 'fullwidth title' %>
41
- <% end %>
42
- </div>
43
-
44
- <div class="field three columns checkbox omega" data-hook="is_default_price">
45
- <%= f.label :is_default do %>
46
- <%= f.check_box :is_default %>
47
- <%= Spree::Price.human_attribute_name(:is_default) %>
48
- <% end %>
49
- </div>
38
+ <div class="col-xs-2" data-hook="admin_product_price_form_amount">
39
+ <%= f.field_container :price do %>
40
+ <%= f.label :price %>
41
+ <%= f.text_field :price, value: f.object.money.format, class: 'fullwidth title' %>
42
+ <% end %>
43
+ </div>
50
44
  </div>
45
+
51
46
  </div>
52
47
 
53
48
  <div class="clear"></div>
@@ -0,0 +1,41 @@
1
+ <div class="row">
2
+ <div class="col-xs-12">
3
+ <fieldset class="no-border-bottom <%= "no-border-top" if !variants %>">
4
+ <% if variants %>
5
+ <legend align="center"><%= I18n.t(:master_variant, scope: :spree) %> <%= admin_hint I18n.t(:master_variant, scope: :spree), I18n.t(:master_variant, scope: [:spree, :hints, "spree/price"]) %></legend>
6
+ <% end %>
7
+ <table class="index master_prices">
8
+ <colgroup>
9
+ <col style="width: 30%">
10
+ <col style="width: 30%">
11
+ <col style="width: 20%">
12
+ <col style="width: 20%">
13
+ </colgroup>
14
+ <thead data-hook="master_prices_header">
15
+ <tr>
16
+ <th><%= Spree::Price.human_attribute_name(:country) %></th>
17
+ <th><%= Spree::Price.human_attribute_name(:currency) %></th>
18
+ <th><%= Spree::Price.human_attribute_name(:amount) %></th>
19
+ <th class="actions"></th>
20
+ </tr>
21
+ </thead>
22
+ <% master_prices.each do |price| %>
23
+ <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
24
+ <td><%= price.display_country %></td>
25
+ <td><%= price.currency %></td>
26
+ <td class="align-right"><%= price.money.to_html %></td>
27
+ <td class="actions">
28
+ <% if can?(:update, price) %>
29
+ <%= link_to_edit(price, :no_text => true) unless price.deleted? %>
30
+ <% end %>
31
+ <% if can?(:destroy, price) %>
32
+ &nbsp;
33
+ <%= link_to_delete(price, :no_text => true) unless price.deleted? %>
34
+ <% end %>
35
+ </td>
36
+ </tr>
37
+ <% end %>
38
+ </table>
39
+ </fieldset>
40
+ </div>
41
+ </div>
@@ -1,35 +1,37 @@
1
- <%= paginate prices, theme: "solidus_admin" %>
1
+ <%= paginate variant_prices, theme: "solidus_admin" %>
2
2
 
3
- <table class="index prices">
4
- <thead data-hook="prices_header">
5
- <tr>
6
- <th><%= Spree::Variant.model_name.human %> </th>
7
- <th><%= Spree::Price.human_attribute_name(:country) %></th>
8
- <th><%= Spree::Price.human_attribute_name(:currency) %></th>
9
- <th><%= Spree::Price.human_attribute_name(:amount) %></th>
10
- <th class="actions"></th>
11
- </tr>
12
- </thead>
3
+ <fieldset class="no-border-bottom">
4
+ <legend align="center"><%= I18n.t(:variant_pricing, scope: :spree) %></legend>
5
+ <table class="index prices">
6
+ <thead data-hook="prices_header">
7
+ <tr>
8
+ <th><%= Spree::Variant.model_name.human %> </th>
9
+ <th><%= Spree::Price.human_attribute_name(:country) %></th>
10
+ <th><%= Spree::Price.human_attribute_name(:currency) %></th>
11
+ <th><%= Spree::Price.human_attribute_name(:amount) %></th>
12
+ <th class="actions"></th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ <% variant_prices.each do |price| %>
17
+ <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
18
+ <td><%= price.variant.descriptive_name %></td>
19
+ <td><%= price.display_country %></td>
20
+ <td><%= price.currency %></td>
21
+ <td class="align-right"><%= price.money.to_html %></td>
22
+ <td class="actions">
23
+ <% if can?(:update, price) %>
24
+ <%= link_to_edit(price, :no_text => true) unless price.deleted? %>
25
+ <% end %>
26
+ <% if can?(:destroy, price) %>
27
+ &nbsp;
28
+ <%= link_to_delete(price, :no_text => true) unless price.deleted? %>
29
+ <% end %>
30
+ </td>
31
+ </tr>
32
+ <% end %>
33
+ </tbody>
34
+ </table>
35
+ </fieldset>
13
36
 
14
- <tbody>
15
- <% prices.each do |price| %>
16
- <tr id="<%= spree_dom_id price %>" data-hook="prices_row" class="<%= "deleted" if price.deleted? %> <%= cycle('odd', 'even')%>">
17
- <td><%= price.variant.descriptive_name %></td>
18
- <td><%= price.display_country %>
19
- <td><%= price.currency %></td>
20
- <td class="align-right"><%= price.money.to_html %></td>
21
- <td class="actions">
22
- <% if can?(:update, price) %>
23
- <%= link_to_edit(price, :no_text => true) unless price.deleted? %>
24
- <% end %>
25
- <% if can?(:destroy, price) %>
26
- &nbsp;
27
- <%= link_to_delete(price, :no_text => true) unless price.deleted? %>
28
- <% end %>
29
- </td>
30
- </tr>
31
- <% end %>
32
- </tbody>
33
- </table>
34
-
35
- <%= paginate prices, theme: "solidus_admin" %>
37
+ <%= paginate variant_prices, theme: "solidus_admin" %>
@@ -14,50 +14,51 @@
14
14
  <div data-hook="admin_product_prices_index_search">
15
15
  <%= search_form_for [:admin, :product, @search] do |f| %>
16
16
 
17
- <div class="alpha four columns">
18
- <div class="field" data-hook="sku-select">
19
- <%= label_tag :q_variant_id_eq, Spree::Variant.model_name.human %>
20
- <%= f.select :variant_id_eq,
21
- @product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
22
- {include_blank: true},
23
- class: "select2 fullwidth" %>
17
+ <div class="row">
18
+ <div class="col-xs-4">
19
+ <div class="field" data-hook="sku-select">
20
+ <%= label_tag :q_variant_id_eq, Spree::Variant.model_name.human %>
21
+ <%= f.select :variant_id_eq,
22
+ @product.variants_including_master.map { |v| [v.descriptive_name, v.id] },
23
+ {include_blank: true},
24
+ class: "select2 fullwidth" %>
25
+ </div>
24
26
  </div>
25
- </div>
26
27
 
27
- <div class="three columns">
28
- <div class="field" data-hook="currency-select">
29
- <%= label_tag :q_currency_eq, Spree::Price.human_attribute_name(:currency) %>
30
- <%= f.select :currency_eq,
31
- @prices.map(&:currency).uniq,
32
- {include_blank: true},
33
- class: "select2 fullwidth" %>
28
+ <div class="col-xs-2">
29
+ <div class="field" data-hook="currency-select">
30
+ <%= label_tag :q_currency_eq, Spree::Price.human_attribute_name(:currency) %>
31
+ <%= f.select :currency_eq,
32
+ @prices.map(&:currency).uniq,
33
+ {include_blank: true},
34
+ class: "select2 fullwidth" %>
35
+ </div>
34
36
  </div>
35
- </div>
36
37
 
37
- <div class="three columns">
38
- <div class="field" data-hook="country-select">
39
- <%= label_tag :q_country_iso_eq, Spree::Price.human_attribute_name(:country) %>
40
- <%= f.select :country_iso_eq,
41
- @prices.map(&:country).compact.uniq.map { |c| [c.name, c.iso]},
42
- {include_blank: true},
43
- class: "select2 fullwidth" %>
38
+ <div class="col-xs-2">
39
+ <div class="field" data-hook="country-select">
40
+ <%= label_tag :q_country_iso_eq, Spree::Price.human_attribute_name(:country) %>
41
+ <%= f.select :country_iso_eq,
42
+ @prices.map(&:country).compact.uniq.map { |c| [c.name, c.iso]},
43
+ {include_blank: true},
44
+ class: "select2 fullwidth" %>
45
+ </div>
44
46
  </div>
45
- </div>
46
47
 
47
- <div class="three columns">
48
- <div class="field">
49
- <%= label_tag :q_amount_gt, t(".amount_greater_than") %>
50
- <%= f.text_field :amount_gt %>
48
+ <div class="col-xs-2">
49
+ <div class="field">
50
+ <%= label_tag :q_amount_gt, t(".amount_greater_than") %>
51
+ <%= f.text_field :amount_gt %>
52
+ </div>
51
53
  </div>
52
- </div>
53
54
 
54
- <div class="omega three columns">
55
- <div class="field">
56
- <%= label_tag :q_amount_lt, t(".amount_less_than") %>
57
- <%= f.text_field :amount_lt %>
55
+ <div class="col-xs-2">
56
+ <div class="field">
57
+ <%= label_tag :q_amount_lt, t(".amount_less_than") %>
58
+ <%= f.text_field :amount_lt %>
59
+ </div>
58
60
  </div>
59
61
  </div>
60
-
61
62
  <div class="clearfix"></div>
62
63
 
63
64
  <div class="actions filter-actions">
@@ -70,4 +71,5 @@
70
71
  </div>
71
72
  <% end %>
72
73
 
73
- <%= render 'table', prices: @prices %>
74
+ <%= render 'master_variant_table', master_prices: @master_prices, variants: @product.variants.any? %>
75
+ <%= render 'table', variant_prices: @variant_prices if @product.variants.any? %>
@@ -9,11 +9,6 @@
9
9
  <li>
10
10
  <%= link_to_add_fields Spree.t(:add_product_properties), 'tbody#product_properties', :class => 'plus button' %>
11
11
  </li>
12
- <li>
13
- <span id="new_ptype_link">
14
- <%= link_to Spree.t(:select_from_prototype), available_admin_prototypes_url, :remote => true, :class => 'button fa fa-copy' %>
15
- </span>
16
- </li>
17
12
  </ul>
18
13
  <% end %>
19
14
  <% end %>
@@ -23,8 +18,6 @@
23
18
  <legend align="center"><%= plural_resource_name(Spree::ProductProperty) %></legend>
24
19
  <div class="add_product_properties" data-hook="add_product_properties"></div>
25
20
 
26
- <div id="prototypes" data-hook></div>
27
-
28
21
  <table class="index sortable" data-hook data-sortable-link="<%= update_positions_admin_product_product_properties_url %>">
29
22
  <thead>
30
23
  <tr data-hook="product_properties_header">