mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 08:03:49 +00:00
include AccompanyingPeriod in notification (shownInNotification)
This commit is contained in:
@@ -1,12 +1,25 @@
|
||||
{# variables availables: notification, period. #}
|
||||
{% macro recordAction(period) %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period }) }}"
|
||||
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
{% if period is not null %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
|
||||
<a href="{{ path('chill_person_accompanying_course_index', {'accompanying_period_id': notification.relatedEntityId }) }}">
|
||||
Resume Accompanying Course (renderbox + links)
|
||||
</a>
|
||||
{% else %}
|
||||
You are getting a notification for a period you are not allowed to see. This is the minimal details: {{ period.id }}
|
||||
{% endif %}
|
||||
<div class="flex-table">
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', period) %}
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list_item.html.twig' with {
|
||||
'recordAction': _self.recordAction(notification.relatedEntityId)
|
||||
} %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{{ 'This is the minimal details'|trans ~ ': ' ~ period.id }}<br>
|
||||
{{ 'You are getting a notification for a period you are not allowed to see.'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div>You are getting a notification for a period which does not exists any more</div>
|
||||
<div class="alert alert-warning">
|
||||
{{ 'You are getting a notification for a period which does not exists any more'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user