mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 14:36:13 +00:00
activity show: concerned parties are clickable links
This commit is contained in:
parent
4ace2fef99
commit
c33f577f5a
@ -1,15 +1,48 @@
|
||||
{% macro href(pathname, key, value) %}
|
||||
{% set parms = { (key): value } %}
|
||||
{{ path(pathname, parms) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% if context == 'person' %}
|
||||
{% set blocs = [
|
||||
{ 'title': 'Others persons'|trans, 'items': entity.persons },
|
||||
{ 'title': 'Third parties'|trans, 'items': entity.thirdParties },
|
||||
{ 'title': 'Users concerned'|trans, 'items': entity.users },
|
||||
{ 'title': 'Others persons'|trans,
|
||||
'items': entity.persons,
|
||||
'path' : 'chill_person_view',
|
||||
'key' : 'person_id'
|
||||
},
|
||||
{ 'title': 'Third parties'|trans,
|
||||
'items': entity.thirdParties,
|
||||
'path' : 'chill_3party_3party_show',
|
||||
'key' : 'thirdparty_id'
|
||||
},
|
||||
{ 'title': 'Users concerned'|trans,
|
||||
'items': entity.users,
|
||||
'path' : 'admin_user_show',
|
||||
'key' : 'id'
|
||||
},
|
||||
] %}
|
||||
{% else %}
|
||||
{% set blocs = [
|
||||
{ 'title': 'Persons in accompanying course'|trans, 'items': entity.personsAssociated },
|
||||
{ 'title': 'Third persons'|trans, 'items': entity.personsNotAssociated },
|
||||
{ 'title': 'ThirdParties'|trans, 'items': entity.thirdParties },
|
||||
{ 'title': 'Users concerned'|trans, 'items': entity.users },
|
||||
{ 'title': 'Persons in accompanying course'|trans,
|
||||
'items': entity.personsAssociated,
|
||||
'path' : 'chill_person_view',
|
||||
'key' : 'person_id'
|
||||
},
|
||||
{ 'title': 'Third persons'|trans,
|
||||
'items': entity.personsNotAssociated,
|
||||
'path' : 'chill_person_view',
|
||||
'key' : 'person_id'
|
||||
},
|
||||
{ 'title': 'Third parties'|trans,
|
||||
'items': entity.thirdParties,
|
||||
'path' : 'chill_3party_3party_show',
|
||||
'key' : 'thirdparty_id'
|
||||
},
|
||||
{ 'title': 'Users concerned'|trans,
|
||||
'items': entity.users,
|
||||
'path' : 'admin_user_show',
|
||||
'key' : 'id'
|
||||
},
|
||||
] %}
|
||||
{% endif %}
|
||||
|
||||
@ -24,9 +57,11 @@
|
||||
<ul class="list-content">
|
||||
{% for item in bloc.items %}
|
||||
<li>
|
||||
<span class="badge badge-primary">
|
||||
{{ item|chill_entity_render_box({'only_denomination': true}) }}
|
||||
</span>
|
||||
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
|
||||
<span class="badge badge-primary">
|
||||
{{ item|chill_entity_render_box({'only_denomination': true}) }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user