spree_backend 4.1.15 → 4.2.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/backend-add.svg +5 -0
  3. data/app/assets/images/backend-adjust.svg +5 -0
  4. data/app/assets/images/backend-approve.svg +3 -0
  5. data/app/assets/images/backend-arrow-down.svg +1 -0
  6. data/app/assets/images/backend-arrow-left.svg +1 -0
  7. data/app/assets/images/backend-arrow-right.svg +1 -0
  8. data/app/assets/images/backend-arrow-up.svg +1 -0
  9. data/app/assets/images/backend-calendar.svg +9 -0
  10. data/app/assets/images/backend-cancel.svg +7 -0
  11. data/app/assets/images/backend-capture.svg +3 -0
  12. data/app/assets/images/backend-cart.svg +1 -0
  13. data/app/assets/images/backend-chevron-down.svg +1 -0
  14. data/app/assets/images/backend-chevron-left.svg +1 -0
  15. data/app/assets/images/backend-chevron-right.svg +1 -0
  16. data/app/assets/images/backend-chevron-up.svg +1 -0
  17. data/app/assets/images/backend-clone.svg +7 -0
  18. data/app/assets/images/backend-close.svg +7 -0
  19. data/app/assets/images/backend-delete.svg +6 -0
  20. data/app/assets/images/backend-double-chevron-left.svg +15 -0
  21. data/app/assets/images/backend-double-chevron-right.svg +17 -0
  22. data/app/assets/images/backend-edit.svg +14 -0
  23. data/app/assets/images/backend-enter.svg +6 -0
  24. data/app/assets/images/backend-envelope.svg +3 -0
  25. data/app/assets/images/backend-exit.svg +13 -0
  26. data/app/assets/images/backend-extensions.svg +4 -0
  27. data/app/assets/images/backend-eye-open.svg +8 -0
  28. data/app/assets/images/backend-file.svg +6 -0
  29. data/app/assets/images/backend-filter.svg +3 -0
  30. data/app/assets/images/backend-folder.svg +4 -0
  31. data/app/assets/images/backend-images.svg +7 -0
  32. data/app/assets/images/backend-info.svg +7 -0
  33. data/app/assets/images/backend-items.svg +5 -0
  34. data/app/assets/images/backend-leaf.svg +7 -0
  35. data/app/assets/images/backend-list.svg +5 -0
  36. data/app/assets/images/backend-location.svg +4 -0
  37. data/app/assets/images/backend-menu.svg +5 -0
  38. data/app/assets/images/backend-money.svg +1 -0
  39. data/app/assets/images/backend-move.svg +5 -0
  40. data/app/assets/images/backend-ok.svg +3 -0
  41. data/app/assets/images/backend-pagination-double-arrow-right.svg +8 -0
  42. data/app/assets/images/backend-payments.svg +8 -0
  43. data/app/assets/images/backend-pencil.svg +1 -0
  44. data/app/assets/images/backend-products.svg +5 -0
  45. data/app/assets/images/backend-promotion.svg +8 -0
  46. data/app/assets/images/backend-recycle.svg +5 -0
  47. data/app/assets/images/backend-remove.svg +6 -0
  48. data/app/assets/images/backend-report.svg +6 -0
  49. data/app/assets/images/backend-resume.svg +5 -0
  50. data/app/assets/images/backend-returns.svg +3 -0
  51. data/app/assets/images/backend-save.svg +3 -0
  52. data/app/assets/images/backend-search.svg +1 -0
  53. data/app/assets/images/backend-settings.svg +6 -0
  54. data/app/assets/images/backend-shipping.svg +3 -0
  55. data/app/assets/images/backend-slack.svg +3 -0
  56. data/app/assets/images/backend-sort.svg +5 -0
  57. data/app/assets/images/backend-split.svg +3 -0
  58. data/app/assets/images/backend-store.svg +14 -0
  59. data/app/assets/images/backend-tick.svg +3 -0
  60. data/app/assets/images/backend-update.svg +3 -0
  61. data/app/assets/images/backend-user.svg +3 -0
  62. data/app/assets/images/backend-users.svg +6 -0
  63. data/app/assets/images/backend-view.svg +8 -0
  64. data/app/assets/images/backend-void.svg +7 -0
  65. data/app/assets/javascripts/spree/backend/admin.js +156 -147
  66. data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -0
  67. data/app/assets/javascripts/spree/backend/flatpickr_locals.js +37 -0
  68. data/app/assets/javascripts/spree/backend/multi_currency.js +38 -0
  69. data/app/assets/javascripts/spree/backend/payments/edit.js +4 -3
  70. data/app/assets/javascripts/spree/backend/payments/new.js +18 -18
  71. data/app/assets/javascripts/spree/backend/promotions.js +1 -1
  72. data/app/assets/javascripts/spree/backend/spree-select2.js +18 -4
  73. data/app/assets/javascripts/spree/backend/stock_management.js +2 -1
  74. data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +4 -4
  75. data/app/assets/javascripts/spree/backend/taxonomy.js +8 -1
  76. data/app/assets/javascripts/spree/backend/taxons.js +25 -16
  77. data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
  78. data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
  79. data/app/assets/javascripts/spree/backend/variant_management.js +2 -1
  80. data/app/assets/javascripts/spree/backend.js +5 -2
  81. data/app/assets/stylesheets/spree/backend/components/_buttons.scss +27 -11
  82. data/app/assets/stylesheets/spree/backend/components/_filters.scss +35 -5
  83. data/app/assets/stylesheets/spree/backend/components/_icons.scss +39 -4
  84. data/app/assets/stylesheets/spree/backend/components/_main.scss +32 -6
  85. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +16 -8
  86. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +119 -55
  87. data/app/assets/stylesheets/spree/backend/components/_tables.scss +62 -19
  88. data/app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss +26 -63
  89. data/app/assets/stylesheets/spree/backend/global/_variables.scss +5 -1
  90. data/app/assets/stylesheets/spree/backend/plugins/_flatpickr.scss +95 -0
  91. data/app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss +0 -117
  92. data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +73 -24
  93. data/app/assets/stylesheets/spree/backend/shared/_base.scss +40 -0
  94. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +38 -0
  95. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
  96. data/app/assets/stylesheets/spree/backend/views/_order_payments.scss +12 -0
  97. data/app/assets/stylesheets/spree/backend/views/_product_properties.scss +11 -0
  98. data/app/assets/stylesheets/spree/backend/views/prototypes.scss +42 -0
  99. data/app/assets/stylesheets/spree/backend.css +1 -1
  100. data/app/controllers/spree/admin/general_settings_controller.rb +27 -0
  101. data/app/controllers/spree/admin/prices_controller.rb +39 -0
  102. data/app/controllers/spree/admin/stock_transfers_controller.rb +8 -1
  103. data/app/controllers/spree/admin/stores_controller.rb +61 -1
  104. data/app/controllers/spree/admin/taxons_controller.rb +5 -1
  105. data/app/helpers/spree/admin/base_helper.rb +25 -8
  106. data/app/helpers/spree/admin/navigation_helper.rb +50 -19
  107. data/app/helpers/spree/admin/orders_helper.rb +3 -3
  108. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_first_page.html.erb +1 -1
  109. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_gap.html.erb +1 -1
  110. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_last_page.html.erb +1 -1
  111. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_next_page.html.erb +1 -1
  112. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_page.html.erb +0 -0
  113. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_paginator.html.erb +1 -1
  114. data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_prev_page.html.erb +1 -1
  115. data/app/views/spree/admin/adjustments/_adjustment.html.erb +2 -2
  116. data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +16 -16
  117. data/app/views/spree/admin/adjustments/edit.html.erb +2 -2
  118. data/app/views/spree/admin/adjustments/index.html.erb +3 -3
  119. data/app/views/spree/admin/adjustments/new.html.erb +1 -1
  120. data/app/views/spree/admin/countries/_form.html.erb +9 -4
  121. data/app/views/spree/admin/countries/index.html.erb +27 -24
  122. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +37 -35
  123. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +2 -0
  124. data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +45 -43
  125. data/app/views/spree/admin/customer_returns/index.html.erb +3 -1
  126. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  127. data/app/views/spree/admin/general_settings/_form.html.erb +27 -0
  128. data/app/views/spree/admin/general_settings/edit.html.erb +4 -3
  129. data/app/views/spree/admin/images/edit.html.erb +2 -2
  130. data/app/views/spree/admin/images/index.html.erb +7 -7
  131. data/app/views/spree/admin/images/new.html.erb +2 -2
  132. data/app/views/spree/admin/log_entries/index.html.erb +4 -3
  133. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
  134. data/app/views/spree/admin/option_types/edit.html.erb +22 -20
  135. data/app/views/spree/admin/option_types/index.html.erb +27 -25
  136. data/app/views/spree/admin/orders/_adjustments.html.erb +26 -26
  137. data/app/views/spree/admin/orders/_line_items.html.erb +7 -7
  138. data/app/views/spree/admin/orders/_order_actions.html.erb +1 -1
  139. data/app/views/spree/admin/orders/_risk_analysis.html.erb +44 -42
  140. data/app/views/spree/admin/orders/_shipment.html.erb +6 -6
  141. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +5 -5
  142. data/app/views/spree/admin/orders/_store_form.html.erb +3 -3
  143. data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
  144. data/app/views/spree/admin/orders/index.html.erb +135 -127
  145. data/app/views/spree/admin/payment_methods/index.html.erb +6 -4
  146. data/app/views/spree/admin/payments/_capture_events.html.erb +18 -16
  147. data/app/views/spree/admin/payments/_form.html.erb +1 -1
  148. data/app/views/spree/admin/payments/_list.html.erb +39 -37
  149. data/app/views/spree/admin/payments/index.html.erb +2 -3
  150. data/app/views/spree/admin/payments/new.html.erb +1 -1
  151. data/app/views/spree/admin/payments/show.html.erb +1 -1
  152. data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +30 -30
  153. data/app/views/spree/admin/payments/source_views/_gateway.html.erb +20 -18
  154. data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +28 -26
  155. data/app/views/spree/admin/prices/_variant_prices.html.erb +43 -0
  156. data/app/views/spree/admin/prices/index.html.erb +21 -0
  157. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +16 -4
  158. data/app/views/spree/admin/product_properties/index.html.erb +24 -19
  159. data/app/views/spree/admin/products/_add_stock_form.html.erb +1 -1
  160. data/app/views/spree/admin/products/_autocomplete.js.erb +27 -21
  161. data/app/views/spree/admin/products/_form.html.erb +40 -9
  162. data/app/views/spree/admin/products/edit.html.erb +1 -1
  163. data/app/views/spree/admin/products/index.html.erb +24 -19
  164. data/app/views/spree/admin/products/new.html.erb +11 -2
  165. data/app/views/spree/admin/products/stock.html.erb +3 -3
  166. data/app/views/spree/admin/promotion_categories/index.html.erb +4 -1
  167. data/app/views/spree/admin/promotions/_actions.html.erb +2 -2
  168. data/app/views/spree/admin/promotions/_form.html.erb +44 -17
  169. data/app/views/spree/admin/promotions/_promotion_action.html.erb +1 -1
  170. data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
  171. data/app/views/spree/admin/promotions/_rules.html.erb +4 -4
  172. data/app/views/spree/admin/promotions/edit.html.erb +2 -2
  173. data/app/views/spree/admin/promotions/index.html.erb +5 -3
  174. data/app/views/spree/admin/promotions/new.html.erb +7 -6
  175. data/app/views/spree/admin/promotions/rules/_country.html.erb +1 -1
  176. data/app/views/spree/admin/promotions/rules/_item_total.html.erb +5 -5
  177. data/app/views/spree/admin/promotions/rules/_option_value.html.erb +6 -13
  178. data/app/views/spree/admin/promotions/rules/_product.html.erb +1 -1
  179. data/app/views/spree/admin/promotions/rules/_taxon.html.erb +1 -1
  180. data/app/views/spree/admin/properties/index.html.erb +5 -3
  181. data/app/views/spree/admin/prototypes/_prototypes.html.erb +30 -28
  182. data/app/views/spree/admin/prototypes/index.html.erb +21 -19
  183. data/app/views/spree/admin/prototypes/show.html.erb +21 -8
  184. data/app/views/spree/admin/refunds/edit.html.erb +2 -2
  185. data/app/views/spree/admin/refunds/new.html.erb +2 -2
  186. data/app/views/spree/admin/reimbursement_types/_form.html.erb +4 -4
  187. data/app/views/spree/admin/reimbursement_types/index.html.erb +4 -2
  188. data/app/views/spree/admin/reimbursements/edit.html.erb +66 -63
  189. data/app/views/spree/admin/reimbursements/index.html.erb +21 -20
  190. data/app/views/spree/admin/reimbursements/show.html.erb +66 -60
  191. data/app/views/spree/admin/reports/index.html.erb +18 -17
  192. data/app/views/spree/admin/reports/sales_total.html.erb +20 -19
  193. data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -2
  194. data/app/views/spree/admin/return_authorizations/edit.html.erb +3 -3
  195. data/app/views/spree/admin/return_authorizations/index.html.erb +3 -1
  196. data/app/views/spree/admin/return_authorizations/new.html.erb +2 -2
  197. data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -4
  198. data/app/views/spree/admin/return_index/return_authorizations.html.erb +4 -4
  199. data/app/views/spree/admin/roles/index.html.erb +21 -19
  200. data/app/views/spree/admin/shared/_account_nav.html.erb +51 -65
  201. data/app/views/spree/admin/shared/_address_form.html.erb +31 -73
  202. data/app/views/spree/admin/shared/_cal_close.html.erb +10 -0
  203. data/app/views/spree/admin/shared/_content_header.html.erb +40 -21
  204. data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
  205. data/app/views/spree/admin/shared/_header.html.erb +14 -11
  206. data/app/views/spree/admin/shared/_index_table_options.html.erb +5 -7
  207. data/app/views/spree/admin/shared/_main_menu.html.erb +25 -14
  208. data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
  209. data/app/views/spree/admin/shared/_order_summary.html.erb +2 -0
  210. data/app/views/spree/admin/shared/_order_tabs.html.erb +9 -9
  211. data/app/views/spree/admin/shared/_product_tabs.html.erb +13 -5
  212. data/app/views/spree/admin/shared/_refunds.html.erb +31 -29
  213. data/app/views/spree/admin/shared/_report_order_criteria.html.erb +27 -6
  214. data/app/views/spree/admin/shared/_sidebar.html.erb +19 -1
  215. data/app/views/spree/admin/shared/_table_filter.html.erb +3 -3
  216. data/app/views/spree/admin/shared/_translations.html.erb +33 -1
  217. data/app/views/spree/admin/shared/_version.html.erb +1 -1
  218. data/app/views/spree/admin/shared/named_types/_index.html.erb +3 -1
  219. data/app/views/spree/admin/shipping_categories/index.html.erb +3 -1
  220. data/app/views/spree/admin/shipping_methods/index.html.erb +3 -1
  221. data/app/views/spree/admin/state_changes/index.html.erb +5 -2
  222. data/app/views/spree/admin/states/_state_list.html.erb +25 -24
  223. data/app/views/spree/admin/states/index.html.erb +1 -1
  224. data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +2 -2
  225. data/app/views/spree/admin/stock_locations/index.html.erb +3 -1
  226. data/app/views/spree/admin/stock_movements/index.html.erb +28 -26
  227. data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +20 -18
  228. data/app/views/spree/admin/stock_transfers/index.html.erb +6 -4
  229. data/app/views/spree/admin/stock_transfers/new.html.erb +3 -3
  230. data/app/views/spree/admin/stock_transfers/show.html.erb +3 -3
  231. data/app/views/spree/admin/store_credit_categories/index.html.erb +3 -1
  232. data/app/views/spree/admin/store_credits/index.html.erb +3 -1
  233. data/app/views/spree/admin/stores/_form.html.erb +128 -68
  234. data/app/views/spree/admin/stores/edit.html.erb +1 -1
  235. data/app/views/spree/admin/stores/index.html.erb +4 -2
  236. data/app/views/spree/admin/tax_categories/index.html.erb +29 -27
  237. data/app/views/spree/admin/tax_rates/index.html.erb +3 -1
  238. data/app/views/spree/admin/taxonomies/_list.html.erb +24 -22
  239. data/app/views/spree/admin/taxonomies/edit.html.erb +2 -2
  240. data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
  241. data/app/views/spree/admin/taxons/_form.html.erb +3 -3
  242. data/app/views/spree/admin/taxons/_taxon_table.html.erb +24 -22
  243. data/app/views/spree/admin/taxons/edit.html.erb +6 -2
  244. data/app/views/spree/admin/taxons/index.html.erb +1 -1
  245. data/app/views/spree/admin/users/_lifetime_stats.html.erb +24 -23
  246. data/app/views/spree/admin/users/_sidebar.html.erb +5 -5
  247. data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
  248. data/app/views/spree/admin/users/edit.html.erb +2 -2
  249. data/app/views/spree/admin/users/index.html.erb +25 -23
  250. data/app/views/spree/admin/users/items.html.erb +3 -2
  251. data/app/views/spree/admin/users/orders.html.erb +30 -29
  252. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +3 -3
  253. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +2 -2
  254. data/app/views/spree/admin/variants/_form.html.erb +14 -2
  255. data/app/views/spree/admin/variants/_split.js.erb +2 -2
  256. data/app/views/spree/admin/variants/index.html.erb +7 -5
  257. data/app/views/spree/admin/zones/index.html.erb +4 -4
  258. data/app/views/spree/layouts/admin.html.erb +33 -27
  259. data/config/initializers/ransack.rb +31 -0
  260. data/config/routes.rb +1 -0
  261. data/lib/spree/backend.rb +2 -0
  262. data/lib/spree_backend.rb +0 -1
  263. data/spec/fixtures/thinking-cat.jpg +0 -0
  264. data/spree_backend.gemspec +6 -4
  265. data/vendor/assets/javascripts/js.cookie.js +154 -156
  266. data/vendor/assets/javascripts/purify.js +1217 -0
  267. data/vendor/assets/javascripts/sortable.js +3709 -0
  268. data/vendor/assets/stylesheets/animate.css +7 -3156
  269. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +23 -9
  270. metadata +138 -25
