mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
render box, custom buttons before, after or remplacing default
This commit is contained in:
parent
ad3fe7cf91
commit
39f6f14467
@ -10,10 +10,8 @@
|
|||||||
{% if person.isSharingHousehold %}
|
{% if person.isSharingHousehold %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': person.getCurrentHousehold.id }) }}"
|
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': person.getCurrentHousehold.id }) }}"
|
||||||
class="btn btn-misc">
|
class="btn btn-chill-pink" title="{{ 'Show household'|trans ~ ' n° ' ~ person.getCurrentHousehold.id }}">
|
||||||
<i class="fa fa-home"></i>
|
<i class="fa fa-home"></i>
|
||||||
n°
|
|
||||||
{{ person.getCurrentHousehold.id }}
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -40,7 +38,8 @@
|
|||||||
{% if participation.enddate is null %}
|
{% if participation.enddate is null %}
|
||||||
<div class="item-bloc">
|
<div class="item-bloc">
|
||||||
{{ participation.person|chill_entity_render_box({
|
{{ participation.person|chill_entity_render_box({
|
||||||
'render': 'bloc', 'addLink': false, 'addInfo': true, 'customButtons': _self.button_person(participation.person)
|
'render': 'bloc', 'addLink': false, 'addInfo': true,
|
||||||
|
'customButtons': { 'before': _self.button_person(participation.person) }
|
||||||
}) }}
|
}) }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
{#
|
{#
|
||||||
Template to render a person
|
Template to render a person
|
||||||
* render [raw|label|bloc]
|
* render string ['raw'|'label'|'bloc']
|
||||||
OPTIONS
|
OPTIONS
|
||||||
* addAltNames bool
|
* addAltNames bool
|
||||||
* addLink bool
|
* addLink bool
|
||||||
* addEntity bool
|
* addEntity bool
|
||||||
* addInfo bool
|
* addInfo bool
|
||||||
* hLevel integer
|
* hLevel integer
|
||||||
* customButtons Twig\Markup (html)
|
* customButtons [
|
||||||
|
'before' Twig\Markup, (injected with macro)
|
||||||
|
'replace' Twig\Markup,
|
||||||
|
'after' Twig\Markup
|
||||||
|
]
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% macro raw(person, options) %}
|
{% macro raw(person, options) %}
|
||||||
@ -94,14 +98,21 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
{%- if is_granted('CHILL_PERSON_SEE', person) -%}
|
{% if options['customButtons']['before'] is defined %}
|
||||||
|
{{ options['customButtons']['before'] }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-show" target="_blank" title="{{ 'Show'|trans }}"
|
<a class="btn btn-show" target="_blank" title="{{ 'Show person'|trans }}"
|
||||||
href="{{ path('chill_person_view', { person_id: person.id }) }}"></a>
|
href="{{ path('chill_person_view', { person_id: person.id }) }}"></a>
|
||||||
</li>
|
</li>
|
||||||
|
{%- else -%}
|
||||||
|
{{ options['customButtons']['replace'] }}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{% if options['customButtons'] %}
|
|
||||||
{{ options['customButtons'] }}
|
{% if options['customButtons']['after'] is defined %}
|
||||||
|
{{ options['customButtons']['after'] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,7 +58,7 @@ class PersonRender extends AbstractChillEntityRender
|
|||||||
'addEntity' => $options['addEntity'] ?? false,
|
'addEntity' => $options['addEntity'] ?? false,
|
||||||
'addInfo' => $options['addInfo'] ?? false,
|
'addInfo' => $options['addInfo'] ?? false,
|
||||||
'hLevel' => $options['hLevel'] ?? 3,
|
'hLevel' => $options['hLevel'] ?? 3,
|
||||||
'customButtons' => $options['customButtons'] ?? null,
|
'customButtons' => $options['customButtons'] ?? [],
|
||||||
];
|
];
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -119,6 +119,7 @@ address_country_code: Code pays
|
|||||||
|
|
||||||
'Alreay existing person': 'Dossiers déjà encodés'
|
'Alreay existing person': 'Dossiers déjà encodés'
|
||||||
'Add the person': 'Ajouter la personne'
|
'Add the person': 'Ajouter la personne'
|
||||||
|
Show person: Voir le dossier de la personne
|
||||||
'Confirm the creation': 'Confirmer la création'
|
'Confirm the creation': 'Confirmer la création'
|
||||||
'You will create this person': 'Vous allez créer le dossier suivant'
|
'You will create this person': 'Vous allez créer le dossier suivant'
|
||||||
Return: Retour
|
Return: Retour
|
||||||
@ -351,6 +352,7 @@ Addresses history for household: Historique des adresses
|
|||||||
Household accompanying period: Parcours d'accompagnement du ménage
|
Household accompanying period: Parcours d'accompagnement du ménage
|
||||||
Household summary: Résumé du ménage
|
Household summary: Résumé du ménage
|
||||||
Edit household address: Modifier l'adresse du ménage
|
Edit household address: Modifier l'adresse du ménage
|
||||||
|
Show household: Voir le ménage
|
||||||
|
|
||||||
# accompanying course work
|
# accompanying course work
|
||||||
Accompanying Course Actions: Actions d'accompagnements
|
Accompanying Course Actions: Actions d'accompagnements
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
{#
|
{#
|
||||||
Template to render a thirdparty
|
Template to render a thirdparty
|
||||||
* render [raw|label|bloc]
|
* render string ['raw'|'label'|'bloc']
|
||||||
OPTIONS
|
OPTIONS
|
||||||
* with_valid_from bool
|
* with_valid_from bool
|
||||||
* addAltNames bool
|
* addLink bool
|
||||||
* addLink bool
|
* addEntity bool
|
||||||
* addEntity bool
|
* addInfo bool
|
||||||
* addInfo bool
|
* hLevel integer
|
||||||
* hLevel integer
|
* customButtons [
|
||||||
* customButtons Twig\Markup (html)
|
'before' Twig\Markup, (injected with macro)
|
||||||
|
'replace' Twig\Markup,
|
||||||
|
'after' Twig\Markup
|
||||||
|
]
|
||||||
#}
|
#}
|
||||||
|
|
||||||
{% macro raw(thirdparty, options) %}
|
{% macro raw(thirdparty, options) %}
|
||||||
@ -78,14 +81,21 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
{%- if is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%}
|
{% if options['customButtons']['before'] is defined %}
|
||||||
|
{{ options['customButtons']['before'] }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-show" target="_blank" title="{{ 'Show'|trans }}"
|
<a class="btn btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}"
|
||||||
href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a>
|
href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{%- else -%}
|
||||||
{% if options['customButtons'] %}
|
{{ options['customButtons']['replace'] }}
|
||||||
{{ options['customButtons'] }}
|
{%- endif -%}
|
||||||
|
|
||||||
|
{% if options['customButtons']['after'] is defined %}
|
||||||
|
{{ options['customButtons']['after'] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,7 +52,7 @@ class ThirdPartyRender extends AbstractChillEntityRender
|
|||||||
'addEntity' => $options['addEntity'] ?? false,
|
'addEntity' => $options['addEntity'] ?? false,
|
||||||
'addInfo' => $options['addInfo'] ?? false,
|
'addInfo' => $options['addInfo'] ?? false,
|
||||||
'hLevel' => $options['hLevel'] ?? 3,
|
'hLevel' => $options['hLevel'] ?? 3,
|
||||||
'customButtons' => $options['customButtons'] ?? null,
|
'customButtons' => $options['customButtons'] ?? [],
|
||||||
];
|
];
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender:
|
Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender:
|
||||||
arguments:
|
arguments:
|
||||||
$templating: '@templating.engine.twig'
|
$engine: '@Symfony\Component\Templating\EngineInterface'
|
||||||
tags:
|
tags:
|
||||||
- 'chill.render_entity'
|
- 'chill.render_entity'
|
||||||
|
@ -20,7 +20,7 @@ Third party updated: Le tiers a été mis à jour
|
|||||||
Third party created: Le tiers a été créé
|
Third party created: Le tiers a été créé
|
||||||
Active, shown to users: Actif, visible par les utilisateurs
|
Active, shown to users: Actif, visible par les utilisateurs
|
||||||
Inactive, not shown to users: Inactif, invisible par les utilisateurs
|
Inactive, not shown to users: Inactif, invisible par les utilisateurs
|
||||||
|
Show thirdparty: Voir le tiers
|
||||||
|
|
||||||
The party is visible in those centers: Le tiers est visible dans ces centres
|
The party is visible in those centers: Le tiers est visible dans ces centres
|
||||||
No third parties: Aucun tiers
|
No third parties: Aucun tiers
|
||||||
@ -28,4 +28,4 @@ No third parties: Aucun tiers
|
|||||||
# ROLES
|
# ROLES
|
||||||
CHILL_3PARTY_3PARTY_CREATE: Ajouter un Tiers
|
CHILL_3PARTY_3PARTY_CREATE: Ajouter un Tiers
|
||||||
CHILL_3PARTY_3PARTY_SHOW: Voir un Tiers
|
CHILL_3PARTY_3PARTY_SHOW: Voir un Tiers
|
||||||
CHILL_3PARTY_3PARTY_UPDATE: Modifier un Tiers
|
CHILL_3PARTY_3PARTY_UPDATE: Modifier un Tiers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user