mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Activity show page: move notify button and notification-box in post menu area
This commit is contained in:
@@ -3,15 +3,9 @@
|
||||
|
||||
<h1>{{ "Activity"|trans }}</h1>
|
||||
|
||||
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %}
|
||||
{% if notifications is not empty %}
|
||||
{{ notifications|raw }}
|
||||
{% endif %}
|
||||
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
|
||||
|
||||
<div class="item-row">
|
||||
<div class="wrap-list">
|
||||
<div class="wl-row">
|
||||
@@ -203,9 +197,6 @@
|
||||
{{ 'Back to the list'|trans }}
|
||||
</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>
|
||||
</li>
|
||||
{% if is_granted('CHILL_ACTIVITY_UPDATE', entity) %}
|
||||
<li>
|
||||
<a class="btn btn-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person_id, 'accompanying_period_id': accompanying_course_id }) }}">
|
||||
|
@@ -21,3 +21,21 @@
|
||||
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
{% block block_post_menu %}
|
||||
<div class="post-menu pt-4">
|
||||
|
||||
<div class="d-grid gap-2">
|
||||
<a class="btn btn-primary" href="{{ chill_path_add_return_path('chill_main_notification_create', {'entityClass': 'Chill\\ActivityBundle\\Entity\\Activity', 'entityId': entity.id}) }}">
|
||||
<i class="fa fa-paper-plane fa-fw"></i>
|
||||
{{ 'notification.Notify'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% set notifications = chill_list_notifications('Chill\\ActivityBundle\\Entity\\Activity', entity.id) %}
|
||||
{% if notifications is not empty %}
|
||||
{{ notifications|raw }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -1,10 +1,20 @@
|
||||
{# available variables: notification, activity #}
|
||||
{% if activity is not null %}
|
||||
{% if is_granted('CHILL_ACTIVITY_SEE', activity) %}
|
||||
<a href="{{ path('chill_activity_activity_show', {'id': activity.id }) }}">Go to Activity</a>
|
||||
{% else %}
|
||||
you are not allowed to see it details. This is the minimal data: {{ activity.id }}
|
||||
{% endif %}
|
||||
<div class="flex-table">
|
||||
{% if is_granted('CHILL_ACTIVITY_SEE', activity) %}
|
||||
|
||||
<a href="{{ path('chill_activity_activity_show', {'id': activity.id }) }}">Go to Activity</a>
|
||||
|
||||
|
||||
{% else %}
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'This is the minimal activity data'|trans ~ ': ' ~ activity.id }}<br>
|
||||
{{ 'you are not allowed to see it details'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
You get notified of an activity which does not exists any more.
|
||||
<div class="alert alert-warning border-warning border-1">
|
||||
{{ 'You get notified of an activity which does not exists any more'|trans }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user