From 576f46f845a458dbb1415b02208d94c45f2055b1 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 23 Feb 2022 15:58:06 +0100 Subject: [PATCH] styling of index page style needs to be moved to correct file and changed scss --- .../Resources/views/Element/index.html.twig | 163 +++++++++++++----- 1 file changed, 119 insertions(+), 44 deletions(-) diff --git a/src/Bundle/ChillBudgetBundle/Resources/views/Element/index.html.twig b/src/Bundle/ChillBudgetBundle/Resources/views/Element/index.html.twig index aab741a6e..5d70d653c 100644 --- a/src/Bundle/ChillBudgetBundle/Resources/views/Element/index.html.twig +++ b/src/Bundle/ChillBudgetBundle/Resources/views/Element/index.html.twig @@ -4,6 +4,51 @@ {% set title = 'Budget for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %} {% block title title %} +{% block css %} + +{% endblock %} + {% set actualResources = [] %} {% set futureResources = [] %} {% set pastResources = [] %} @@ -38,13 +83,13 @@ {% macro table_elements(elements, family) %} - +
- - - - + + + + @@ -52,39 +97,39 @@ {% for f in elements %} {% set total = total + f.amount %} - - - + - {% endfor %} - + @@ -130,32 +175,46 @@ {% block personcontent %}

{{ title }}

-

{{ 'Actual budget'|trans }}

+

{{ 'Actual budget'|trans }}

{% if resources|length == 0 and charges|length == 0 %}

{{ "There isn't any element recorded"|trans }}

{% else %} -

{{ 'Actual resources'|trans }}

- {% if actualResources|length > 0 %} - {{ m.table_elements(actualResources, 'resource') }} - {% else %} - {{ 'No resources registered'|trans }} - {% endif %} +
+

{{ 'Actual resources'|trans }}

-

{{ 'Actual charges'|trans }}

+ {% if actualResources|length > 0 %} +
+ {{ m.table_elements(actualResources, 'resource') }} +
+ {% else %} +
+ {{ 'No resources registered'|trans }} +
+ {% endif %} +
- {% if actualCharges|length > 0 %} - {{ m.table_elements(actualCharges, 'charge') }} - {% else %} - {{ 'No charges registered'|trans }} - {% endif %} +
+

{{ 'Actual charges'|trans }}

- {% if results|length > 0 %} -

{{ 'Budget calculator'|trans }}

+ {% if actualCharges|length > 0 %} +
+ {{ m.table_elements(actualCharges, 'charge') }} +
+ {% else %} +
+ {{ 'No charges registered'|trans }} +
+ {% endif %} - {{ m.table_results(results) }} - {% endif %} + {% if results|length > 0 %} +

{{ 'Budget calculator'|trans }}

+
+ {{ m.table_results(results) }} +
+ {% endif %} +
{# {% if is_granted(constant('Chill\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::CREATE'), person) %} #}
{{ 'Budget element type'|trans }}{{ 'Amount'|trans }}{{ 'Validity period'|trans }} {{ 'Budget element type'|trans }}{{ 'Amount'|trans }}{{ 'Validity period'|trans }} 
+ {{ f.type|budget_element_type_display(family) }} {{ f.amount|format_currency('EUR') }} + {{ f.amount|format_currency('EUR') }} {% if f.endDate is not null %} {{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('long'), '%endDate%': f.endDate|format_date('long') } ) }} {% else %} {{ 'Valid since %startDate%'|trans( { '%startDate%': f.startDate|format_date('long') } ) }} {% endif %} +
    {# {% if is_granted(constant('Chill\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::SHOW'), f) %} #}
  • - +
  • {# {% endif %} #} {# {% if is_granted(constant('Chill\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), f) %} #}
  • - +
  • {# {% endif %} #} {# {% if is_granted(constant('Chill\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::DELETE'), f) %} #}
  • - +
  • {# {% endif %} #}
{{ 'Total'|trans }}