From 52cb6d4eecfa5c7d8b435804f56ae77feb2d1af2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Fri, 6 Jan 2023 10:45:30 +0100 Subject: [PATCH] Put all actions in the same flex container, aligned to right --- app/views/admin/order_cycles/_header.html.haml | 2 -- app/views/admin/order_cycles/_row.html.haml | 13 ++++++------- app/webpacker/css/admin/v2/components/tables.scss | 4 ++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/views/admin/order_cycles/_header.html.haml b/app/views/admin/order_cycles/_header.html.haml index 0d3f9fba8e..c77bb3d888 100644 --- a/app/views/admin/order_cycles/_header.html.haml +++ b/app/views/admin/order_cycles/_header.html.haml @@ -32,5 +32,3 @@ %th{ ng: { show: 'columns.products.visible' } } =t :products %th.actions - %th.actions - %th.actions diff --git a/app/views/admin/order_cycles/_row.html.haml b/app/views/admin/order_cycles/_row.html.haml index aea9780962..1fbba44186 100644 --- a/app/views/admin/order_cycles/_row.html.haml +++ b/app/views/admin/order_cycles/_row.html.haml @@ -32,10 +32,9 @@ = t('.variants') %td.actions - %a.edit-order-cycle.icon-edit.no-text{ ng: { href: '{{orderCycle.edit_path}}'}, 'ofn-with-tip' => t(:edit) } - %td.actions - %div{ ng: { if: 'orderCycle.viewing_as_coordinator' } } - %a.clone-order-cycle.icon-copy.no-text{ ng: { href: '{{orderCycle.clone_path}}'}, 'ofn-with-tip' => t(:clone) } - %td.actions - %div{ ng: { if: 'orderCycle.deletable && orderCycle.viewing_as_coordinator' }} - %a.delete-order-cycle.icon-trash.no-text{ ng: { href: '{{orderCycle.delete_path}}'}, data: { method: 'delete', confirm: t(:are_you_sure) }, 'ofn-with-tip' => t(:remove) } + .flex + %a.edit-order-cycle.icon-edit.no-text{ ng: { href: '{{orderCycle.edit_path}}'}, 'ofn-with-tip' => t(:edit) } + %div{ ng: { if: 'orderCycle.viewing_as_coordinator' } } + %a.clone-order-cycle.icon-copy.no-text{ ng: { href: '{{orderCycle.clone_path}}'}, 'ofn-with-tip' => t(:clone) } + %div{ ng: { if: 'orderCycle.deletable && orderCycle.viewing_as_coordinator' }} + %a.delete-order-cycle.icon-trash.no-text{ ng: { href: '{{orderCycle.delete_path}}'}, data: { method: 'delete', confirm: t(:are_you_sure) }, 'ofn-with-tip' => t(:remove) } diff --git a/app/webpacker/css/admin/v2/components/tables.scss b/app/webpacker/css/admin/v2/components/tables.scss index 8d5cfb3f3c..6f7128446a 100644 --- a/app/webpacker/css/admin/v2/components/tables.scss +++ b/app/webpacker/css/admin/v2/components/tables.scss @@ -46,6 +46,10 @@ table tbody tr { display: flex; column-gap: 10px; } + + &.actions > .flex { + justify-content: flex-end; + } } &.even, &.odd {