template fixes and controller fixes for household budget

This commit is contained in:
2022-02-25 10:30:37 +01:00
parent 92a6fed521
commit fc5a893b00
10 changed files with 67 additions and 25 deletions

View File

@@ -21,7 +21,7 @@
background-color: #e03851;
}
.budget-table th.resource {
background-color: #5ba1c1;
background-color: #6d9e63;
}
.budget-table th, td {
padding: 10px;
@@ -214,16 +214,16 @@
{% endif %}
</div>
{% if is_granted('CHILL_BUDGET_ELEMENT_CREATE', household) %}
<ul class="record_actions">
{# {% if is_granted('CHILL_BUDGET_ELEMENT_CREATE', household) %} #}
<ul class="record_actions sticky-form-buttons">
<li>
<a class="btn btn-create" href="{{ path('chill_budget_resource_new', { 'id': household.id} ) }}">{{ 'Create new resource'|trans }}</a>
<a class="btn btn-create" href="{{ path('chill_budget_resource_household_new', { 'id': household.id} ) }}">{{ 'Create new resource'|trans }}</a>
</li>
<li>
<a class="btn btn-create" href="{{ path('chill_budget_charge_new', { 'id': household.id} ) }}">{{ 'Create new charge'|trans }}</a>
<a class="btn btn-create" href="{{ path('chill_budget_charge_household_new', { 'id': household.id} ) }}">{{ 'Create new charge'|trans }}</a>
</li>
</ul>
{% endif %}
{# {% endif %} #}
{% endif %}
@@ -284,16 +284,16 @@
{% endif %}
{% if (resources|length + charges|length) == 0 or futureCharges|length > 0 or futureResources|length > 0 or pastCharges|length > 0 or pastResources|length > 0 %}
{% if is_granted('CHILL_BUDGET_ELEMENT_CREATE', household) %}
{# {% if is_granted('CHILL_BUDGET_ELEMENT_CREATE', household) %} #}
<ul class="record_actions sticky-form-buttons">
<li>
<a class="btn btn-create" href="{{ path('chill_budget_resource_new', { 'id': household.id} ) }}">{{ 'Create new resource'|trans }}</a>
<a class="btn btn-create" href="{{ path('chill_budget_resource_household_new', { 'id': household.id} ) }}">{{ 'Create new resource'|trans }}</a>
</li>
<li>
<a class="btn btn-create" href="{{ path('chill_budget_charge_new', { 'id': household.id} ) }}">{{ 'Create new charge'|trans }}</a>
<a class="btn btn-create" href="{{ path('chill_budget_charge_household_new', { 'id': household.id} ) }}">{{ 'Create new charge'|trans }}</a>
</li>
</ul>
{% endif %}
{# {% endif %} #}
{% endif %}
{% endblock %}