{% if user.unreadNotifications|length %}{{ user.unreadNotifications|slice(0, 10)|length }}{% endif %}
  • Les dernières notifications
    • {% for notification in user.Notifications|sort((b, a) => a.createdAt <=> b.createdAt)|slice(0, 10) %}
    • {% set linka = '#' %} {% if notification.data['targetId'] is defined and notification.data['sujet'] is defined and notification.data['targetId'] > 0 %} {% if notification.data['sujet'] == "annonce" %} {% set linka = "/admin/app/annonce/"~notification.data['targetId']~"/detail_annonce" %} {% endif %} {% if notification.data['sujet'] == "cours" %} {% set linka = "/admin/app/cours/"~notification.data['targetId']~"/detail_cours" %} {% endif %} {% if notification.data['sujet'] == "tp" %} {% set linka = "/admin/app/tp/"~notification.data['targetId']~"/detail_tp" %} {% endif %} {% if notification.data['sujet'] == "exercice" %} {% set linka = "/admin/app/homework/"~notification.data['targetId']~"/showHomework" %} {% endif %} {% endif %} {% if notification.data['icon'] is defined and notification.data['iconcolor'] is defined %} {% endif %} {{ notification.data['message']is defined ? notification.data['message'] : '------' }} {# #} {# #} {# #}
    • {% endfor %}
  • {# Voir tout#}