mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
notify the referrer from an activity page or list
This commit is contained in:
parent
4592be3a8d
commit
f339cf56d6
@ -2,12 +2,30 @@
|
||||
{% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) %}
|
||||
{% if no_action is not defined or no_action == false %}
|
||||
<li>
|
||||
<a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_main_notification_create', {
|
||||
'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity',
|
||||
'entityId': activity.id
|
||||
}) }}">
|
||||
<i class="fa fa-paper-plane fa-fw"></i>
|
||||
{{ 'notification.Notify'|trans }}</a>
|
||||
{% set showGroup = activity.accompanyingPeriod is not null and activity.accompanyingPeriod.hasUser and activity.accompanyingPeriod.user is not same as(app.user) %}
|
||||
<div class="{% if showGroup %}btn-group{% endif %}" {% if showGroup %}role="group"{% endif %}>
|
||||
{% if showGroup %}
|
||||
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</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\\ActivityBundle\\Entity\\Activity', 'entityId': activity.id, 'tos': [activity.accompanyingPeriod.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\\ActivityBundle\\Entity\\Activity', 'entityId': activity.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\\ActivityBundle\\Entity\\Activity', 'entityId': activity.id}) }}">
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if context == 'person' and activity.accompanyingPeriod is not empty %}
|
||||
|
@ -217,9 +217,30 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-notify" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</a>
|
||||
{% set showGroup = entity.accompanyingPeriod is not null and entity.accompanyingPeriod.hasUser and entity.accompanyingPeriod.user is not same as(app.user) %}
|
||||
<div class="{% if showGroup %}btn-group{% endif %}" {% if showGroup %}role="group"{% endif %}>
|
||||
{% if showGroup %}
|
||||
<button id="btnGroupNotifyButtons" type="button" class="btn btn-notify dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</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\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id, 'tos': [entity.accompanyingPeriod.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\\ActivityBundle\\Entity\\Activity', 'entityId': entity.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\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
|
||||
<li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user