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 {
|
||||
th.resource {
|
||||
background-color: #9bcebd;
|
||||
background-color: #6d9e63;
|
||||
}
|
||||
}
|
||||
.budget-table {
|
||||
th, td {
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
text-align: right;
|
||||
}
|
||||
td.column-wide {
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
}
|
||||
td.column-small {
|
||||
width: 15%;
|
||||
&.right {
|
||||
align-items: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bold {
|
||||
.btn-budget {
|
||||
margin-right: 1rem !important;
|
||||
}
|
||||
|
||||
.el-type {
|
||||
font-weight: 600;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.total {
|
||||
|
@ -2,7 +2,7 @@
|
||||
<table class="budget-table">
|
||||
<thead>
|
||||
<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 }}">{{ 'Validity period'|trans }}</th>
|
||||
<th class="{{ family }}"> </th>
|
||||
@ -13,11 +13,11 @@
|
||||
{% for f in elements %}
|
||||
{% set total = total + f.amount %}
|
||||
<tr>
|
||||
<td class="column-wide bold">
|
||||
<td class="column-wide el-type">
|
||||
{{ f.type|budget_element_type_display(family) }}
|
||||
</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 %}
|
||||
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': f.startDate|format_date('short'), '%endDate%': f.endDate|format_date('short') } ) }}
|
||||
{% else %}
|
||||
@ -46,7 +46,7 @@
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr class="total">
|
||||
<td>
|
||||
<td class="el-type">
|
||||
{{ 'Total'|trans }}
|
||||
</td>
|
||||
<td>
|
||||
@ -59,29 +59,36 @@
|
||||
</table>
|
||||
{% 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>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>{{ 'Budget calculator result'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for result in results %}
|
||||
<tr>
|
||||
<td>{{ result.label }}</td>
|
||||
<td>Result</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
{% if result.type == constant('CHILL\\BudgetBundle\\Calculator\\CalculatorResult::TYPE_CURRENCY') %}
|
||||
{{ 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 %}
|
||||
{{ result|format_currency('EUR') }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endmacro %}
|
@ -9,7 +9,7 @@ See complete budget: Voir budget complet
|
||||
Hide budget: Masquer
|
||||
Hide budget of %name%: Masquer budget de %name%
|
||||
Resource element type: Nature de la ressource
|
||||
Actual budget: Budget actuel
|
||||
Actual budget: Éléments actuels du budget
|
||||
Actual resources: Ressources actuelles
|
||||
Actual resources for %name%: Ressources 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 current budget element registered: Pas des éléments de budget actuelles enregistrés
|
||||
|
||||
New Resource for %name%: Nouvelle ressource pour %name%
|
||||
New Charge for %name%: Nouvelle charge pour %name%
|
||||
Edit Resource for %name%: Modifier une ressource de %name%
|
||||
Edit Charge for %name%: Modifier une charge de %name%
|
||||
New resource: Nouvelle ressource
|
||||
New charge: Nouvelle charge
|
||||
Edit resource: Modifier une ressource
|
||||
Edit: Modifier
|
||||
Edit charge: Modifier une charge
|
||||
Remove resource: Supprimer la ressource
|
||||
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% ?
|
||||
@ -68,7 +69,7 @@ charge.help.yes: Oui
|
||||
charge.help.not-concerned: Non concerné
|
||||
|
||||
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%': Valide depuis le %startDate%
|
||||
'Valid since %startDate% until %endDate%': '%startDate% - %endDate%'
|
||||
'Valid since %startDate%': '%startDate% - ...'
|
Loading…
x
Reference in New Issue
Block a user