Merge remote-tracking branch 'origin/master' into issue503_workflow_document_template

This commit is contained in:
2022-03-18 14:01:43 +01:00
37 changed files with 473 additions and 167 deletions

View File

@@ -0,0 +1,26 @@
{% extends '@ChillPerson/Household/layout.html.twig' %}
{% block title 'household_composition.create'|trans %}
{% block block_post_menu %}
<div class="post-menu"></div>
{% endblock %}
{% block content %}
<h1>{{ 'household_composition.Create'|trans }}</h1>
<div>
{{ form_start(form) }}
{{ form_widget(form) }}
<ul class="record_actions">
<li>
<button type="submit" class="btn btn-create">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
</div>
{% endblock %}

View File

@@ -15,7 +15,7 @@
{% else %}
<div class="flex-table">
{% for c in compositions %}
{% if c.id != editId %}
{# {% if c.id != editId %} #}
<div class="item-bloc">
<div class="item-row">
<div class="item-col">
@@ -42,7 +42,7 @@
<div class="item-row">
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_household_composition_index', {'id': c.household.id, 'edit': c.id}) }}" class="btn btn-edit"></a>
<a href="{{ path('chill_person_household_composition_new', {'id': c.household.id, 'edit': c.id}) }}" class="btn btn-edit"></a>
</li>
<li>
<a href="{{ chill_path_add_return_path('chill_person_household_composition_delete', {'composition_id': c.id,
@@ -54,45 +54,17 @@
</div>
{% endif %}
</div>
{% else %}
{{ form_start(form) }}
{{ form_widget(form) }}
<ul class="record_actions">
<li class="cancel" style="margin-right: auto;">
<a class="btn btn-cancel" href="{{ path('chill_person_household_composition_index', {'id': c.household.id}) }}">{{ 'Cancel'|trans }}</a>
</li>
<li>
<button type="submit" class="btn btn-create">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
{% endif %}
{% endfor %}
</div>
{% endif %}
<div id="collapseForm" class="{% if not isPosted %}collapse{% endif %}">
{{ form_start(form) }}
{{ form_widget(form) }}
<ul class="record_actions">
<li>
<button type="submit" class="btn btn-create">{{ 'Save'|trans }}</button>
</li>
</ul>
{{ form_end(form) }}
</div>
{% if editId == -1 %}
{% if is_granted('CHILL_PERSON_HOUSEHOLD_EDIT', household) %}
<ul class="record_actions sticky-form-buttons">
<li>
<button class="btn btn-primary btn-create change-icon" type="button" data-bs-toggle="collapse" data-bs-target="#collapseForm" aria-expanded="false" aria-controls="collapseForm">
{{ 'Create'|trans }}
</button>
</li>
<li>
<a href="{{ chill_path_add_return_path('chill_person_household_composition_new', {'id': household.id,}) }}"
class="btn btn-new"
title="{{ 'Create'|trans }}">{{ 'Create'|trans }}</a>
</li>
</ul>
{% endif %}
</div>

View File

@@ -1,15 +1,25 @@
{% extends "@ChillPerson/Person/layout.html.twig" %}
{% set activeRouteKey = 'chill_person_resource_list' %}
{% block title %}{{ 'Person resources'|trans|capitalize ~ ' ' ~ person|chill_entity_render_string }}{% endblock %}
{% block js %}
{{ encore_entry_script_tags('page_person_resource_showhide_input') }}
{{ encore_entry_script_tags('mod_pickentity_type') }}
{% endblock %}
{% block css %}
{{ encore_entry_link_tags('page_person_resource_showhide_input') }}
{{ encore_entry_link_tags('mod_pickentity_type') }}
{% endblock %}
{% block personcontent %}
<h1 style="margin-bottom: 2rem;">{{ 'Add a person resource'|trans }}</h1>
<div class="col-md col-xxl">
<div id="collapseForm" class="{% if not form.vars.submitted %}collapse{% endif %}">
<h3 style="margin-bottom: 2rem;">{{ 'Add a person resource'|trans }}</h3>
{% include "@ChillPerson/PersonResource/form.html.twig" %}
</div>
<ul class="record_actions sticky-form-buttons">
<li>
<button class="btn btn-primary btn-create change-icon" type="button" data-bs-toggle="collapse" data-bs-target="#collapseForm" aria-expanded="false" aria-controls="collapseForm">
{{ 'Add a person resource'|trans }}
</button>
</li>
</ul>
</div>
</div>
{% endblock %}

View File

@@ -85,8 +85,14 @@
<p class="chill-no-data-statement">{{ 'There are no available resources'|trans }}</p>
{% endif %}
<h1 style="margin-bottom: 2rem;">{{ 'Add a person resource'|trans }}</h1>
{% include "@ChillPerson/PersonResource/create.html.twig" %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
<ul class="record_actions sticky-form-buttons">
<li>
<a href="{{ chill_path_add_return_path('chill_person_resource_new', {'person_id': person.id,}) }}"
class="btn btn-new"
title="{{ 'Create'|trans }}">{{ 'Create'|trans }}</a>
</li>
</ul>
{% endif %}
{% endblock %}

View File

@@ -49,7 +49,12 @@
<li>
<i class="fa fa-li fa-home"></i>
<span class="item-key">{{ "Address of"|trans}} </span>
<span class="chill-entity entity-person badge-person">{{ a.hostPerson|chill_entity_render_box }}</span>
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: a.hostPerson.id },
buttonText: a.hostPerson|chill_entity_render_string,
isDead: a.hostPerson.deathdate is not null
} %}
</li>
<li>
{% set address_date = date(a.startDate|date("m/d/Y")) %}
@@ -62,7 +67,12 @@
<li>
<i class="fa fa-li fa-home"></i>
<span class="item-key">{{ "Address of"|trans}}</span>
<span class="chill-entity entity-person badge-thirdparty">{{ a.hostThirdParty|chill_entity_render_box }}</span>
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'thirdparty', id: a.hostThirdParty.id },
buttonText: a.hostThirdParty|chill_entity_render_string,
isDead: false,
} %}
</li>
<li>
{% if a.hostThirdParty.address is not null %}