include Activity in notification (ShowInNotification)

This commit is contained in:
Mathieu Jaumotte 2022-01-10 16:01:22 +01:00
parent d60938352b
commit fded08aaaa
2 changed files with 13 additions and 6 deletions

View File

@ -1,11 +1,18 @@
{# available variables: notification, activity #} {% macro recordAction(activity) %}
<li>
<a href="{{ path('chill_activity_activity_show', {'id': activity.id }) }}"
class="btn btn-show" title="{{ 'Show the activity'|trans }}"></a>
</li>
{% endmacro %}
{% if activity is not null %} {% if activity is not null %}
<div class="flex-table"> <div class="flex-table">
{% if is_granted('CHILL_ACTIVITY_SEE', activity) %} {% if is_granted('CHILL_ACTIVITY_SEE', activity) %}
{% include 'ChillActivityBundle:Activity:_list_item.html.twig' with {
<a href="{{ path('chill_activity_activity_show', {'id': activity.id }) }}">Go to Activity</a> 'recordAction': _self.recordAction(activity),
'context': 'accompanyingCourse',
'itemBlocClass': 'bg-chill-llight-gray'
} %}
{% else %} {% else %}
<div class="alert alert-warning border-warning border-1"> <div class="alert alert-warning border-warning border-1">
{{ 'This is the minimal activity data'|trans ~ ': ' ~ activity.id }}<br> {{ 'This is the minimal activity data'|trans ~ ': ' ~ activity.id }}<br>

View File

@ -1,4 +1,4 @@
<div class="item-bloc{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}"> <div class="item-bloc accompanying-period-item{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
<div class="item-row"> <div class="item-row">
<div class="wrap-header"> <div class="wrap-header">
<div class="wh-row"> <div class="wh-row">