@@ -3,10 +3,11 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <%= button_link_to Spree.t(:new_reimbursement_type), new_object_url, { :class => "btn-success", :icon => 'add', :id => 'admin_new_reimbursement_type' } %>
6
+ <%= button_link_to Spree.t(:new_reimbursement_type), new_object_url, { :class => "btn-success", :icon => 'add.svg', :id => 'admin_new_reimbursement_type' } %>
7
7
  <% end if can?(:create, Spree::ReimbursementType) %>
8
8
 
9
9
  <% if @reimbursement_types.any? %>
10
+ <div class="table-responsive">
10
11
  <table class="table" id='listing_reimbursement_types' data-hook>
11
12
  <thead>
12
13
  <tr data-hook="reimbursement_types_header">
@@ -22,7 +23,7 @@
22
23
  <%= reimbursement_type.name.humanize %>
23
24
  </td>
24
25
  <td>
25
- <%= reimbursement_type.type %>
26
+ <%= reimbursement_type.type.split('::', 3).last %>
26
27
  </td>
27
28
  <td class="actions actions-2 text-right">
28
29
  <%= link_to_edit reimbursement_type, no_text: true, class: 'edit' if can?(:edit, reimbursement_type) %>
@@ -32,6 +33,7 @@
32
33
  <% end %>
