mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-11-04 11:18:25 +00:00 
			
		
		
		
	Merge branch 'issue465_display_person_resources' into 'master'
Display more info for person ressources See merge request Chill-Projet/chill-bundles!338
This commit is contained in:
		@@ -14,6 +14,7 @@ and this project adheres to
 | 
			
		||||
[activity] correct associated persons by considering only open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476)
 | 
			
		||||
 | 
			
		||||
<!-- write down unreleased development here -->
 | 
			
		||||
* [person_resources]: Renderboxes used to display person/thirdparty info (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/465)
 | 
			
		||||
 | 
			
		||||
## Test releases
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -172,7 +172,7 @@
 | 
			
		||||
 | 
			
		||||
            {%- if options['customButtons']['replace'] is defined -%}
 | 
			
		||||
                {{ options['customButtons']['replace'] }}
 | 
			
		||||
            {%- elseif is_granted('CHILL_PERSON_SEE', person) -%}
 | 
			
		||||
            {%- elseif is_granted('CHILL_PERSON_SEE', person) and options['addLink'] -%}
 | 
			
		||||
                <li>
 | 
			
		||||
                    <a class="btn btn-sm btn-show" title="{{ 'Show person'|trans }}"
 | 
			
		||||
                    href="{{ path('chill_person_view', { person_id: person.id }) }}"></a>
 | 
			
		||||
 
 | 
			
		||||
@@ -56,6 +56,11 @@
 | 
			
		||||
 | 
			
		||||
{% if action is defined %}
 | 
			
		||||
    <ul class="record_actions sticky-form-buttons">
 | 
			
		||||
        <li class="cancel">
 | 
			
		||||
            <a href="{{ path('chill_person_resource_list', { 'person_id': resource.personOwner.id  } ) }}" class="btn btn-cancel">
 | 
			
		||||
                {{ 'Cancel'|trans }}
 | 
			
		||||
            </a>
 | 
			
		||||
        </li>
 | 
			
		||||
        <li class="edit">
 | 
			
		||||
            <button class="btn btn-edit"
 | 
			
		||||
            type="submit" id="newPersonResource">
 | 
			
		||||
 
 | 
			
		||||
@@ -22,41 +22,33 @@
 | 
			
		||||
    <div class="flex-table">
 | 
			
		||||
        {% for resource in personResources %}
 | 
			
		||||
            <div class="item-bloc">
 | 
			
		||||
                <div class="item-row">
 | 
			
		||||
                    <div class="item-col" style="width: 50%">
 | 
			
		||||
                {% if resource.kind is not null %}
 | 
			
		||||
                    <div class="item-row">
 | 
			
		||||
                        <section>
 | 
			
		||||
                            <p>{{ resource.kind.title.fr|capitalize }}</p>
 | 
			
		||||
                        </section>
 | 
			
		||||
                    </div>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
                <div class="{% if resource.kind is not null %} separator {% endif %}">
 | 
			
		||||
                    {% if resource.person is not null %}
 | 
			
		||||
                        <div class="denomination h3">
 | 
			
		||||
                            <span>
 | 
			
		||||
                                {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
 | 
			
		||||
                                    action: 'show', displayBadge: true,
 | 
			
		||||
                                    targetEntity: { name: 'person', id: resource.person.id },
 | 
			
		||||
                                    buttonText: resource.person|chill_entity_render_string,
 | 
			
		||||
                                    isDead: resource.person.deathdate is not null
 | 
			
		||||
                                } %}
 | 
			
		||||
                            </span>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        {{ resource.person|chill_entity_render_box({
 | 
			
		||||
                            'render': 'bloc',
 | 
			
		||||
                            'addLink': true,
 | 
			
		||||
                            'addInfo': true,
 | 
			
		||||
                            'addAge': true
 | 
			
		||||
                        }) }}
 | 
			
		||||
                    {% elseif resource.thirdparty is not null %}
 | 
			
		||||
                        <div class="denomination h3">
 | 
			
		||||
                            <span>
 | 
			
		||||
                                {% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
 | 
			
		||||
                                    action: 'show', displayBadge: true,
 | 
			
		||||
                                    targetEntity: { name: 'thirdparty', id: resource.thirdparty.id },
 | 
			
		||||
                                    buttonText: resource.thirdParty|chill_entity_render_string,
 | 
			
		||||
                                    parent: resource.thirdparty.parent
 | 
			
		||||
                                } %}
 | 
			
		||||
                            </span>
 | 
			
		||||
                        </div>
 | 
			
		||||
                        {{ resource.thirdparty|chill_entity_render_box({
 | 
			
		||||
                            'render': 'bloc',
 | 
			
		||||
                            'showContacts': false,
 | 
			
		||||
                            'addLink': true,
 | 
			
		||||
                            'isConfidential': (resource.thirdparty.contactDataAnonymous ? true : false)
 | 
			
		||||
                        }) }}
 | 
			
		||||
                    {% else %}
 | 
			
		||||
                        <div class="denomination h3">
 | 
			
		||||
                            <span>{{ resource.freetext }}</span>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    {% endif %}
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div class="item-col" style="justify-content: flex-end; ">
 | 
			
		||||
                        {% if resource.kind %}
 | 
			
		||||
                        <span>{{ resource.kind.title.fr|capitalize }}</span>
 | 
			
		||||
                        {% endif %}
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                {% if resource.comment.comment is not empty %}
 | 
			
		||||
                    <div class="item-row separator">
 | 
			
		||||
 
 | 
			
		||||
@@ -240,6 +240,7 @@ Select a type: "Choisissez un type"
 | 
			
		||||
Select a person: "Choisissez un usager"
 | 
			
		||||
Select a thirdparty: "Choisissez un tiers"
 | 
			
		||||
Contact person: "Personne de contact"
 | 
			
		||||
Kind: "Type"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# pickAPersonType
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user