mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
twig person/thirdparty renderbox: add a customArea option
with 2 areas to begin: * before the label * after the label
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
'replace' Twig\Markup,
|
||||
'after' Twig\Markup
|
||||
]
|
||||
* customArea [
|
||||
'beforeLabel' Twig\Markup,
|
||||
'afterLabel' Twig\Markup,
|
||||
]
|
||||
#}
|
||||
|
||||
{% macro raw(person, options) %}
|
||||
@@ -37,11 +41,22 @@
|
||||
<div class="denomination {{ 'h' ~ options['hLevel'] }}">
|
||||
{%- if options['addLink'] and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
<a href="{{ chill_path_add_return_path('chill_person_view', { 'person_id': person.id }) }}">
|
||||
{{ _self.raw(person, options) }}
|
||||
</a>
|
||||
{%- else -%}
|
||||
{{ _self.raw(person, options) }}
|
||||
{%- endif -%}
|
||||
|
||||
{% if options['customArea']['beforeLabel'] is defined %}
|
||||
{{ options['customArea']['beforeLabel'] }}
|
||||
{% endif %}
|
||||
|
||||
{{ _self.raw(person, options) }}
|
||||
|
||||
{% if options['customArea']['afterLabel'] is defined %}
|
||||
{{ options['customArea']['afterLabel'] }}
|
||||
{% endif %}
|
||||
|
||||
{%- if options['addLink'] and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if options['addEntity'] -%}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Person'|trans }}</span>
|
||||
{%- endif -%}
|
||||
|
Reference in New Issue
Block a user