mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
feature: add a link to create a notification to the referrer
This commit is contained in:
@@ -978,6 +978,11 @@ class AccompanyingPeriod implements
|
||||
return null !== $this->userPrevious;
|
||||
}
|
||||
|
||||
public function hasUser(): bool
|
||||
{
|
||||
return null !== $this->user;
|
||||
}
|
||||
|
||||
public function isChangedUser(): bool
|
||||
{
|
||||
return $this->userIsChanged && $this->user !== $this->userPrevious;
|
||||
|
@@ -210,10 +210,28 @@
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="d-grid gap-2">
|
||||
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id}) }}">
|
||||
<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" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</a>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupNotifyButtons">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id, 'tos': [accompanyingCourse.user.id]}) }}">
|
||||
{{ 'notification.Notify referrer'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id}) }}">
|
||||
{{ 'notification.Notify any'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod', 'entityId': accompanyingCourse.id}) }}">
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -684,3 +684,7 @@ reassign:
|
||||
All periods on this list will be reassigned to this user, excepted the one you manually reassigned before: Tous les parcours visibles sur cette page seront assignés à cet utilisateur, sauf ceux que vous aurez assigné à un utilisateur manuellement.
|
||||
Reassign: Assigner le référent
|
||||
List periods to be able to reassign them: Choisissez un utilisateur et cliquez sur "Filtrer" pour visualiser ses parcours. Vous pourrez ensuite les réassigner.
|
||||
|
||||
notification:
|
||||
Notify referrer: Notifier le référent
|
||||
Notify any: Notifier d'autres utilisateurs
|
||||
|
Reference in New Issue
Block a user