Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Make icon buttons uniform.

Matthew Kennedyb38559e2ace3
diff --git a/backend/app/views/spree/admin/countries/index.html.erb b/backend/app/views/spree/admin/countries/index.html.erb
index d3f8578888..fdc23840a6 100644
--- a/backend/app/views/spree/admin/countries/index.html.erb
+++ b/backend/app/views/spree/admin/countries/index.html.erb
@@ -23,9 +23,11 @@
<td class="text-center"><%= country.iso3 %></td>
<td class="text-center"><%= active_badge(country.states_required?) %></td>
<td class="text-center"><%= active_badge(country.zipcode_required?) %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(country, no_text: true) if can? :edit, country %>
- <%= link_to_delete(country, no_text: true) if can? :delete, country %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(country, no_text: true) if can? :edit, country %>
+ <%= link_to_delete(country, no_text: true) if can? :delete, country %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/option_types/index.html.erb b/backend/app/views/spree/admin/option_types/index.html.erb
index 06e7218a09..b4f293d22b 100644
--- a/backend/app/views/spree/admin/option_types/index.html.erb
+++ b/backend/app/views/spree/admin/option_types/index.html.erb
@@ -31,9 +31,11 @@
<td><%= option_type.name %></td>
<td class="presentation"><%= option_type.presentation %></td>
<td><%= active_badge(option_type.filterable) %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(option_type, class: 'admin_edit_option_type', no_text: true) if can?(:edit, option_type) %>
- <%= link_to_delete(option_type, no_text: true) if can?(:delete, option_type) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(option_type, class: 'admin_edit_option_type', no_text: true) if can?(:edit, option_type) %>
+ <%= link_to_delete(option_type, no_text: true) if can?(:delete, option_type) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/orders/_line_items.html.erb b/backend/app/views/spree/admin/orders/_line_items.html.erb
index 00ecb4e1b5..24123afbed 100644
--- a/backend/app/views/spree/admin/orders/_line_items.html.erb
+++ b/backend/app/views/spree/admin/orders/_line_items.html.erb
@@ -35,13 +35,15 @@
<%= number_field_tag :quantity, item.quantity, min: 0, class: "line_item_quantity form-control", size: 5 %>
</td>
<td class="line-item-total text-center"><%= line_item_shipment_price(item, item.quantity) %></td>
- <td class="cart-line-item-delete actions actions-4 text-center no-wrap" data-hook="cart_line_item_delete">
- <% if can? :update, item %>
- <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-line-item btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-line-item btn btn-success btn-sm', no_text: true, data: { :'line-item-id' => item.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none' %>
- <%= link_to_with_icon 'edit.svg', Spree.t('edit'), "#", class: 'edit-line-item btn btn-outline-secondary btn-sm', data: {action: 'edit'}, title: Spree.t('edit'), no_text: true %>
- <%= link_to_with_icon 'delete.svg', Spree.t('delete'), "#", class: 'delete-line-item btn btn-danger btn-sm', data: { 'line-item-id' => item.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
- <% end %>
+ <td class="cart-line-item-delete actions" data-hook="cart_line_item_delete">
+ <span class="d-flex justify-content-end">
+ <% if can? :update, item %>
+ <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-line-item btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-line-item btn btn-success btn-sm', no_text: true, data: { :'line-item-id' => item.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none' %>
+ <%= link_to_with_icon 'edit.svg', Spree.t('edit'), "#", class: 'edit-line-item btn btn-outline-secondary btn-sm', data: {action: 'edit'}, title: Spree.t('edit'), no_text: true %>
+ <%= link_to_with_icon 'delete.svg', Spree.t('delete'), "#", class: 'delete-line-item btn btn-danger btn-sm', data: { 'line-item-id' => item.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
+ <% end %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/orders/_shipment.html.erb b/backend/app/views/spree/admin/orders/_shipment.html.erb
index afa874c830..ac650ac44b 100644
--- a/backend/app/views/spree/admin/orders/_shipment.html.erb
+++ b/backend/app/views/spree/admin/orders/_shipment.html.erb
@@ -43,11 +43,13 @@
{ class: 'select2', data: {'shipment-number' => shipment.number } } %>
</div>
</td>
- <td class="actions text-center">
- <% if can? :update, shipment %>
- <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-method btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), no_text: true %>
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-method btn btn-success btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
- <% end %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <% if can? :update, shipment %>
+ <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-method btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), no_text: true %>
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-method btn btn-success btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
+ <% end %>
+ </span>
</td>
</tr>
<% end %>
@@ -64,10 +66,12 @@
<td colspan='5'><%= Spree.t(:no_shipping_method_selected) %></td>
<% end %>
- <td class="actions text-center">
- <% if( (can? :update, shipment) and !shipment.shipped?) %>
- <%= link_to_with_icon 'edit.svg', Spree.t('edit'), "javascript:;", class: 'edit-method with-tip btn btn-sm btn-outline-secondary', data: {action: 'edit'}, no_text: true %>
- <% end %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <% if( (can? :update, shipment) and !shipment.shipped?) %>
+ <%= link_to_with_icon 'edit.svg', Spree.t('edit'), "javascript:;", class: 'edit-method with-tip btn btn-sm btn-outline-secondary', data: {action: 'edit'}, no_text: true %>
+ <% end %>
+ </span>
</td>
</tr>
@@ -76,11 +80,13 @@
<label><%= Spree.t(:tracking_number) %>:</label>
<%= text_field_tag :tracking, shipment.tracking, class: "form-control" %>
</td>
- <td class="actions text-center">
- <% if can? :update, shipment %>
- <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-tracking btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), no_text: true %>
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-tracking btn btn-success btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
- <% end %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <% if can? :update, shipment %>
+ <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-tracking btn btn-outline-secondary btn-sm', data: {action: 'cancel'}, title: Spree.t('actions.cancel'), no_text: true %>
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-tracking btn btn-success btn-sm', data: {'shipment-number' => shipment.number, action: 'save'}, title: Spree.t('actions.save'), no_text: true %>
+ <% end %>
+ </span>
</td>
</tr>
@@ -100,10 +106,12 @@
<%= Spree.t(:no_tracking_present) %>
<% end %>
</td>
- <td class="actions text-center">
- <% if can? :update, shipment %>
- <%= link_to_with_icon 'edit.svg', Spree.t('edit'), "#", class: 'edit-tracking btn btn-outline-secondary btn-sm', data: {action: 'edit'}, title: Spree.t('edit'), no_text: true %>
- <% end %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <% if can? :update, shipment %>
+ <%= link_to_with_icon 'edit.svg', Spree.t('edit'), "#", class: 'edit-tracking btn btn-outline-secondary btn-sm', data: {action: 'edit'}, title: Spree.t('edit'), no_text: true %>
+ <% end %>
+ </span>
</td>
</tr>
</tbody>
diff --git a/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb b/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb
index 8b3a2b7eb5..fe4cc61e75 100644
--- a/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb
+++ b/backend/app/views/spree/admin/orders/_shipment_manifest.html.erb
@@ -31,14 +31,16 @@
<%= line_item_shipment_price(item.line_item, item.quantity) %>
</td>
- <td class="cart-item-delete actions actions-3 text-center" data-hook="cart_item_delete">
- <% if((!shipment.shipped?) && can?(:update, item.line_item)) %>
- <%= link_to_with_icon 'edit.svg', Spree.t('actions.edit'), "#", class: 'edit-item btn btn-outline-secondary btn-sm', title: Spree.t('actions.edit'), no_text: true %>
- <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-item btn btn-outline-secondary btn-sm', data: { action: 'cancel' }, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
- <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-item btn btn-success btn-sm', data: {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none', no_text: true %>
- <%= link_to_with_icon 'split.svg', Spree.t('split'), "#", class: 'split-item btn btn-outline-secondary btn-sm', data: {action: 'split', 'variant-id' => item.variant.id}, title: Spree.t('split'), no_text: true %>
- <%= link_to_with_icon 'delete.svg', Spree.t('delete'), "#", class: 'delete-item btn btn-danger btn-sm', data: { 'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
- <% end %>
+ <td class="cart-item-delete actions" data-hook="cart_item_delete">
+ <span class="d-flex justify-content-end">
+ <% if((!shipment.shipped?) && can?(:update, item.line_item)) %>
+ <%= link_to_with_icon 'edit.svg', Spree.t('actions.edit'), "#", class: 'edit-item btn btn-outline-secondary btn-sm', title: Spree.t('actions.edit'), no_text: true %>
+ <%= link_to_with_icon 'cancel.svg', Spree.t('actions.cancel'), "#", class: 'cancel-item btn btn-outline-secondary btn-sm', data: { action: 'cancel' }, title: Spree.t('actions.cancel'), style: 'display: none', no_text: true %>
+ <%= link_to_with_icon 'save.svg', Spree.t('actions.save'), "#", class: 'save-item btn btn-success btn-sm', data: {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'save'}, title: Spree.t('actions.save'), style: 'display: none', no_text: true %>
+ <%= link_to_with_icon 'split.svg', Spree.t('split'), "#", class: 'split-item btn btn-outline-secondary btn-sm', data: {action: 'split', 'variant-id' => item.variant.id}, title: Spree.t('split'), no_text: true %>
+ <%= link_to_with_icon 'delete.svg', Spree.t('delete'), "#", class: 'delete-item btn btn-danger btn-sm', data: { 'shipment-number' => shipment.number, 'variant-id' => item.variant.id, action: 'remove'}, title: Spree.t('delete'), no_text: true %>
+ <% end %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/orders/index.html.erb b/backend/app/views/spree/admin/orders/index.html.erb
index 160dc82717..7e8bee2989 100644
--- a/backend/app/views/spree/admin/orders/index.html.erb
+++ b/backend/app/views/spree/admin/orders/index.html.erb
@@ -254,8 +254,10 @@
<% end %>
</td>
<td><%= order.display_total.to_html %></td>
- <td class='actions actions-1' data-hook="admin_orders_index_row_actions">
- <%= link_to_edit_url edit_admin_order_path(order), title: "admin_edit_#{dom_id(order)}", no_text: true if can?(:edit, order) %>
+ <td class='actions' data-hook="admin_orders_index_row_actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit_url edit_admin_order_path(order), title: "admin_edit_#{dom_id(order)}", no_text: true if can?(:edit, order) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/payment_methods/index.html.erb b/backend/app/views/spree/admin/payment_methods/index.html.erb
index 7132f6c6ab..a24aa585cd 100644
--- a/backend/app/views/spree/admin/payment_methods/index.html.erb
+++ b/backend/app/views/spree/admin/payment_methods/index.html.erb
@@ -31,9 +31,11 @@
<td><%= method.type.split('::', 3).last %></td>
<td class="text-center"><%= Spree.t(method.display_on) %></td>
<td class="text-center"><%= active_badge(method.active) %></td>
- <td data-hook="admin_payment_methods_index_row_actions" class="actions actions-2 text-right">
- <%= link_to_edit(method, no_text: true) if can? :edit, method %>
- <%= link_to_delete(method, no_text: true) if can? :delete, method %>
+ <td data-hook="admin_payment_methods_index_row_actions" class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(method, no_text: true) if can? :edit, method %>
+ <%= link_to_delete(method, no_text: true) if can? :delete, method %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/payments/_list.html.erb b/backend/app/views/spree/admin/payments/_list.html.erb
index 8360302b5a..15bd1b9df6 100644
--- a/backend/app/views/spree/admin/payments/_list.html.erb
+++ b/backend/app/views/spree/admin/payments/_list.html.erb
@@ -24,14 +24,16 @@
<%= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize) %>
</span>
</td>
- <td class="actions actions-2 text-center no-wrap">
- <% payment.actions.each do |action| %>
- <% if action == 'credit' %>
- <%= link_to_with_icon('exit.svg', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:create, Spree::Refund) %>
- <% else %>
- <%= link_to_with_icon(action + '.svg', Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-outline-secondary btn-sm") if can?(action.to_sym, payment) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <% payment.actions.each do |action| %>
+ <% if action == 'credit' %>
+ <%= link_to_with_icon('exit.svg', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:create, Spree::Refund) %>
+ <% else %>
+ <%= link_to_with_icon(action + '.svg', Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-outline-secondary btn-sm") if can?(action.to_sym, payment) %>
+ <% end %>
<% end %>
- <% end %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/product_properties/_product_property_fields.html.erb b/backend/app/views/spree/admin/product_properties/_product_property_fields.html.erb
index 5cefb73dfe..beebc65556 100644
--- a/backend/app/views/spree/admin/product_properties/_product_property_fields.html.erb
+++ b/backend/app/views/spree/admin/product_properties/_product_property_fields.html.erb
@@ -19,13 +19,15 @@
<td class="show_property">
<%= f.check_box :show_property %>
</td>
- <td class="actions actions-1">
- <% if f.object.persisted? && can?(:destroy, f.object) %>
- <%= link_to_delete f.object, no_text: true %>
- <% else %>
- <span class="btn btn-danger btn-sm icon-link disabled" style="opacity:0.2;">
- <%= svg_icon name: "delete.svg", width: '18', height: '18' %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <% if f.object.persisted? && can?(:destroy, f.object) %>
+ <%= link_to_delete f.object, no_text: true %>
+ <% else %>
+ <span class="btn btn-danger btn-sm icon-link disabled" style="opacity:0.2;">
+ <%= svg_icon name: "delete.svg", width: '18', height: '18' %>
+ </span>
+ <% end %>
</span>
- <% end %>
</td>
</tr>
diff --git a/backend/app/views/spree/admin/products/stock.html.erb b/backend/app/views/spree/admin/products/stock.html.erb
index 30eb3f4e2e..f622e4edf6 100644
--- a/backend/app/views/spree/admin/products/stock.html.erb
+++ b/backend/app/views/spree/admin/products/stock.html.erb
@@ -62,8 +62,10 @@
id: "stock_item_backorderable_#{item.stock_location.id}" %>
<% end if can? :update, item %>
</td>
- <td class="actions actions-1 text-center">
- <%= link_to_with_icon('delete.svg', Spree.t(:remove), [:admin, item], method: :delete, remote: true, class: 'icon_link btn btn-danger btn-sm', data: { action: :remove, confirm: Spree.t(:are_you_sure) }, no_text: true) if can? :destroy, item %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_with_icon('delete.svg', Spree.t(:remove), [:admin, item], method: :delete, remote: true, class: 'icon_link btn btn-danger btn-sm', data: { action: :remove, confirm: Spree.t(:are_you_sure) }, no_text: true) if can? :destroy, item %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/promotion_categories/index.html.erb b/backend/app/views/spree/admin/promotion_categories/index.html.erb
index 1d8ff23a62..ba149f797b 100644
--- a/backend/app/views/spree/admin/promotion_categories/index.html.erb
+++ b/backend/app/views/spree/admin/promotion_categories/index.html.erb
@@ -20,9 +20,11 @@
<tr>
<td><%= promotion_category.name %></td>
<td><%= promotion_category.code %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit promotion_category, no_text: true if can?(:edit, promotion_category) %>
- <%= link_to_delete promotion_category, no_text: true if can?(:delete, promotion_category) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit promotion_category, no_text: true if can?(:edit, promotion_category) %>
+ <%= link_to_delete promotion_category, no_text: true if can?(:delete, promotion_category) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/properties/index.html.erb b/backend/app/views/spree/admin/properties/index.html.erb
index ebbd9499eb..c1c769f8c7 100644
--- a/backend/app/views/spree/admin/properties/index.html.erb
+++ b/backend/app/views/spree/admin/properties/index.html.erb
@@ -51,9 +51,11 @@
<tr id="<%= spree_dom_id property %>" data-hook="listing_properties_row">
<td><%= property.name %></td>
<td><%= property.presentation %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(property, no_text: true) if can?(:edit, property) %>
- <%= link_to_delete(property, no_text: true) if can?(:delete, property) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(property, no_text: true) if can?(:edit, property) %>
+ <%= link_to_delete(property, no_text: true) if can?(:delete, property) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/prototypes/index.html.erb b/backend/app/views/spree/admin/prototypes/index.html.erb
index 62368f2fa1..0b000a7837 100644
--- a/backend/app/views/spree/admin/prototypes/index.html.erb
+++ b/backend/app/views/spree/admin/prototypes/index.html.erb
@@ -19,9 +19,11 @@
<% @prototypes.each do |prototype| %>
<tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row">
<td><%= prototype.name %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') if can?(:edit, prototype) %>
- <%= link_to_delete(prototype, no_text: true) if can?(:delete, prototype) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') if can?(:edit, prototype) %>
+ <%= link_to_delete(prototype, no_text: true) if can?(:delete, prototype) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/reimbursement_types/index.html.erb b/backend/app/views/spree/admin/reimbursement_types/index.html.erb
index e24a3a21cf..8784f4b766 100644
--- a/backend/app/views/spree/admin/reimbursement_types/index.html.erb
+++ b/backend/app/views/spree/admin/reimbursement_types/index.html.erb
@@ -25,9 +25,11 @@
<td>
<%= reimbursement_type.type.split('::', 3).last %>
</td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit reimbursement_type, no_text: true, class: 'edit' if can?(:edit, reimbursement_type) %>
- <%= link_to_delete reimbursement_type, no_text: true if can?(:delete, reimbursement_type) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit reimbursement_type, no_text: true, class: 'edit' if can?(:edit, reimbursement_type) %>
+ <%= link_to_delete reimbursement_type, no_text: true if can?(:delete, reimbursement_type) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/return_authorizations/index.html.erb b/backend/app/views/spree/admin/return_authorizations/index.html.erb
index fc3f374d8a..6edcb183ed 100644
--- a/backend/app/views/spree/admin/return_authorizations/index.html.erb
+++ b/backend/app/views/spree/admin/return_authorizations/index.html.erb
@@ -33,11 +33,13 @@
</td>
<td><%= return_authorization.display_pre_tax_total.to_html %></td>
<td><%= pretty_time(return_authorization.created_at) %></td>
- <td class="actions actions-2">
- <%= link_to_edit(return_authorization, no_text: true, class: 'edit') if can?(:edit, return_authorization) %>
- <% if can?(:delete, return_authorization) && !return_authorization.customer_returned_items? %>
- <%= link_to_delete return_authorization, no_text: true %>
- <% end %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(return_authorization, no_text: true, class: 'edit') if can?(:edit, return_authorization) %>
+ <% if can?(:delete, return_authorization) && !return_authorization.customer_returned_items? %>
+ <%= link_to_delete return_authorization, no_text: true %>
+ <% end %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/return_index/customer_returns.html.erb b/backend/app/views/spree/admin/return_index/customer_returns.html.erb
index 0052cc2fa3..db74e78c69 100644
--- a/backend/app/views/spree/admin/return_index/customer_returns.html.erb
+++ b/backend/app/views/spree/admin/return_index/customer_returns.html.erb
@@ -47,8 +47,10 @@
<% end %>
</td>
<td><%= customer_return.display_pre_tax_total.to_html %></td>
- <td class="actions actions-1 text-right">
- <%= link_to_edit_url spree.edit_admin_order_customer_return_path(customer_return.order, customer_return), no_text: true if can?(:edit, customer_return) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit_url spree.edit_admin_order_customer_return_path(customer_return.order, customer_return), no_text: true if can?(:edit, customer_return) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/return_index/return_authorizations.html.erb b/backend/app/views/spree/admin/return_index/return_authorizations.html.erb
index 43a7a5f2ef..816df2f94f 100644
--- a/backend/app/views/spree/admin/return_index/return_authorizations.html.erb
+++ b/backend/app/views/spree/admin/return_index/return_authorizations.html.erb
@@ -65,8 +65,10 @@
<td>
<span class="badge badge-<%= return_authorization.state %> text-uppercase"><%= Spree.t("return_authorization_states.#{return_authorization.state}") %></span>
</td>
- <td class="actions actions-1 text-right">
- <%= link_to_edit return_authorization, url: spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization), no_text: true if can?(:edit, return_authorization) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit return_authorization, url: spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization), no_text: true if can?(:edit, return_authorization) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/roles/index.html.erb b/backend/app/views/spree/admin/roles/index.html.erb
index fdc3461071..6c6268622e 100644
--- a/backend/app/views/spree/admin/roles/index.html.erb
+++ b/backend/app/views/spree/admin/roles/index.html.erb
@@ -19,9 +19,11 @@
<% @roles.each do |role| %>
<tr id="<%= spree_dom_id role %>" data-hook="admin_roles_index_rows">
<td><%= role.name %></td>
- <td class="actions text-right">
- <%= link_to_edit(role, no_text: true) if can? :edit, role %>
- <%= link_to_delete(role, no_text: true) if can? :destroy, role %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(role, no_text: true) if can? :edit, role %>
+ <%= link_to_delete(role, no_text: true) if can? :destroy, role %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/shared/_refunds.html.erb b/backend/app/views/spree/admin/shared/_refunds.html.erb
index e4f9a3e5d8..67ce46b7fb 100644
--- a/backend/app/views/spree/admin/shared/_refunds.html.erb
+++ b/backend/app/views/spree/admin/shared/_refunds.html.erb
@@ -23,8 +23,10 @@
<td><%= refund.transaction_id %></td>
<td><%= truncate(refund.reason.name, length: 100) %></td>
<% if show_actions %>
- <td class="actions actions-1">
- <%= link_to_with_icon('edit.svg', Spree.t(:edit), edit_admin_order_payment_refund_path(refund.payment.order, refund.payment, refund), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:edit, refund) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_with_icon('edit.svg', Spree.t(:edit), edit_admin_order_payment_refund_path(refund.payment.order, refund.payment, refund), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:edit, refund) %>
+ </span>
</td>
<% end %>
</tr>
diff --git a/backend/app/views/spree/admin/shared/named_types/_index.html.erb b/backend/app/views/spree/admin/shared/named_types/_index.html.erb
index 0e5c91fe9b..9797d15413 100644
--- a/backend/app/views/spree/admin/shared/named_types/_index.html.erb
+++ b/backend/app/views/spree/admin/shared/named_types/_index.html.erb
@@ -25,11 +25,13 @@
<td class="align-center">
<%= active_badge(named_type.active, label: Spree.t(named_type.active? ? :active : :inactive)) %>
</td>
- <td class="actions actions-1 text-right">
- <% if named_type.mutable? %>
- <%= link_to_edit(named_type, no_text: true) if can? :edit, named_type %>
- <%= link_to_delete(named_type, no_text: true) if can? :delete, named_type %>
- <% end %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <% if named_type.mutable? %>
+ <%= link_to_edit(named_type, no_text: true) if can? :edit, named_type %>
+ <%= link_to_delete(named_type, no_text: true) if can? :delete, named_type %>
+ <% end %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/shipping_categories/index.html.erb b/backend/app/views/spree/admin/shipping_categories/index.html.erb
index 52a8939ce8..862a5e9163 100644
--- a/backend/app/views/spree/admin/shipping_categories/index.html.erb
+++ b/backend/app/views/spree/admin/shipping_categories/index.html.erb
@@ -19,9 +19,11 @@
<% @shipping_categories.each do |shipping_category| %>
<tr id="<%= spree_dom_id shipping_category %>" data-hook="category_row">
<td><%= shipping_category.name %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(shipping_category, no_text: true) if can? :edit, shipping_category %>
- <%= link_to_delete(shipping_category, no_text: true) if can? :edit, shipping_category %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(shipping_category, no_text: true) if can? :edit, shipping_category %>
+ <%= link_to_delete(shipping_category, no_text: true) if can? :edit, shipping_category %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/shipping_methods/index.html.erb b/backend/app/views/spree/admin/shipping_methods/index.html.erb
index 4d8c3224ba..fced5b1da4 100644
--- a/backend/app/views/spree/admin/shipping_methods/index.html.erb
+++ b/backend/app/views/spree/admin/shipping_methods/index.html.erb
@@ -29,9 +29,11 @@
</td>
<td><%= shipping_method.calculator.description %></td>
<td class="text-center"><%= shipping_method.display_on.blank? ? Spree.t(:none) : Spree.t(shipping_method.display_on) %></td>
- <td data-hook="admin_shipping_methods_index_row_actions" class="actions actions-2 text-right">
- <%= link_to_edit(shipping_method, no_text: true) if can? :edit, shipping_method %>
- <%= link_to_delete(shipping_method, no_text: true) if can? :delete, shipping_method %>
+ <td class="actions" data-hook="admin_shipping_methods_index_row_actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(shipping_method, no_text: true) if can? :edit, shipping_method %>
+ <%= link_to_delete(shipping_method, no_text: true) if can? :delete, shipping_method %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/states/_state_list.html.erb b/backend/app/views/spree/admin/states/_state_list.html.erb
index 8783b1059d..ff8ef05bec 100644
--- a/backend/app/views/spree/admin/states/_state_list.html.erb
+++ b/backend/app/views/spree/admin/states/_state_list.html.erb
@@ -13,9 +13,11 @@
<tr id="<%= spree_dom_id state %>" data-hook="states_row">
<td><%= state.name %></td>
<td class="text-center"><%= state.abbr %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(state, no_text: true) if can? :edit, state %>
- <%= link_to_delete(state, no_text: true) if can? :delete, state %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(state, no_text: true) if can? :edit, state %>
+ <%= link_to_delete(state, no_text: true) if can? :delete, state %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/stock_locations/index.html.erb b/backend/app/views/spree/admin/stock_locations/index.html.erb
index 96a28d3c77..d194d6c834 100644
--- a/backend/app/views/spree/admin/stock_locations/index.html.erb
+++ b/backend/app/views/spree/admin/stock_locations/index.html.erb
@@ -26,9 +26,11 @@
<td><%= display_name(stock_location) %></td>
<td><%= link_to Spree.t(:stock_movements), spree.admin_stock_location_stock_movements_path(stock_location.id) %> </td>
<td><%= active_badge(stock_location.active, label: Spree.t(state(stock_location))) %></td>
- <td class="actions actions-2 text-center">
- <%= link_to_edit(stock_location, no_text: true) if can? :create, stock_location %>
- <%= link_to_delete(stock_location, no_text: true) if can? :create, stock_location %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(stock_location, no_text: true) if can? :create, stock_location %>
+ <%= link_to_delete(stock_location, no_text: true) if can? :create, stock_location %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/stock_transfers/index.html.erb b/backend/app/views/spree/admin/stock_transfers/index.html.erb
index 5fa4ea93f7..1ba4fdaad9 100644
--- a/backend/app/views/spree/admin/stock_transfers/index.html.erb
+++ b/backend/app/views/spree/admin/stock_transfers/index.html.erb
@@ -73,8 +73,10 @@
<% end %>
</td>
<td><%= stock_transfer.created_at.strftime('%F %T %Z') %></td>
- <td class="actions actions-1">
- <%= link_to_with_icon 'show', Spree.t(:show), admin_stock_transfer_path(stock_transfer), class: 'btn btn-outline-secondary btn-sm', no_text: true, data: {action: 'view'} %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_with_icon 'view.svg', Spree.t(:show), admin_stock_transfer_path(stock_transfer), class: 'btn btn-outline-secondary btn-sm', no_text: true, data: {action: 'view'} %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/store_credit_categories/index.html.erb b/backend/app/views/spree/admin/store_credit_categories/index.html.erb
index fbde0418e2..9f59976bcc 100644
--- a/backend/app/views/spree/admin/store_credit_categories/index.html.erb
+++ b/backend/app/views/spree/admin/store_credit_categories/index.html.erb
@@ -19,9 +19,11 @@
<% @store_credit_categories.each do |store_credit_category| %>
<tr id="<%= spree_dom_id store_credit_category %>" data-hook="admin_store_credit_categories_index_rows">
<td><%= store_credit_category.name %></td>
- <td class="actions text-right">
- <%= link_to_edit(store_credit_category, no_text: true) if can? :edit, store_credit_category %>
- <%= link_to_delete(store_credit_category, no_text: true) if can? :destroy, store_credit_category %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(store_credit_category, no_text: true) if can? :edit, store_credit_category %>
+ <%= link_to_delete(store_credit_category, no_text: true) if can? :destroy, store_credit_category %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/stores/index.html.erb b/backend/app/views/spree/admin/stores/index.html.erb
index 2f5d885333..46724b1f90 100644
--- a/backend/app/views/spree/admin/stores/index.html.erb
+++ b/backend/app/views/spree/admin/stores/index.html.erb
@@ -25,17 +25,19 @@
<td><%= store.supported_currencies_list.map(&:iso_code).join(', ') %></td>
<td><%= store.supported_locales_list.map {|l| locale_presentation(l).first }.join(', ') %></td>
<td><%= active_badge(store.default) %></td>
- <td class="actions actions-2 text-right" data-hook="admin_stores_index_row_actions">
- <%= link_to_edit_url spree.edit_admin_store_path(store), no_text: true if can?(:edit, store) %>
+ <td class="actions" data-hook="admin_stores_index_row_actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit_url spree.edit_admin_store_path(store), no_text: true if can?(:edit, store) %>
- <% if can?(:edit, store) %>
- <% btn_url = store.default? ? '#' : spree.set_default_admin_store_path(store) %>
- <% btn_class = store.default? ? 'outline-secondary disabled' : 'warning' %>
- <% btn_label = store.default? ? nil : Spree.t(:store_set_default_button) %>
- <%= link_to_with_icon('save.svg', btn_label, btn_url, no_text: true, method: (store.default? ? nil : :put), class: "btn btn-#{btn_class} btn-sm with-tip", aria: {disabled: store.default?}) %>
- <% end %>
+ <% if can?(:edit, store) %>
+ <% btn_url = store.default? ? '#' : spree.set_default_admin_store_path(store) %>
+ <% btn_class = store.default? ? 'outline-secondary disabled' : 'warning' %>
+ <% btn_label = store.default? ? nil : Spree.t(:store_set_default_button) %>
+ <%= link_to_with_icon('save.svg', btn_label, btn_url, no_text: true, method: (store.default? ? nil : :put), class: "btn btn-#{btn_class} btn-sm with-tip", aria: {disabled: store.default?}) %>
+ <% end %>
- <%= link_to_delete store, no_text: true, url: spree.admin_store_path(store) if can?(:destroy, store) %>
+ <%= link_to_delete store, no_text: true, url: spree.admin_store_path(store) if can?(:destroy, store) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/tax_categories/index.html.erb b/backend/app/views/spree/admin/tax_categories/index.html.erb
index fd6052d076..c5449edbca 100644
--- a/backend/app/views/spree/admin/tax_categories/index.html.erb
+++ b/backend/app/views/spree/admin/tax_categories/index.html.erb
@@ -28,9 +28,11 @@
<td><%= tax_category.tax_code %></td>
<td><%= tax_category.description %></td>
<td><%= active_badge(tax_category.is_default?) %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(tax_category, no_text: true) if can? :edit, tax_category %>
- <%= link_to_delete(tax_category, no_text: true) if can? :delete, tax_category %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(tax_category, no_text: true) if can? :edit, tax_category %>
+ <%= link_to_delete(tax_category, no_text: true) if can? :delete, tax_category %>
+ </span>
</tr>
<% end %>
</tbody>
diff --git a/backend/app/views/spree/admin/tax_rates/index.html.erb b/backend/app/views/spree/admin/tax_rates/index.html.erb
index b2f0b6a056..e0fed244a4 100644
--- a/backend/app/views/spree/admin/tax_rates/index.html.erb
+++ b/backend/app/views/spree/admin/tax_rates/index.html.erb
@@ -31,9 +31,11 @@
<td><%= active_badge(tax_rate.included_in_price?) %></td>
<td><%= active_badge(tax_rate.show_rate_in_label?) %></td>
<td><%= tax_rate.calculator.to_s %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(tax_rate, no_text: true) if can? :edit, tax_rate %>
- <%= link_to_delete(tax_rate, no_text: true) if can? :delete, tax_rate %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(tax_rate, no_text: true) if can? :edit, tax_rate %>
+ <%= link_to_delete(tax_rate, no_text: true) if can? :delete, tax_rate %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/taxonomies/_list.html.erb b/backend/app/views/spree/admin/taxonomies/_list.html.erb
index 309670fbd1..545a1a2f91 100644
--- a/backend/app/views/spree/admin/taxonomies/_list.html.erb
+++ b/backend/app/views/spree/admin/taxonomies/_list.html.erb
@@ -14,9 +14,11 @@
<%= svg_icon name: "sort.svg", width: '18', height: '18' %>
</td>
<td><%= taxonomy.name %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit taxonomy.id, no_text: true if can?(:edit, taxonomy) %>
- <%= link_to_delete taxonomy, no_text: true if can?(:delete, taxonomy) %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit taxonomy.id, no_text: true if can?(:edit, taxonomy) %>
+ <%= link_to_delete taxonomy, no_text: true if can?(:delete, taxonomy) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/users/index.html.erb b/backend/app/views/spree/admin/users/index.html.erb
index ef37c2bb35..8bbe929e58 100644
--- a/backend/app/views/spree/admin/users/index.html.erb
+++ b/backend/app/views/spree/admin/users/index.html.erb
@@ -59,9 +59,11 @@
<% @users.each do |user| %>
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
<td class='user_email'><%= link_to user.email, edit_admin_user_url(user) %></td>
- <td data-hook="admin_users_index_row_actions" class="actions actions-2 text-right">
- <%= link_to_edit user, no_text: true if can?(:edit, user) %>
- <%= link_to_delete user, no_text: true if can?(:delete, user) %>
+ <td data-hook="admin_users_index_row_actions" class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit user, no_text: true if can?(:edit, user) %>
+ <%= link_to_delete user, no_text: true if can?(:delete, user) %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/variants/index.html.erb b/backend/app/views/spree/admin/variants/index.html.erb
index a9c6a98084..9a9fff2ff3 100644
--- a/backend/app/views/spree/admin/variants/index.html.erb
+++ b/backend/app/views/spree/admin/variants/index.html.erb
@@ -25,9 +25,11 @@
<td><%= variant.options_text %></td>
<td><%= display_price(variant) %></td>
<td><%= variant.sku %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(variant, no_text: true) if can?(:edit, variant) && !variant.deleted? %>
- <%= link_to_delete(variant, no_text: true) if can?(:destroy, variant) && !variant.deleted? %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(variant, no_text: true) if can?(:edit, variant) && !variant.deleted? %>
+ <%= link_to_delete(variant, no_text: true) if can?(:destroy, variant) && !variant.deleted? %>
+ </span>
</td>
</tr>
<% end %>
diff --git a/backend/app/views/spree/admin/zones/index.html.erb b/backend/app/views/spree/admin/zones/index.html.erb
index 5d5808dba6..546cd358e1 100644
--- a/backend/app/views/spree/admin/zones/index.html.erb
+++ b/backend/app/views/spree/admin/zones/index.html.erb
@@ -25,9 +25,11 @@
<td><%= zone.name %></td>
<td><%= zone.description %></td>
<td><%= active_badge(zone.default_tax?) %></td>
- <td class="actions actions-2 text-right">
- <%= link_to_edit(zone, no_text: true) if can? :edit, zone %>
- <%= link_to_delete(zone, no_text: true) if can? :delete, zone %>
+ <td class="actions">
+ <span class="d-flex justify-content-end">
+ <%= link_to_edit(zone, no_text: true) if can? :edit, zone %>
+ <%= link_to_delete(zone, no_text: true) if can? :delete, zone %>
+ </span>
</td>
</tr>
<% end %>