mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 07:33:50 +00:00
add notification service for AccompanyingPeriodWork in show
This commit is contained in:
@@ -129,6 +129,13 @@
|
||||
|
||||
{% if displayAction is defined and displayAction == true %}
|
||||
<ul class="item-col record_actions">
|
||||
|
||||
<li>
|
||||
<a class="btn btn-notify" title="{{ 'notification.Notify'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': w.id}) }}">
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>{{ macro.workflowButton(w) }}</li>
|
||||
<li>
|
||||
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||
|
@@ -36,18 +36,39 @@
|
||||
class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>{{ macro.workflowButton(work) }}</li>
|
||||
<li>
|
||||
<div class="d-grid gap-2 {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}btn-group{% endif %}" {% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}role="group"{% endif %}>
|
||||
{% if accompanyingCourse.hasUser and accompanyingCourse.user is not same as(app.user) %}
|
||||
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" title="{{ 'notification.Notify'|trans }}" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||
<li>
|
||||
<a class="dropdown-item" title="{{ 'notification.Notify referrer'|trans }}" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id, 'tos': [accompanyingCourse.user.id]}) }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" title="{{ 'notification.Notify any'|trans }}" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id}) }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="btn btn-notify" title="{{ 'notification.Notify'|trans }}" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', 'entityId': work.id}) }}">
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>{{ work.id }}
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', work) %}
|
||||
<li>
|
||||
<a class="btn btn-edit"
|
||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': work.id }) }}"
|
||||
>{{ 'Edit'|trans }}</a>
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', work) %}
|
||||
<li>
|
||||
<a class="btn btn-delete"
|
||||
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': work.id } ) }}"
|
||||
>{{ 'Delete'|trans }}</a>
|
||||
title = "{{ 'Delete'|trans }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@@ -0,0 +1,28 @@
|
||||
{% macro recordAction(work) %}
|
||||
<li>
|
||||
<a href={{ path('chill_person_accompanying_period_work_list', { 'id': accompanyingCourse.id }) }}""
|
||||
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
{% if work is not null %}
|
||||
<div class="flex-table">
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', work) %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_item.html.twig' with {
|
||||
'itemBlocClass': 'bg-chill-llight-gray',
|
||||
'displayAction': true,
|
||||
'displayContent': 'short',
|
||||
'displayFontSmall': true,
|
||||
'w': work
|
||||
} %}
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'This is the minimal period details'|trans ~ ': ' ~ work.id }}<br>
|
||||
{{ 'You are getting a notification for a period you are not allowed to see'|trans }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'You are getting a notification for a period which does not exists any more'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
Reference in New Issue
Block a user