44 lines
1.8 KiB
Twig

{% from 'ChillBudgetBundle:Budget:_macros.html.twig' import table_elements, table_results %}
<div class="accordion" id="past_{{ entity.id }}">
<div class="accordion-item">
<h2 class="accordion-header" id="heading_past_{{ entity.id }}">
<button
class="accordion-button collapsed"
type="button"
data-bs-toggle="collapse"
data-bs-target="#collapse_past_{{ entity.id }}"
aria-expanded="false"
aria-controls="collapse_past_{{ entity.id }}">
<span class="folded">{{ 'Show past budget'|trans }}</span>
<span class="unfolded text-secondary">{{ 'Hide budget'|trans }}</span>
</button>
</h2>
<div id="collapse_past_{{ entity.id }}"
class="accordion-collapse collapse"
aria-labelledby="heading_past_{{ entity.id }}"
data-bs-parent="#past_{{ entity.id }}">
<div class="my-4">
<h4 class="family-title resource"><i class="fa fa-fw fa-plus-square"></i>{{ 'Past resources'|trans }}</h4>
{% if pastResources|length > 0 %}
{{ table_elements(pastResources, 'resource') }}
{% else %}
<span class="chill-no-data-statement">{{ 'No past resources registered'|trans }}</span>
{% endif %}
<h4 class="family-title charge"><i class="fa fa-fw fa-minus-square"></i>{{ 'Past charges'|trans }}</h4>
{% if pastCharges|length > 0 %}
{{ table_elements(pastCharges, 'charge') }}
{% else %}
<span class="chill-no-data-statement">{{ 'No past charges registered'|trans }}</span>
{% endif %}
</div>
</div>
</div>
</div>