Merge branch 'master' of gitlab.com:Chill-Projet/chill-bundles

This commit is contained in:
Julie Lenaerts 2022-06-15 12:26:22 +02:00
commit 3735f24e10
3 changed files with 50 additions and 11 deletions

View File

@ -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 %}

View File

@ -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>

View File

@ -333,10 +333,10 @@ export default {
addQueryItem(field, queryItem) {
switch (field) {
case 'lastName':
this.person.lastName ? this.person.lastName += ` ${queryItem}` : this.person.lastName = queryItem;
this.person.lastName = this.person.lastName ? this.person.lastName += ` ${queryItem}` : queryItem;
break;
case 'firstName':
this.person.firstName ? this.person.firstName += ` ${queryItem}` : this.person.firstName = queryItem;
this.person.firstName = this.person.firstName ? this.person.firstName += ` ${queryItem}` : queryItem;
break;
}
},