|
53 | 53 | <%= paginate @collection, theme: "solidus_admin" %> |
54 | 54 |
|
55 | 55 | <% if @collection.any? %> |
56 | | - <table class="index" id="listing_products"> |
| 56 | + <%= |
| 57 | + content_tag( |
| 58 | + :table, |
| 59 | + class: "index selectable-table actionable", |
| 60 | + id: 'listing_products', |
| 61 | + data: { |
| 62 | + actions: batch_action_buttons(batch_actions), |
| 63 | + search_form_selector: 'form.spree\\/product_search', |
| 64 | + preview_batch_url: preview_batch_admin_products_path, |
| 65 | + process_batch_url: process_batch_admin_products_path |
| 66 | + } |
| 67 | + ) do %> |
57 | 68 | <colgroup> |
58 | | - <col style="width: 15%;"> |
59 | | - <col style="width: 5%;"> |
60 | | - <col style="width: 50%;"> |
61 | | - <col style="width: 15%;"> |
62 | | - <col style="width: 15%;"> |
| 69 | + <col> |
| 70 | + <col style="width: 15%;"> |
| 71 | + <col style="width: 5%;"> |
| 72 | + <col style="width: 50%;"> |
| 73 | + <col style="width: 15%;"> |
| 74 | + <col style="width: 15%;"> |
63 | 75 | </colgroup> |
64 | 76 | <thead> |
65 | 77 | <tr data-hook="admin_products_index_headers"> |
| 78 | + <th></th> |
66 | 79 | <th><%= Spree::Variant.human_attribute_name(:sku) %></th> |
67 | 80 | <th></th> |
68 | 81 | <th><%= sort_link @search,:name, Spree::Product.human_attribute_name(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %></th> |
|
73 | 86 | <tbody> |
74 | 87 | <% @collection.each do |product| %> |
75 | 88 | <tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows"> |
| 89 | + <td><%= check_box_tag 'q[id_in][]', product.id, false, class: 'selectable' %></td> |
76 | 90 | <td><%= product.sku %></td> |
77 | 91 | <td class="align-center"> |
78 | 92 | <%= render 'spree/admin/shared/image', image: product.gallery.images.first, size: :mini %> |
|
89 | 103 | </tr> |
90 | 104 | <% end %> |
91 | 105 | </tbody> |
92 | | - </table> |
| 106 | + <% end %> |
93 | 107 | <% else %> |
94 | 108 | <div class="no-objects-found"> |
95 | 109 | <%= render 'spree/admin/shared/no_objects_found', |
|
0 commit comments