33
34
  </tbody>
34
35
  </table>
36
+ </div>
35
37
  <% else %>
36
38
  <div class="alert alert-info no-objects-found">
37
39
  <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::ReimbursementType)) %>
@@ -9,52 +9,54 @@
9
9
  <%= form_for [:admin, @order, @reimbursement] do |f| %>
10
10
  <fieldset class='no-border-bottom'>
11
11
  <legend><%= Spree.t(:items_to_be_reimbursed) %></legend>
12
- <table class="table table-condensed table-bordered reimbursement-return-items-table">
13
- <thead>
14
- <tr>
15
- <th><%= Spree.t(:product) %></th>
16
- <th><%= Spree.t(:preferred_reimbursement_type) %></th>
17
- <th><%= Spree.t(:reimbursement_type_override) %></th>
18
- <th><%= Spree.t(:pre_tax_refund_amount) %></th>
19
- <th><%= Spree.t(:total) %></th>
20
- <th><%= Spree.t(:exchange_for) %></th>
21
- </tr>
22
- </thead>
23
- <tbody>
24
- <%= f.fields_for :return_items, @reimbursement.return_items.sort_by(&:id) do |item_fields| %>
25
- <% return_item = item_fields.object %>
12
+ <div class="table-responsive">
13
+ <table class="table table-condensed table-bordered reimbursement-return-items-table">
14
+ <thead>
26
15
  <tr>
