mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23: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:
@@ -13,6 +13,10 @@
|
||||
'replace' Twig\Markup,
|
||||
'after' Twig\Markup
|
||||
]
|
||||
* customArea [
|
||||
'beforeLabel' Twig\Markup,
|
||||
'afterLabel' Twig\Markup,
|
||||
]
|
||||
#}
|
||||
|
||||
{% macro raw(thirdparty, options) %}
|
||||
@@ -23,13 +27,25 @@
|
||||
<div class="entity-label">
|
||||
|
||||
<div class="denomination {{ 'h' ~ options['hLevel'] }}">
|
||||
|
||||
{%- if options['addLink'] and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%}
|
||||
<a href="{{ chill_path_add_return_path('chill_3party_3party_show', { 'thirdparty_id': thirdparty.id }) }}">
|
||||
{{ _self.raw(thirdparty, options) }}
|
||||
</a>
|
||||
{%- else -%}
|
||||
{{ _self.raw(thirdparty, options) }}
|
||||
{%- endif -%}
|
||||
|
||||
{% if options['customArea']['beforeLabel'] is defined %}
|
||||
{{ options['customArea']['beforeLabel'] }}
|
||||
{% endif %}
|
||||
|
||||
{{ _self.raw(thirdparty, options) }}
|
||||
|
||||
{% if options['customArea']['afterLabel'] is defined %}
|
||||
{{ options['customArea']['afterLabel'] }}
|
||||
{% endif %}
|
||||
|
||||
{%- if options['addLink'] and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if options['addEntity'] -%}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Third party'|trans }}</span>
|
||||
{%- endif -%}
|
||||
|
Reference in New Issue
Block a user