mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
restyling layout of table
This commit is contained in:
parent
cefa304fb5
commit
86de8137e4
@ -18,24 +18,32 @@
|
|||||||
}
|
}
|
||||||
.budget-table {
|
.budget-table {
|
||||||
th.resource {
|
th.resource {
|
||||||
background-color: #9bcebd;
|
background-color: #6d9e63;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.budget-table {
|
.budget-table {
|
||||||
th, td {
|
th, td {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
text-align: left;
|
text-align: right;
|
||||||
}
|
}
|
||||||
td.column-wide {
|
td.column-wide {
|
||||||
width: 25%;
|
width: 20%;
|
||||||
}
|
}
|
||||||
td.column-small {
|
td.column-small {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
|
&.right {
|
||||||
|
align-items: right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bold {
|
.btn-budget {
|
||||||
|
margin-right: 1rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-type {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.total {
|
.total {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<table class="budget-table">
|
<table class="budget-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="{{ family }}">{{ 'Budget element type'|trans }}</th>
|
<th class="{{ family }} el-type">{{ 'Budget element type'|trans }}</th>
|
||||||
<th class="{{ family }}">{{ 'Amount'|trans }}</th>
|
<th class="{{ family }}">{{ 'Amount'|trans }}</th>
|
||||||
<th class="{{ family }}">{{ 'Validity period'|trans }}</th>
|
<th class="{{ family }}">{{ 'Validity period'|trans }}</th>
|
||||||
<th class="{{ family }}"> </th>
|
<th class="{{ family }}"> </th>
|
||||||
@ -13,11 +13,11 @@
|
|||||||
{% for f in elements %}
|
{% for f in elements %}
|
||||||
{% set total = total + f.amount %}
|
{% set total = total + f.amount %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="column-wide bold">
|
<td class="column-wide el-type">
|
||||||
{{ f.type|budget_element_type_display(family) }}
|
{{ f.type|budget_element_type_display(family) }}
|
||||||
</td>
|
</td>
|
||||||
<td class="column-small">{{ f.amount|format_currency('EUR') }}</td>
|
<td class="column-small">{{ f.amount|format_currency('EUR') }}</td>
|
||||||
<td class="column-small">
|
<td class="column-wide">
|
||||||
{% if f.endDate is not null %}
|
{% if f.endDate is not null %}
|
||||||
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('short'), '%endDate%': f.endDate|format_date('short') } ) }}
|
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('short'), '%endDate%': f.endDate|format_date('short') } ) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -46,7 +46,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<tr class="total">
|
<tr class="total">
|
||||||
<td>
|
<td class="el-type">
|
||||||
{{ 'Total'|trans }}
|
{{ 'Total'|trans }}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -59,29 +59,36 @@
|
|||||||
</table>
|
</table>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro table_results(results) %}
|
{% macro table_results(actualCharges, actualResources) %}
|
||||||
|
|
||||||
|
{% set totalCharges = 0 %}
|
||||||
|
{% for c in actualCharges %}
|
||||||
|
{% set totalCharges = totalCharges + c.amount %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% set totalResources = 0 %}
|
||||||
|
{% for r in actualResources %}
|
||||||
|
{% set totalResources = totalResources + r.amount %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% set result = (totalResources - totalCharges) %}
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th> </th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<th>{{ 'Budget calculator result'|trans }}</th>
|
<th>{{ 'Budget calculator result'|trans }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for result in results %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ result.label }}</td>
|
<td>Result</td>
|
||||||
|
<td> </td>
|
||||||
<td>
|
<td>
|
||||||
{% if result.type == constant('CHILL\\BudgetBundle\\Calculator\\CalculatorResult::TYPE_CURRENCY') %}
|
{{ result|format_currency('EUR') }}
|
||||||
{{ result.result|format_currency('EUR') }}
|
|
||||||
{% elseif result.type == constant('CHILL\\BudgetBundle\\Calculator\\CalculatorResult::TYPE_PERCENTAGE') %}
|
|
||||||
{{ result.result|round(2, 'ceil') ~ '%' }}
|
|
||||||
{% else %}
|
|
||||||
{{ result.result|round(2, 'common') }}
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
@ -9,7 +9,7 @@ See complete budget: Voir budget complet
|
|||||||
Hide budget: Masquer
|
Hide budget: Masquer
|
||||||
Hide budget of %name%: Masquer budget de %name%
|
Hide budget of %name%: Masquer budget de %name%
|
||||||
Resource element type: Nature de la ressource
|
Resource element type: Nature de la ressource
|
||||||
Actual budget: Budget actuel
|
Actual budget: Éléments actuels du budget
|
||||||
Actual resources: Ressources actuelles
|
Actual resources: Ressources actuelles
|
||||||
Actual resources for %name%: Ressources actuelles de %name%
|
Actual resources for %name%: Ressources actuelles de %name%
|
||||||
Actual charges for %name%: Charges actuelles de %name%
|
Actual charges for %name%: Charges actuelles de %name%
|
||||||
@ -40,10 +40,11 @@ No future resources registered: Aucune ressource future enregistrée
|
|||||||
No future charges registered: Aucune ressource future enregistrée
|
No future charges registered: Aucune ressource future enregistrée
|
||||||
No current budget element registered: Pas des éléments de budget actuelles enregistrés
|
No current budget element registered: Pas des éléments de budget actuelles enregistrés
|
||||||
|
|
||||||
New Resource for %name%: Nouvelle ressource pour %name%
|
New resource: Nouvelle ressource
|
||||||
New Charge for %name%: Nouvelle charge pour %name%
|
New charge: Nouvelle charge
|
||||||
Edit Resource for %name%: Modifier une ressource de %name%
|
Edit resource: Modifier une ressource
|
||||||
Edit Charge for %name%: Modifier une charge de %name%
|
Edit: Modifier
|
||||||
|
Edit charge: Modifier une charge
|
||||||
Remove resource: Supprimer la ressource
|
Remove resource: Supprimer la ressource
|
||||||
Remove charge: Supprimer la charge
|
Remove charge: Supprimer la charge
|
||||||
Are you sure you want to remove the ressource "%type%" associated to "%name%" ?: Êtes-vous sûr·e de vouloir supprimer la ressource de nature "%type%" associée à %name% ?
|
Are you sure you want to remove the ressource "%type%" associated to "%name%" ?: Êtes-vous sûr·e de vouloir supprimer la ressource de nature "%type%" associée à %name% ?
|
||||||
@ -68,7 +69,7 @@ charge.help.yes: Oui
|
|||||||
charge.help.not-concerned: Non concerné
|
charge.help.not-concerned: Non concerné
|
||||||
|
|
||||||
Budget calculator: Calculs et indices sur le budget
|
Budget calculator: Calculs et indices sur le budget
|
||||||
Budget calculator result: Résultats
|
Budget calculator result: Résultats
|
||||||
|
|
||||||
'Valid since %startDate% until %endDate%': Valide depuis le %startDate% jusqu'au %endDate%
|
'Valid since %startDate% until %endDate%': '%startDate% - %endDate%'
|
||||||
'Valid since %startDate%': Valide depuis le %startDate%
|
'Valid since %startDate%': '%startDate% - ...'
|
Loading…
x
Reference in New Issue
Block a user