27
- <td>
28
- <div class="variant-name"><%= return_item.inventory_unit.variant.name %></div>
29
- <div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
30
- </td>
31
- <td>
32
- <%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
33
- </td>
34
- <td>
35
- <%= item_fields.select(:override_reimbursement_type_id,
36
- reimbursement_types.collect { |r| [r.name.humanize, r.id] },
37
- {include_blank: true},
38
- {class: 'select2'}
39
- ) %>
40
- </td>
41
- <td>
42
- <%= item_fields.text_field :pre_tax_amount, { class: 'refund-amount-input form-control' } %>
43
- </td>
44
- <td>
45
- <%= return_item.display_total %>
46
- </td>
47
- <td>
48
- <% if return_item.exchange_processed? %>
49
- <%= return_item.exchange_variant.exchange_name %>
50
- <% else %>
51
- <%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants, :id, :exchange_name, { include_blank: true }, { class: "select2 return-item-exchange-selection" } %>
52
- <% end %>
53
- </td>
16
+ <th><%= Spree.t(:product) %></th>
17
+ <th><%= Spree.t(:preferred_reimbursement_type) %></th>
18
+ <th><%= Spree.t(:reimbursement_type_override) %></th>
19
+ <th><%= Spree.t(:pre_tax_refund_amount) %></th>
20
+ <th><%= Spree.t(:total) %></th>
21
+ <th><%= Spree.t(:exchange_for) %></th>
54
22
  </tr>
