mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 22:04:23 +00:00
improvements templates
This commit is contained in:
parent
0648154ba1
commit
900adc7105
@ -40,43 +40,64 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% include 'ChillBudgetBundle:Budget:_current_budget.html.twig' with {
|
<h2 class="subtitle">{{ 'Actual budget'|trans }}</h3>
|
||||||
'actualResources': actualResources,
|
|
||||||
'actualCharges': actualCharges,
|
|
||||||
'results': results,
|
|
||||||
'entity': entity
|
|
||||||
} %}
|
|
||||||
|
|
||||||
{% endif %}
|
{% if actualCharges|length > 0 or actualResources|length > 0 %}
|
||||||
|
{% include 'ChillBudgetBundle:Budget:_current_budget.html.twig' with {
|
||||||
<h2 class="subtitle">{{ 'Past budget'|trans }}</h2>
|
'actualResources': actualResources,
|
||||||
|
'actualCharges': actualCharges,
|
||||||
{% if pastCharges|length > 0 or pastResources|length > 0 %}
|
'results': results,
|
||||||
{% include 'ChillBudgetBundle:Budget:_past_budget.html.twig' with {
|
'entity': entity
|
||||||
'pastCharges': pastCharges,
|
} %}
|
||||||
'pastResources': pastResources,
|
{% else %}
|
||||||
'entity': entity
|
<div class="flex-table">
|
||||||
} %}
|
<div class="item-bloc">
|
||||||
{% else %}
|
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
||||||
<div class="flex-table">
|
</div>
|
||||||
<div class="item-bloc">
|
|
||||||
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<h2 class="subtitle">{{ 'Future budget'|trans }}</h2>
|
<h2 class="subtitle">{{ 'Past budget'|trans }}</h2>
|
||||||
|
|
||||||
{% if futureCharges|length > 0 or futureResources|length > 0 %}
|
{% if pastCharges|length > 0 or pastResources|length > 0 %}
|
||||||
{% include 'ChillBudgetBundle:Budget:_future_budget.html.twig' with {
|
{% include 'ChillBudgetBundle:Budget:_past_budget.html.twig' with {
|
||||||
'futureResources': futureResources,
|
'pastCharges': pastCharges,
|
||||||
'futureCharges': futureCharges,
|
'pastResources': pastResources,
|
||||||
'entity': entity
|
'entity': entity
|
||||||
} %}
|
} %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="flex-table">
|
<div class="flex-table">
|
||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
<p><span class="chill-no-data-statement">{{ "There isn't any element recorded"|trans }}</span></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
|
|
||||||
|
<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 %}
|
||||||
|
|
||||||
|
{# <div class="flex-table">
|
||||||
|
<div class="item-bloc">
|
||||||
|
<div class="item-col">
|
||||||
|
<p><span class="budget-result">result of budget</span></p>
|
||||||
|
</div>
|
||||||
|
<div class="item-col">
|
||||||
|
<p>{{}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> #}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% from 'ChillBudgetBundle:Budget:_macros.html.twig' import table_elements, table_results %}
|
{% from 'ChillBudgetBundle:Budget:_macros.html.twig' import table_elements, table_results %}
|
||||||
|
|
||||||
<h2 class="subtitle">{{ 'Actual budget'|trans }}</h2>
|
{# <h2 class="subtitle">{{ 'Actual budget'|trans }}</h2> #}
|
||||||
|
|
||||||
<div class="flex-table">
|
<div class="flex-table">
|
||||||
<h3 class="family-title">{{ 'Actual resources'|trans }}</h3>
|
<h3 class="family-title">{{ 'Actual resources'|trans }}</h3>
|
||||||
@ -17,8 +17,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-table">
|
<div class="flex-table">
|
||||||
<h3 class="family-title">{{ 'Actual charges'|trans }}</h3>
|
|
||||||
|
|
||||||
{% if actualCharges|length > 0 %}
|
{% if actualCharges|length > 0 %}
|
||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
{{ table_elements(actualCharges, 'charge') }}
|
{{ table_elements(actualCharges, 'charge') }}
|
||||||
@ -29,10 +27,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if results|length > 0 %}
|
{# {% if results|length > 0 %} #}
|
||||||
<h2>{{ 'Budget calculator'|trans }}</h2>
|
<div class="flex-table">
|
||||||
<div class="item-bloc">
|
<h3 class="family-title">{{ 'Budget calculator'|trans }}</h2>
|
||||||
{{ table_results(results) }}
|
<div class="item-bloc">
|
||||||
|
{{ table_results(actualCharges, actualResources) }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{# {% endif %} #}
|
||||||
</div>
|
</div>
|
@ -3,15 +3,15 @@
|
|||||||
{% set indexPage = 'chill_budget_elements_index' %}
|
{% set indexPage = 'chill_budget_elements_index' %}
|
||||||
{% set activeRouteKey = '' %}
|
{% set activeRouteKey = '' %}
|
||||||
{% set person = element.person %}
|
{% set person = element.person %}
|
||||||
{% set title = 'Edit charge for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set template = '@ChillPerson/Household/layout.html.twig' %}
|
{% set template = '@ChillPerson/Household/layout.html.twig' %}
|
||||||
{% set indexPage = 'chill_budget_elements_household_index' %}
|
{% set indexPage = 'chill_budget_elements_household_index' %}
|
||||||
{% set activeRouteKey = '' %}
|
{% set activeRouteKey = '' %}
|
||||||
{% set household = element.household %}
|
{% set household = element.household %}
|
||||||
{% set title = 'Edit charge for household %household%'|trans({ '%household%' : household.id } ) %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set title = 'Edit charge'|trans %}
|
||||||
|
|
||||||
{% extends template %}
|
{% extends template %}
|
||||||
|
|
||||||
{% block title title %}
|
{% block title title %}
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
{% set indexPage = 'chill_budget_elements_index' %}
|
{% set indexPage = 'chill_budget_elements_index' %}
|
||||||
{% set activeRouteKey = '' %}
|
{% set activeRouteKey = '' %}
|
||||||
{% set person = element.person %}
|
{% set person = element.person %}
|
||||||
{% set title = 'New charge for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
|
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set template = '@ChillPerson/Household/layout.html.twig' %}
|
{% set template = '@ChillPerson/Household/layout.html.twig' %}
|
||||||
{% set indexPage = 'chill_budget_elements_household_index' %}
|
{% set indexPage = 'chill_budget_elements_household_index' %}
|
||||||
{% set activeRouteKey = '' %}
|
{% set activeRouteKey = '' %}
|
||||||
{% set household = element.household %}
|
{% set household = element.household %}
|
||||||
{% set title = 'New charge for household %household%'|trans({ '%household%' : household.id } ) %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set title = 'New charge'|trans %}
|
||||||
|
|
||||||
{% extends template %}
|
{% extends template %}
|
||||||
{% block title title %}
|
{% block title title %}
|
||||||
|
|
||||||
|
@ -56,16 +56,8 @@
|
|||||||
|
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
{% if is_granted('CHILL_BUDGET_ELEMENT_SEE', member) %}
|
{% if is_granted('CHILL_BUDGET_ELEMENT_SEE', member) %}
|
||||||
<li>
|
<li class="btn-budget">
|
||||||
<a class="btn btn-show" title={{ 'See person'|trans }} href="{{ path('chill_person_view', { 'person_id': member.id } ) }}"></a>
|
<a class="btn btn-edit" title={{ 'Edit budget'|trans }} href="{{ path('chill_budget_elements_index', { 'id': member.id } ) }}"></a>
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if is_granted('CHILL_BUDGET_ELEMENT_CREATE', member) %}
|
|
||||||
<li>
|
|
||||||
<a class="btn btn-create" title={{ 'Create new resource'|trans }} href="{{ path('chill_budget_resource_new', { 'id': member.id} ) }}">{{ 'Resource'|trans }}</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="btn btn-create" title={{ 'Create new charge'|trans }} href="{{ path('chill_budget_charge_new', { 'id': member.id} ) }}">{{ 'Charge'|trans }}</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{% set indexPage = 'chill_budget_elements_index' %}
|
{% set indexPage = 'chill_budget_elements_index' %}
|
||||||
{% set activeRouteKey = '' %}
|
{% set activeRouteKey = '' %}
|
||||||
{% set person = element.person %}
|
{% set person = element.person %}
|
||||||
{% set title = 'Edit Resource for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
|
{% set title = 'Edit resource for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set template = '@ChillPerson/Household/layout.html.twig' %}
|
{% set template = '@ChillPerson/Household/layout.html.twig' %}
|
||||||
{% set indexPage = 'chill_budget_elements_household_index' %}
|
{% set indexPage = 'chill_budget_elements_household_index' %}
|
||||||
@ -12,6 +12,8 @@
|
|||||||
{% set title = 'Edit resource for household %household%'|trans({ '%household%' : household.id } ) %}
|
{% set title = 'Edit resource for household %household%'|trans({ '%household%' : household.id } ) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set title = 'Edit resource'|trans %}
|
||||||
|
|
||||||
{% extends template %}
|
{% extends template %}
|
||||||
|
|
||||||
{% block title title %}
|
{% block title title %}
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
{% set title = 'New Resource for household %household%'|trans({ '%household%' : household.id } ) %}
|
{% set title = 'New Resource for household %household%'|trans({ '%household%' : household.id } ) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set title = 'New resource'|trans %}
|
||||||
|
|
||||||
{% extends template %}
|
{% extends template %}
|
||||||
|
|
||||||
{% block title title %}
|
{% block title title %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user