mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-08 07:44:59 +00:00
fixes for budgets
This commit is contained in:
@@ -32,65 +32,43 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if resources|length == 0 and charges|length == 0 %}
|
||||
{# <div class="flex-table"> #}
|
||||
{# <div class="item-bloc">
|
||||
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
||||
</div> #}
|
||||
{# </div> #}
|
||||
|
||||
<h3 class="subtitle">{{ 'Actual budget'|trans }}</h3>
|
||||
|
||||
{% if actualCharges|length > 0 or actualResources|length > 0 %}
|
||||
{% include 'ChillBudgetBundle:Budget:_current_budget.html.twig' with {
|
||||
'actualResources': actualResources,
|
||||
'actualCharges': actualCharges,
|
||||
'results': results,
|
||||
'entity': entity
|
||||
} %}
|
||||
{% else %}
|
||||
|
||||
<h2 class="subtitle">{{ 'Actual budget'|trans }}</h3>
|
||||
|
||||
{% if actualCharges|length > 0 or actualResources|length > 0 %}
|
||||
{% include 'ChillBudgetBundle:Budget:_current_budget.html.twig' with {
|
||||
'actualResources': actualResources,
|
||||
'actualCharges': actualCharges,
|
||||
'results': results,
|
||||
'entity': entity
|
||||
} %}
|
||||
{% else %}
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
||||
</div>
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if pastCharges|length > 0 or pastResources|length > 0 %}
|
||||
<h2 class="subtitle">{{ 'Past budget'|trans }}</h2>
|
||||
|
||||
{% if pastCharges|length > 0 or pastResources|length > 0 %}
|
||||
{% include 'ChillBudgetBundle:Budget:_past_budget.html.twig' with {
|
||||
'pastCharges': pastCharges,
|
||||
'pastResources': pastResources,
|
||||
'entity': entity
|
||||
} %}
|
||||
{% else %}
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'ChillBudgetBundle:Budget:_past_budget.html.twig' with {
|
||||
'pastCharges': pastCharges,
|
||||
'pastResources': pastResources,
|
||||
'entity': entity
|
||||
} %}
|
||||
{% endif %}
|
||||
|
||||
{% if futureCharges|length > 0 or futureResources|length > 0 %}
|
||||
<h2 class="subtitle">{{ 'Future budget'|trans }}</h2>
|
||||
|
||||
{% if futureCharges|length > 0 or futureResources|length > 0 %}
|
||||
{% include 'ChillBudgetBundle:Budget:_future_budget.html.twig' with {
|
||||
'futureResources': futureResources,
|
||||
'futureCharges': futureCharges,
|
||||
'entity': entity
|
||||
} %}
|
||||
{% else %}
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% include 'ChillBudgetBundle:Budget:_future_budget.html.twig' with {
|
||||
'futureResources': futureResources,
|
||||
'futureCharges': futureCharges,
|
||||
'entity': entity
|
||||
} %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
{# <h2 class="subtitle">{{ 'Actual budget'|trans }}</h2> #}
|
||||
|
||||
<div class="flex-table">
|
||||
<h3 class="family-title">{{ 'Actual resources'|trans }}</h3>
|
||||
<h4 class="family-title">{{ 'Actual resources'|trans }}</h4>
|
||||
|
||||
{% if actualResources|length > 0 %}
|
||||
<div class="item-bloc">
|
||||
@@ -17,6 +17,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex-table">
|
||||
<h4 class="family-title">{{ 'Actual charges'|trans }}</h4>
|
||||
{% if actualCharges|length > 0 %}
|
||||
<div class="item-bloc">
|
||||
{{ table_elements(actualCharges, 'charge') }}
|
||||
@@ -26,4 +27,4 @@
|
||||
<span class="chill-no-data-statement">{{ 'No charges registered'|trans }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -14,7 +14,10 @@
|
||||
{% set total = total + f.amount %}
|
||||
<tr>
|
||||
<td class="column-wide el-type">
|
||||
{{ f.type|budget_element_type_display(family) }}
|
||||
<span class="badge-title">
|
||||
<span class="title_label title_label_{{ family }}"></span>
|
||||
<span class="title_action">{{ f.type|budget_element_type_display(family) }}<span>
|
||||
</span>
|
||||
</td>
|
||||
<td class="column-small">{{ f.amount|format_currency('EUR') }}</td>
|
||||
<td class="column-wide">
|
||||
@@ -91,4 +94,4 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
@@ -35,7 +35,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' }, 'label': 'Edit' } ) }}
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-edit' }, 'label': 'Edit' } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@@ -24,9 +24,9 @@
|
||||
} %}
|
||||
|
||||
<div class="flex-table">
|
||||
<h3 class="family-title">{{ 'Budget calculator'|trans }}</h2>
|
||||
<h3 class="family-title">{{ 'Budget calculator'|trans }}</h3>
|
||||
<div class="item-bloc">
|
||||
{{ table_results(charges, resources) }}
|
||||
{{ table_results(wholeCharges, wholeResources) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
data-bs-target="#collapse_{{ member.id }}"
|
||||
aria-expanded="false"
|
||||
aria-controls="collapse_{{ member.id }}">
|
||||
<span class="folded">{{ 'Show budget of %name%'|trans({'%name%': member.firstName ~ " " ~ member.lastName }) }}</span>
|
||||
<span class="folded">{{ 'Show budget of %name%'|trans({'%name%': member.firstName ~ " " ~ member.lastName }) }} ({{ 'budget.number of elements'|trans({ 'nb_items': member.getBudgetResources|length + member.getBudgetResources|length }) }})</span>
|
||||
<span class="unfolded text-secondary">{{ 'Hide budget of %name%'|trans({'%name%': member.firstName ~ " " ~ member.lastName }) }}</span>
|
||||
</button>
|
||||
</h2>
|
||||
|
@@ -36,7 +36,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-create' }, 'label': 'Edit' } ) }}
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class': 'btn btn-edit' }, 'label': 'Edit' } ) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
Reference in New Issue
Block a user