55
- <% end %>
56
- </tbody>
57
- </table>
23
+ </thead>
24
+ <tbody>
25
+ <%= f.fields_for :return_items, @reimbursement.return_items.sort_by(&:id) do |item_fields| %>
26
+ <% return_item = item_fields.object %>
27
+ <tr>
28
+ <td>
29
+ <div class="variant-name"><%= return_item.inventory_unit.variant.name %></div>
30
+ <div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
31
+ </td>
32
+ <td>
33
+ <%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
34
+ </td>
35
+ <td>
36
+ <%= item_fields.select(:override_reimbursement_type_id,
37
+ reimbursement_types.collect { |r| [r.name.humanize, r.id] },
38
+ {include_blank: true},
39
+ {class: 'select2'}
40
+ ) %>
41
+ </td>
42
+ <td>
43
+ <%= item_fields.text_field :pre_tax_amount, { class: 'refund-amount-input form-control' } %>
44
+ </td>
45
+ <td>
46
+ <%= return_item.display_total %>
47
+ </td>
48
+ <td>
49
+ <% if return_item.exchange_processed? %>
50
+ <%= return_item.exchange_variant.exchange_name %>
51
+ <% else %>
52
+ <%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants, :id, :exchange_name, { include_blank: true }, { class: "select2 return-item-exchange-selection" } %>
53
+ <% end %>
54
+ </td>
55
+ </tr>
56
+ <% end %>
57
+ </tbody>
58
+ </table>
59
+ </div>
58
60
  </fieldset>
59
61
 
60
62
  <div class="form-actions filter-actions actions" data-hook="buttons">
@@ -64,25 +66,26 @@
64
66
 
65
67
  <fieldset class="margint">
66
68
  <legend><%= Spree.t(:calculated_reimbursements) %></legend>
67
- <table class="table table-condensed table-bordered">
68
- <thead data-hook="customer_return_header">
69
- <tr>
70
- <th><%= Spree.t(:reimbursement_type) %></th>
71
- <th><%= Spree.t(:description) %></th>
72
- <th><%= Spree.t(:amount) %></th>
73
- </tr>
74
- </thead>
75
- <tbody>
76
- <% @reimbursement_objects.each do |reimbursement_object| %>
77
- <tr data-hook="reimbursement_reimbursement_object_row">
78
- <td><%= reimbursement_object.class.name.demodulize %></td>
79
- <td><%= reimbursement_object.description %></td>
80
- <td><%= reimbursement_object.display_amount %></td>
69
+ <div class="table-responsive">
70
+ <table class="table table-condensed table-bordered">
71
+ <thead data-hook="customer_return_header">
72
+ <tr>
73
+ <th><%= Spree.t(:reimbursement_type) %></th>
74
+ <th><%= Spree.t(:description) %></th>
75
+ <th><%= Spree.t(:amount) %></th>
81
76
  </tr>
82
- <% end %>
83
- </tbody>
84
- </table>
85
-
77
+ </thead>
78
+ <tbody>
79
+ <% @reimbursement_objects.each do |reimbursement_object| %>
80
+ <tr data-hook="reimbursement_reimbursement_object_row">
81
+ <td><%= reimbursement_object.class.name.demodulize %></td>
82
+ <td><%= reimbursement_object.description %></td>
83
+ <td><%= reimbursement_object.display_amount %></td>
84
+ </tr>
85
+ <% end %>
86
+ </tbody>
87
+ </table>
88
+ </div>
86
89
  <% if @order.has_non_reimbursement_related_refunds? %>
87
90
  <div class="alert alert-danger">
88
91
  <%= "#{Spree.t('note')}: #{Spree.t('this_order_has_already_received_a_refund')}. #{Spree.t('make_sure_the_above_reimbursement_amount_is_correct')}." %>
@@ -96,7 +99,7 @@
96
99
  <%= Spree.t(:reimburse) %>
97
100
  <% end %>
98
101
  <span class="or"><%= Spree.t(:or) %></span>
99
- <%= button_link_to Spree.t('actions.cancel'), url_for([:edit, :admin, @order, @reimbursement.customer_return]), icon: 'remove-sign' %>
102
+ <%= button_link_to Spree.t('actions.cancel'), url_for([:edit, :admin, @order, @reimbursement.customer_return]), icon: 'cancel' %>
100
103
  <% end %>
101
104
  </div>
102
105
  </fieldset>
@@ -5,24 +5,25 @@
5
5
  <% end %>
6
6
 
7
7
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @customer_return } %>
8
-
9
- <table class="table">
10
- <thead data-hook="customer_return_header">
11
- <tr>
12
- <th><%= Spree.t(:id) %></th>
13
- <th><%= Spree.t(:total) %></th>
14
- <th><%= Spree.t(:status) %></th>
15
- <th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
16
- </tr>
17
- </thead>
18
- <tbody>
19
- <% @reimbursements.each do |reimbursement| %>
20
- <tr id="<%= spree_dom_id(reimbursement) %>" data-hook="reimbursement_row">
21
- <td><%= reimbursement.id %></td>
22
- <td><%= reimbursement.total %></td>
23
- <td><%= reimbursement.reimbursement_status %></td>
24
- <td><%= pretty_time(reimbursement.created_at) %></td>
8
+ <div class="table-responsive">
9
+ <table class="table">
10
+ <thead data-hook="customer_return_header">
11
+ <tr>
12
+ <th><%= Spree.t(:id) %></th>
13
+ <th><%= Spree.t(:total) %></th>
14
+ <th><%= Spree.t(:status) %></th>
15
+ <th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
25
16
  </tr>
