mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 18:14:59 +00:00
improve Budget template
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{% macro table_elements(elements, family) %}
|
||||
<table class="budget-table">
|
||||
<table class="table table-bordered border-dark budget-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="{{ family }} el-type">{{ 'Budget element type'|trans }}</th>
|
||||
@@ -13,25 +13,22 @@
|
||||
{% for f in elements %}
|
||||
{% set total = total + f.amount %}
|
||||
<tr>
|
||||
<td class="column-wide el-type">
|
||||
<span class="badge-title">
|
||||
<span class="title_label title_label_{{ family }}"></span>
|
||||
{% if f.isResource %}
|
||||
<span class="title_action">{{ f.resource.name|localize_translatable_string }}<span>
|
||||
{% else %}
|
||||
<span class="title_action">{{ f.charge.name|localize_translatable_string }}<span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<td class="el-type">
|
||||
{% if f.isResource %}
|
||||
{{ f.resource.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
{{ f.charge.name|localize_translatable_string }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="column-small">{{ f.amount|format_currency('EUR') }}</td>
|
||||
<td class="column-wide">
|
||||
<td>{{ f.amount|format_currency('EUR') }}</td>
|
||||
<td>
|
||||
{% if f.endDate is not null %}
|
||||
{{ f.startDate|format_date('short') ~ ' - ' ~ f.endDate|format_date('short') }}
|
||||
{% else %}
|
||||
{{ f.startDate|format_date('short') ~ ' - ...' }}
|
||||
{{ 'depuis le ' ~ f.startDate|format_date('short') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="column-small">
|
||||
<td class="column-fixed">
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_BUDGET_ELEMENT_SEE', f) %}
|
||||
<li>
|
||||
@@ -80,10 +77,9 @@
|
||||
|
||||
{% set result = (totalResources - totalCharges) %}
|
||||
|
||||
<table>
|
||||
<table class="table table-bordered border-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>{{ 'Budget calculator result'|trans }}</th>
|
||||
</tr>
|
||||
@@ -91,7 +87,6 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ 'The balance'|trans }}</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
{{ result|format_currency('EUR') }}
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user