From cb0ff88318856f0b9369c1996b9e90596c85794f Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 24 Apr 2023 13:29:45 +0200 Subject: [PATCH] Fix action column width --- .../Resources/public/page/chillbudget.scss | 24 ++++--------------- .../Resources/views/Budget/_macros.html.twig | 21 +++++++--------- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/src/Bundle/ChillBudgetBundle/Resources/public/page/chillbudget.scss b/src/Bundle/ChillBudgetBundle/Resources/public/page/chillbudget.scss index cca1b1a4a..79f40dc76 100644 --- a/src/Bundle/ChillBudgetBundle/Resources/public/page/chillbudget.scss +++ b/src/Bundle/ChillBudgetBundle/Resources/public/page/chillbudget.scss @@ -28,29 +28,15 @@ h4.family-title { } } -.budget-table { - th.charge { - background-color: $col_charge; - } -} -.budget-table { - th.resource { - background-color: $col_resource; - } -} -.budget-table { +table.budget-table { th, td { padding: 10px; text-align: right; } - td.column-wide { - width: 20%; - } - td.column-small { - width: 15%; - &.right { - align-items: right; - } + th.charge { background-color: $col_charge; } + th.resource { background-color: $col_resource; } + td.column-fixed { + width: 9.5em; } } diff --git a/src/Bundle/ChillBudgetBundle/Resources/views/Budget/_macros.html.twig b/src/Bundle/ChillBudgetBundle/Resources/views/Budget/_macros.html.twig index 42090984a..70e96d96c 100644 --- a/src/Bundle/ChillBudgetBundle/Resources/views/Budget/_macros.html.twig +++ b/src/Bundle/ChillBudgetBundle/Resources/views/Budget/_macros.html.twig @@ -13,25 +13,22 @@ {% for f in elements %} {% set total = total + f.amount %} - - - - {% if f.isResource %} - {{ f.resource.name|localize_translatable_string }} - {% else %} - {{ f.charge.name|localize_translatable_string }} - {% endif %} - + + {% if f.isResource %} + {{ f.resource.name|localize_translatable_string }} + {% else %} + {{ f.charge.name|localize_translatable_string }} + {% endif %} - {{ f.amount|format_currency('EUR') }} - + {{ f.amount|format_currency('EUR') }} + {% if f.endDate is not null %} {{ f.startDate|format_date('short') ~ ' - ' ~ f.endDate|format_date('short') }} {% else %} {{ 'depuis le ' ~ f.startDate|format_date('short') }} {% endif %} - +
    {% if is_granted('CHILL_BUDGET_ELEMENT_SEE', f) %}