26
- <% end %>
27
- </tbody>
28
- </table>
17
+ </thead>
18
+ <tbody>
19
+ <% @reimbursements.each do |reimbursement| %>
20
+ <tr id="<%= spree_dom_id(reimbursement) %>" data-hook="reimbursement_row">
21
+ <td><%= reimbursement.id %></td>
22
+ <td><%= reimbursement.total %></td>
23
+ <td><%= reimbursement.reimbursement_status %></td>
24
+ <td><%= pretty_time(reimbursement.created_at) %></td>
25
+ </tr>
26
+ <% end %>
27
+ </tbody>
28
+ </table>
29
+ </div>
@@ -8,68 +8,50 @@
8
8
 
9
9
  <fieldset class='no-border-bottom'>
10
10
  <legend><%= Spree.t(:items_reimbursed) %></legend>
11
- <table class="table table-condensed table-bordered reimbursement-reimbursement-items-table">
12
- <thead>
13
- <tr>
14
- <th><%= Spree.t(:product) %></th>
15
- <th><%= Spree.t(:preferred_reimbursement_type) %></th>
16
- <th><%= Spree.t(:reimbursement_type_override) %></th>
17
- <th><%= Spree.t(:exchange_for) %></th>
18
- <th><%= Spree.t(:pre_tax_amount) %></th>
19
- <th><%= Spree.t(:total) %></th>
20
- </tr>
21
- </thead>
22
- <tbody>
23
- <% @reimbursement.return_items.each do |return_item| %>
11
+ <div class="table-responsive">
12
+ <table class="table table-condensed table-bordered reimbursement-reimbursement-items-table">
13
+ <thead>
24
14
  <tr>
25
- <td>
26
- <div class="variant-name"><%= return_item.inventory_unit.variant.name %></div>
27
- <div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
28
- </td>
29
- <td>
30
- <%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
31
- </td>
32
- <td>
33
- <%= reimbursement_type_name(return_item.override_reimbursement_type) %>
34
- </td>
35
- <td>
36
- <%= return_item.exchange_variant.try(:exchange_name) %>
37
- </td>
38
- <td>
39
- <%= return_item.display_pre_tax_amount %>
40
- </td>
41
- <td>
42
- <%= return_item.display_total %>
43
- </td>
15
+ <th><%= Spree.t(:product) %></th>
16
+ <th><%= Spree.t(:preferred_reimbursement_type) %></th>
17
+ <th><%= Spree.t(:reimbursement_type_override) %></th>
18
+ <th><%= Spree.t(:exchange_for) %></th>
19
+ <th><%= Spree.t(:pre_tax_amount) %></th>
20
+ <th><%= Spree.t(:total) %></th>
44
21
  </tr>
45
- <% end %>
46
- </tbody>
47
- </table>
22
+ </thead>
23
+ <tbody>
24
+ <% @reimbursement.return_items.each do |return_item| %>
25
+ <tr>
26
+ <td>
27
+ <div class="variant-name"><%= return_item.inventory_unit.variant.name %></div>
28
+ <div class="variant-options"><%= return_item.inventory_unit.variant.options_text %></div>
29
+ </td>
30
+ <td>
31
+ <%= reimbursement_type_name(return_item.preferred_reimbursement_type) %>
32
+ </td>
33
+ <td>
34
+ <%= reimbursement_type_name(return_item.override_reimbursement_type) %>
35
+ </td>
36
+ <td>
37
+ <%= return_item.exchange_variant.try(:exchange_name) %>
38
+ </td>
39
+ <td>
40
+ <%= return_item.display_pre_tax_amount %>
41
+ </td>
42
+ <td>
43
+ <%= return_item.display_total %>
44
+ </td>
45
+ </tr>
46
+ <% end %>
47
+ </tbody>
48
+ </table>
49
+ </div>
48
50
  </fieldset>
49
51
 
50
52
  <fieldset>
51
53
  <legend><%= Spree.t(:refunds) %></legend>
52
- <table class="table table-condensed table-bordered">
53
- <thead data-hook="customer_return_header">
54
- <tr>
55
- <th><%= Spree.t(:description) %></th>
56
- <th><%= Spree.t(:amount) %></th>
57
- </tr>
58
- </thead>
59
- <tbody>
60
- <% @reimbursement.refunds.each do |refund| %>
61
- <tr id="<%= spree_dom_id(refund) %>" data-hook="reimbursement_refund_row">
62
- <td><%= refund.description %></td>
63
- <td><%= refund.display_amount %></td>
64
- </tr>
65
- <% end %>
66
- </tbody>
67
- </table>
68
- </fieldset>
69
-
70
- <% if @reimbursement.credits.any? %>
71
- <fieldset>
72
- <legend><%= Spree.t(:credits) %></legend>
54
+ <div class="table-responsive">
73
55
  <table class="table table-condensed table-bordered">
74
56
  <thead data-hook="customer_return_header">
75
57
  <tr>
@@ -78,13 +60,37 @@
78
60
  </tr>
79
61
  </thead>
80
62
  <tbody>
81
- <% @reimbursement.credits.each do |credit| %>
82
- <tr id="<%= spree_dom_id(credit) %>" data-hook="reimbursement_refund_row">
83
- <td><%= credit.description %></td>
84
- <td><%= credit.display_amount %></td>
63
+ <% @reimbursement.refunds.each do |refund| %>
64
+ <tr id="<%= spree_dom_id(refund) %>" data-hook="reimbursement_refund_row">
65
+ <td><%= refund.description %></td>
66
+ <td><%= refund.display_amount %></td>
85
67
  </tr>
86
68
  <% end %>
87
69
  </tbody>
88
70
  </table>
