mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
render_box person: possible to force disable AltNames; add space between span
This commit is contained in:
parent
1325355ca7
commit
98dd31dffc
@ -60,7 +60,10 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
|
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
|
||||||
<span class="badge bg-primary">
|
<span class="badge bg-primary">
|
||||||
{{ item|chill_entity_render_box({'render': 'raw'}) }}
|
{{ item|chill_entity_render_box({
|
||||||
|
'render': 'raw',
|
||||||
|
'addAltNames': false
|
||||||
|
}) }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -72,7 +75,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if (with_display == 'row') %}
|
{% if (with_display == 'row') %}
|
||||||
<div class="concerned-groups">
|
<div class="concerned-groups">
|
||||||
{% for bloc in blocs %}
|
{% for bloc in blocs %}
|
||||||
@ -84,7 +87,10 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
|
<a href="{{ _self.href(bloc.path, bloc.key, item.id) }}">
|
||||||
<span class="badge bg-primary">
|
<span class="badge bg-primary">
|
||||||
{{ item|chill_entity_render_box({'only_denomination': true}) }}
|
{{ item|chill_entity_render_box({
|
||||||
|
'render': 'raw',
|
||||||
|
'addAltNames': false
|
||||||
|
}) }}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -13,12 +13,18 @@ section.chill-entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// specific rules
|
// specific rules
|
||||||
|
// all render box doesn't use a section tag !
|
||||||
.chill-entity {
|
.chill-entity {
|
||||||
|
|
||||||
// used for: entity-person, entity-thirdparty
|
// used for: entity-person, entity-thirdparty
|
||||||
&.entity-person,
|
&.entity-person,
|
||||||
&.entity-thirdparty {
|
&.entity-thirdparty {
|
||||||
|
|
||||||
|
span.entity-raw {
|
||||||
|
& > span:not(:first-child):before {
|
||||||
|
content: " ";
|
||||||
|
}
|
||||||
|
}
|
||||||
div.entity-label {
|
div.entity-label {
|
||||||
div.denomination {
|
div.denomination {
|
||||||
&.h3 {
|
&.h3 {
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
{% macro label(person, options) %}
|
{% macro label(person, options) %}
|
||||||
<div class="entity-label">
|
<div class="entity-label">
|
||||||
|
|
||||||
<div class="denomination {{ 'h' ~ options['hLevel'] }}">
|
<div class="denomination {{ 'h' ~ options['hLevel'] }}">
|
||||||
{%- if options['addLink'] and is_granted('CHILL_PERSON_SEE', person) -%}
|
{%- if options['addLink'] and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||||
<a href="{{ chill_path_add_return_path('chill_person_view', { 'person_id': person.id }) }}">
|
<a href="{{ chill_path_add_return_path('chill_person_view', { 'person_id': person.id }) }}">
|
||||||
@ -74,7 +73,9 @@
|
|||||||
|
|
||||||
|
|
||||||
{%- if render == 'raw' -%}
|
{%- if render == 'raw' -%}
|
||||||
{{ _self.raw(person, options) }}
|
<span class="entity-raw">
|
||||||
|
{{ _self.raw(person, options) }}
|
||||||
|
</span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if render == 'label' -%}
|
{%- if render == 'label' -%}
|
||||||
|
@ -52,7 +52,7 @@ class PersonRender extends AbstractChillEntityRender
|
|||||||
public function renderBox($person, array $options): string
|
public function renderBox($person, array $options): string
|
||||||
{
|
{
|
||||||
$params = [
|
$params = [
|
||||||
'addAltNames' => $this->configAltNamesHelper->hasAltNames(),
|
'addAltNames' => $options['addAltNames'] ?? $this->configAltNamesHelper->hasAltNames(),
|
||||||
'addLink' => $options['addLink'] ?? false,
|
'addLink' => $options['addLink'] ?? false,
|
||||||
'addEntity' => $options['addEntity'] ?? false,
|
'addEntity' => $options['addEntity'] ?? false,
|
||||||
'addId' => $options['addId'] ?? false,
|
'addId' => $options['addId'] ?? false,
|
||||||
|
@ -52,7 +52,9 @@
|
|||||||
{% endmacro label %}
|
{% endmacro label %}
|
||||||
|
|
||||||
{%- if render == 'raw' -%}
|
{%- if render == 'raw' -%}
|
||||||
{{ _self.raw(thirdparty, options) }}
|
<span class="entity-raw">
|
||||||
|
{{ _self.raw(thirdparty, options) }}
|
||||||
|
</span>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
{%- if render == 'label' -%}
|
{%- if render == 'label' -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user