PersonResource: add link to person or 3party in the associated person or

3party part

There was a mismatch between "opening a resource to see the resource
details" and "see the associated person/3party details". On the previous location,
the user would expect to open the resource details, and not the person
details.
This commit is contained in:
Julien Fastré 2022-02-17 21:28:27 +01:00
parent f86c0353a2
commit d6990349d8

View File

@ -33,7 +33,7 @@
{% if resource.person is not null %}
{{ resource.person|chill_entity_render_box({
'render': 'bloc',
'addLink': false,
'addLink': true,
'addInfo': true,
'addAge': true
}) }}
@ -41,7 +41,7 @@
{{ resource.thirdparty|chill_entity_render_box({
'render': 'bloc',
'showContacts': false,
'addLink': false,
'addLink': true,
'isConfidential': (resource.thirdparty.contactDataAnonymous ? true : false)
}) }}
{% else %}
@ -61,17 +61,6 @@
<div class="item-row separator">
<div class="item-col">
<ul class="record_actions">
{% if resource.person is not null and is_granted('CHILL_PERSON_SEE', resource.person) %}
<li>
<a class="btn btn-sm btn-show" title="{{ 'Show person'|trans }}"
href="{{ path('chill_person_view', { person_id: resource.person.id }) }}"></a>
</li>
{% elseif resource.thirdparty is not null and is_granted('CHILL_3PARTY_3PARTY_SHOW', resource.thirdparty) %}
<li>
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}"
href="{{ path('chill_crud_3party_3party_view', { id: resource.thirdparty.isChild ? resource.thirdparty.parent.id : resource.thirdparty.id }) }}"></a>
</li>
{% endif %}
<li>
<a href="{{ chill_path_add_return_path('chill_person_resource_edit', {'resource_id': resource.id,
'person_id': person.id,}) }}"