71
+ </div>
72
+ </fieldset>
73
+
74
+ <% if @reimbursement.credits.any? %>
75
+ <fieldset>
76
+ <legend><%= Spree.t(:credits) %></legend>
77
+ <div class="table-responsive">
78
+ <table class="table table-condensed table-bordered">
79
+ <thead data-hook="customer_return_header">
80
+ <tr>
81
+ <th><%= Spree.t(:description) %></th>
82
+ <th><%= Spree.t(:amount) %></th>
83
+ </tr>
84
+ </thead>
85
+ <tbody>
86
+ <% @reimbursement.credits.each do |credit| %>
87
+ <tr id="<%= spree_dom_id(credit) %>" data-hook="reimbursement_refund_row">
88
+ <td><%= credit.description %></td>
89
+ <td><%= credit.display_amount %></td>
90
+ </tr>
91
+ <% end %>
92
+ </tbody>
93
+ </table>
94
+ </div>
89
95
  </fieldset>
90
96
  <% end %>
@@ -1,20 +1,21 @@
1
1
  <% content_for :page_title do %>
2
2
  <%= Spree.t(:reports) %>
3
3
  <% end %>
4
-
5
- <table class="table">
6
- <thead>
7
- <tr data-hook="reports_header">
8
- <th><%= Spree.t(:name) %></th>
9
- <th><%= Spree.t(:description) %></th>
10
- </tr>
11
- </thead>
12
- <tbody>
13
- <% @reports.each do |key, value| %>
14
- <tr data-hook="reports_row">
15
- <td><%= link_to value[:name], send("#{key}_admin_reports_url".to_sym) %></td>
16
- <td><%= value[:description] %></td>
17
- </tr>
18
- <% end %>
19
- </tbody>
20
- </table>
4
+ <div class="table-responsive">
5
+ <table class="table">
6
+ <thead>
7
+ <tr data-hook="reports_header">
8
+ <th><%= Spree.t(:name) %></th>
9
+ <th><%= Spree.t(:description) %></th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <% @reports.each do |key, value| %>
14
+ <tr data-hook="reports_row">
15
+ <td><%= link_to value[:name], send("#{key}_admin_reports_url".to_sym) %></td>
16
+ <td><%= value[:description] %></td>
17
+ </tr>
18
+ <% end %>
19
+ </tbody>
20
+ </table>
21
+ </div>
@@ -8,24 +8,25 @@
8
8
  <%= render partial: 'spree/admin/shared/report_order_criteria' %>
9
9
  </div>
10
10
  </div>
11
-
12
- <table class="table table-bordered admin-report" data-hook="sales_total">
13
- <thead>
14
- <tr>
15
- <th><%= Spree.t(:currency) %></th>
16
- <th><%= Spree.t(:item_total) %></th>
17
- <th><%= Spree.t(:adjustment_total) %></th>
18
- <th><%= Spree.t(:sales_total) %></th>
19
- </tr>
20
- </thead>
21
- <tbody>
22
- <% @totals.each do |key, row| %>
11
+ <div class="table-responsive">
12
+ <table class="table table-bordered admin-report" data-hook="sales_total">
13
+ <thead>
23
14
  <tr>
24
- <td><%= key %></td>
25
- <td><%= Spree::Money.new(row[:item_total], { currency: key }) %></td>
26
- <td><%= Spree::Money.new(row[:adjustment_total], { currency: key }) %></td>
27
- <td><%= Spree::Money.new(row[:sales_total], { currency: key }) %></td>
15
+ <th><%= Spree.t(:currency) %></th>
16
+ <th><%= Spree.t(:item_total) %></th>
17
+ <th><%= Spree.t(:adjustment_total) %></th>
18
+ <th><%= Spree.t(:sales_total) %></th>
28
19
  </tr>
29
- <% end %>
30
- </tbody>
31
- </table>
20
+ </thead>
21
+ <tbody>
22
+ <% @totals.each do |key, row| %>
23
+ <tr>
24
+ <td><%= key %></td>
25
+ <td><%= Spree::Money.new(row[:item_total], { currency: key }) %></td>
26
+ <td><%= Spree::Money.new(row[:adjustment_total], { currency: key }) %></td>
27
+ <td><%= Spree::Money.new(row[:sales_total], { currency: key }) %></td>
28
+ </tr>
29
+ <% end %>
30
+ </tbody>
31
+ </table>
32
+ </div>
@@ -1,7 +1,8 @@
1
1
  <% allow_return_item_changes = !@return_authorization.customer_returned_items? %>
2
2
 
3
3
  <div data-hook="admin_return_authorization_form_fields">
4
- <table class="table table-condensed table-bordered index return-items-table">
4
+ <div class="table-responsive">
5
+ <table class="table table-condensed table-bordered return-items-table">
5
6
  <thead>
6
7
  <tr data-hook="rma_header">
7
8
  <th>
@@ -74,7 +75,7 @@
74
75
  <% end %>
75
76
  </tbody>
76
77
  </table>
77
-
78
+ </div>
78
79
  <%= f.field_container :amount, class: ['alert alert-info'] do %>
79
80
  <%= Spree.t(:total_pre_tax_refund) %>: <span id="total_pre_tax_refund">0.00</span>
80
81
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <% content_for :page_actions do %>
2
2
  <% if @return_authorization.can_cancel? %>
3
- <%= button_link_to Spree.t('actions.cancel'), cancel_admin_order_return_authorization_url(@order, @return_authorization), method: :put, data: { confirm: Spree.t(:are_you_sure) }, icon: "delete" %>
3
+ <%= button_link_to Spree.t('actions.cancel'), cancel_admin_order_return_authorization_url(@order, @return_authorization), method: :put, data: { confirm: Spree.t(:are_you_sure) }, icon: "delete.svg" %>
4
4
  <% end %>
