You are here

notifications-widget.html.twig in Notifications widget 8

Theme implementation for FYI notification.

File

templates/notifications-widget.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme implementation for FYI notification.
  5. */
  6. #}
  7. <ul class="nav navbar-nav navbar-right">
  8. <li class="dropdown">
  9. <a href="#notifications-panel" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
  10. {% if unread > 0 %}
  11. <i data-count="{{ unread }}" id="notificationcount" class="glyphicon glyphicon-bell notification-icon"></i>
  12. {% else %}
  13. <i class="glyphicon glyphicon-bell notification-icon-read"></i>
  14. {% endif %}
  15. </a>
  16. <ul class="dropdown-menu notify-drop">
  17. <div class="notify-drop-title fyi-notification">
  18. {% if unread > 1 %}
  19. {% trans %} You have {{ unread }} unread notifications {% endtrans %}
  20. {% elseif unread > 0 %}
  21. {% trans %} You have {{ unread }} unread notification {% endtrans %}
  22. {% endif %}
  23. {% if unread == 0 %}
  24. {% trans %} You have no unread notifications {% endtrans %}
  25. {% endif %}
  26. </div>
  27. <!-- end notify title -->
  28. <!-- notify content -->
  29. <div class="drop-content">
  30. {% for notifications in notification_list %}
  31. <li data-id="{{ notifications.id }}" data-nas-id = "{{ notifications.nas_id }}" data-read-status = "{{ notifications.status ? 'read' : 'unread' }}" class="notification-items {{ notifications.status ? 'read' : 'unread' }}">
  32. <i class="fa fa-dot-circle-o" aria-hidden="true"></i>
  33. <span class="notification-msg">{{ notifications.message | raw }}</span>
  34. <span class="glyphicon glyphicon-trash notification-remove"></span>
  35. </li>
  36. {% endfor %}
  37. </div>
  38. {% if total > 0 %}
  39. <span class="clear-all-notification" data-uid="{{ uid }}" data-notification-id = "{{ notification_list[0].id }}">Clear All</span>
  40. {% endif %}
  41. </ul>
  42. </li>
  43. </ul>