+
{{ 'Past resources'|trans }}
- {% if pastCharges|length > 0 %}
-
- {{ m.table_elements(pastCharges, 'charge') }}
+ {% if pastResources|length > 0 %}
+
+ {{ m.table_elements(pastResources, 'resource') }}
+
+ {% else %}
+
+
{{ 'No past resources registered'|trans }}
+
+ {% endif %}
+
+
+
+
{{ 'Past charges'|trans }}
+
+ {% if pastCharges|length > 0 %}
+
+ {{ m.table_elements(pastCharges, 'charge') }}
+
+ {% else %}
+
+ {{ 'No past charges registered'|trans }}
+
+ {% endif %}
+
- {% else %}
-
- {{ 'No past charges registered'|trans }}
-
- {% endif %}
+
{% endif %}
{% if futureCharges|length > 0 or futureResources|length > 0 %}
-
{{ 'Future resources'|trans }}
+
+
+
- {% if futureResources|length > 0 %}
-
- {{ m.table_elements(futureResources, 'resource') }}
-
- {% else %}
-
- {{ 'No future resources registered'|trans }}
-
- {% endif %}
-
-
-
{{ 'Future charges'|trans }}
+
- {% if futureCharges|length > 0 %}
-
- {{ m.table_elements(futureCharges, 'charge') }}
+
+
{{ 'Future resources'|trans }}
+
+ {% if futureResources|length > 0 %}
+
+ {{ m.table_elements(futureResources, 'resource') }}
+
+ {% else %}
+
+ {{ 'No future resources registered'|trans }}
+
+ {% endif %}
+
+
+
{{ 'Future charges'|trans }}
+
+ {% if futureCharges|length > 0 %}
+
+ {{ m.table_elements(futureCharges, 'charge') }}
+
+ {% else %}
+
+ {{ 'No future charges registered'|trans }}
+
+ {% endif %}
+
- {% else %}
-
- {{ 'No future charges registered'|trans }}
-
- {% endif %}
+
{% endif %}
{% if household.getCurrentMembers|length > 0 %}
-
{{ 'Budget household members'|trans }}
{% for hm in household.getCurrentMembers %}
-
+ {% set member = hm.person %}
+
- {% set member = hm.person %}
-
diff --git a/src/Bundle/ChillBudgetBundle/Resources/views/Person/index.html.twig b/src/Bundle/ChillBudgetBundle/Resources/views/Person/index.html.twig
index 621aa9f83..192eb86a1 100644
--- a/src/Bundle/ChillBudgetBundle/Resources/views/Person/index.html.twig
+++ b/src/Bundle/ChillBudgetBundle/Resources/views/Person/index.html.twig
@@ -44,6 +44,16 @@
margin-top: 1rem;
border-top: 1px dashed black;
}
+
+ .accordion-item {
+ margin-bottom: 1rem;
+ }
+
+ button[aria-expanded="true"] > span.folded,
+ button[aria-expanded="false"] > span.unfolded { display: none; }
+ button[aria-expanded="false"] > span.folded,
+ button[aria-expanded="true"] > span.unfolded { display: inline; }
+
{% endblock %}
@@ -229,61 +239,110 @@
{% if pastCharges|length > 0 or pastResources|length > 0 %}
{{ 'Past budget'|trans }}
-
-
{{ 'Past resources'|trans }}
- {% if pastResources|length > 0 %}
-
- {{ m.table_elements(pastResources, 'resource') }}
-
- {% else %}
-
-
{{ 'No past resources registered'|trans }}
-
- {% endif %}
-
-
-
{{ 'Past charges'|trans }}
+
+
+
- {% if pastCharges|length > 0 %}
-
- {{ m.table_elements(pastCharges, 'charge') }}
+
+
+
+
{{ 'Past resources'|trans }}
+
+ {% if pastResources|length > 0 %}
+
+ {{ m.table_elements(pastResources, 'resource') }}
+
+ {% else %}
+
+
{{ 'No past resources registered'|trans }}
+
+ {% endif %}
+
+
+
+
{{ 'Past charges'|trans }}
+
+ {% if pastCharges|length > 0 %}
+
+ {{ m.table_elements(pastCharges, 'charge') }}
+
+ {% else %}
+
+ {{ 'No past charges registered'|trans }}
+
+ {% endif %}
+
- {% else %}
-
- {{ 'No past charges registered'|trans }}
-
- {% endif %}
+
{% endif %}
{% if futureCharges|length > 0 or futureResources|length > 0 %}
{{ 'Future budget'|trans }}
-
-
{{ 'Future resources'|trans }}
- {% if futureResources|length > 0 %}
-
- {{ m.table_elements(futureResources, 'resource') }}
-
- {% else %}
-
- {{ 'No future resources registered'|trans }}
-
- {% endif %}
-
-
-
{{ 'Future charges'|trans }}
+
+
+
- {% if futureCharges|length > 0 %}
-
- {{ m.table_elements(futureCharges, 'charge') }}
+
+
+
+
{{ 'Future resources'|trans }}
+
+ {% if futureResources|length > 0 %}
+
+ {{ m.table_elements(futureResources, 'resource') }}
+
+ {% else %}
+
+ {{ 'No future resources registered'|trans }}
+
+ {% endif %}
+
+
+
{{ 'Future charges'|trans }}
+
+ {% if futureCharges|length > 0 %}
+
+ {{ m.table_elements(futureCharges, 'charge') }}
+
+ {% else %}
+
+ {{ 'No future charges registered'|trans }}
+
+ {% endif %}
+
- {% else %}
-
- {{ 'No future charges registered'|trans }}
-
- {% endif %}
+
{% endif %}
diff --git a/src/Bundle/ChillBudgetBundle/translations/messages.fr.yml b/src/Bundle/ChillBudgetBundle/translations/messages.fr.yml
index f0d7736aa..93a08d296 100644
--- a/src/Bundle/ChillBudgetBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillBudgetBundle/translations/messages.fr.yml
@@ -11,6 +11,8 @@ Actual resources for %name%: Ressources actuelles de %name%
Actual charges for %name%: Charges actuelles de %name%
Actual charges: Charges actuelles
Past budget: Éléments du budget passé
+Show past budget: Montrer budget passé
+Show future budget: Montrer budget future
Past resources: Ressources passées
Past charges: Chargées passées
Future budget: Futurs éléments du budget