5
5
  <% end %>
6
6
 
@@ -18,9 +18,9 @@
18
18
  <%= render partial: 'form', locals: { f: f } %>
19
19
 
20
20
  <div class="form-actions" data-hook="buttons">
21
- <%= button Spree.t('actions.update'), 'repeat' %>
21
+ <%= button Spree.t('actions.update'), 'save.svg' %>
22
22
  <span class="or"><%= Spree.t(:or) %></span>
23
- <%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), icon: 'delete' %>
23
+ <%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), icon: 'cancel.svg' %>
24
24
  </div>
25
25
  </fieldset>
26
26
  <% end %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <% content_for :page_actions do %>
4
4
  <% if @order.shipments.any?(&:shipped?) && can?(:create, Spree::ReturnAuthorization) %>
5
- <%= button_link_to Spree.t(:new_return_authorization), new_admin_order_return_authorization_url(@order), class: "btn-success", icon: 'add' %>
5
+ <%= button_link_to Spree.t(:new_return_authorization), new_admin_order_return_authorization_url(@order), class: "btn-success", icon: 'add.svg' %>
6
6
  <% end %>
7
7
  <% end %>
8
8
 
@@ -11,6 +11,7 @@
11
11
  <% end %>
12
12
 
13
13
  <% if @order.shipments.any?(&:shipped?) && @order.return_authorizations.any? %>
14
+ <div class="table-responsive">
14
15
  <table class="table">
15
16
  <thead data-hook="rma_header">
16
17
  <tr>
@@ -42,6 +43,7 @@
42
43
  <% end %>
43
44
  </tbody>
44
45
  </table>
46
+ </div>
45
47
  <% elsif @order.shipments.any?(&:shipped?) %>
46
48
  <div class="alert alert-info no-objects-found">
47
49
  <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::ReturnAuthorization)) %>
@@ -10,9 +10,9 @@
10
10
  <%= render partial: 'form', locals: { f: f } %>
11
11
 
12
12
  <div class="form-actions" data-hook="buttons">
13
- <%= button Spree.t(:create), 'save' %>
13
+ <%= button Spree.t(:create), 'save.svg' %>
14
14
  <span class="or"><%= Spree.t(:or) %></span>
15
- <%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), icon: 'delete' %>
15
+ <%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), icon: 'cancel.svg' %>
16
16
  </div>
17
17
  </fieldset>
18
18
  <% end %>
@@ -14,15 +14,14 @@
14
14
  </div>
15
15
  </div>
16
16
  <div data-hook="admin_return_authorisations_index_filters_buttons" class="form-actions">
17
- <%= button Spree.t(:search), 'search' %>
17
+ <%= button Spree.t(:search), 'search.svg' %>
18
18
  </div>
19
19
  <% end %>
20
20
  </div>
21
21
  <% end %>
22
22
 
23
- <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection, per_page_action: :customer_returns } %>
24
-
25
23
  <% if @collection.any? %>
24
+ <div class="table-responsive">
26
25
  <table class="table">
27
26
  <thead>
28
27
  <tr data-hook="rate_header">
@@ -37,7 +36,7 @@
37
36
  <tbody>
38
37
  <% @collection.each do |customer_return| %>
39
38
  <tr id="<%= spree_dom_id customer_return %>" data-hook="customer_return_row">
40
- <td><%= customer_return.created_at.to_date %></td>
39
+ <td><%= customer_return.created_at.strftime('%F %T %Z') %></td>
41
40
  <td><%= link_to customer_return.number, spree.edit_admin_order_customer_return_path(customer_return.order, customer_return) %></td>
42
41
  <td><%= link_to customer_return.order.number, spree.edit_admin_order_path(customer_return.order) %></td>
43
42
  <td>
@@ -55,6 +54,7 @@
55
54
  <% end %>
56
55
  </tbody>
57
56
  </table>
57
+ </div>
58
58
  <% else %>
59
59
  <div class="alert alert-info no-objects-found">
60
60
  <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::CustomerReturn)) %>. </div>
@@ -38,15 +38,14 @@
38
38
  </div>
39
39
  </div>
40
40
  <div data-hook="admin_return_authorisations_index_filters_buttons" class="form-actions">
41
- <%= button Spree.t(:search), 'search' %>
41
+ <%= button Spree.t(:search), 'search.svg' %>
42
42
  </div>
43
43
  <% end %>
44
44
  </div>
45
45
  <% end %>
46
46
 
47
- <%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection, per_page_action: :return_authorizations } %>
48
-
49
47
  <% if @collection.any? %>
48
+ <div class="table-responsive">
50
49
  <table class="table">
51
50
  <thead>
52
51
  <tr data-hook="rate_header">
@@ -60,7 +59,7 @@
60
59
  <tbody>
61
60
  <% @collection.each do |return_authorization| %>
62
61
  <tr id="<%= spree_dom_id return_authorization %>" data-hook="return_authorization_row">
63
- <td><%= return_authorization.created_at.to_date %></td>
62
+ <td><%= return_authorization.created_at.strftime('%F %T %Z') %></td>
64
63
  <td><%= link_to return_authorization.number, spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization) %></td>
65
64
  <td><%= link_to return_authorization.order.number, spree.edit_admin_order_path(return_authorization.order) %></td>
66
65
  <td>
@@ -73,6 +72,7 @@
73
72
  <% end %>
74
73
  </tbody>
75
74
  </table>
75
+ </div>
76
76
  <% else %>
77
77
  <div class="alert alert-info no-objects-found">
78
78
  <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::ReturnAuthorization)) %>.