]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Resources/views/themes/material/Notification/notifications.html.twig
changes and default actions
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Notification / notifications.html.twig
CommitLineData
22a4b20e
TC
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'notifications.list.page_title' | trans }}{% endblock %}
4
5{% block content %}
6 <div class="row">
7 <div class="col l6 offset-l3">
8 <ul class="collection">
9 {% for notification in notifications | slice(0, 10) %}
4fa9470f 10 <li class="notification collection-item avatar{% if not notification.read %} light-blue lighten-5{% else %} grey-text{% endif %}">
22a4b20e
TC
11 <i class="material-icons circle">{% spaceless %}
12 {% if notification.type == constant('TYPE_ADMIN', notification) %}
13 build
14 {% elseif notification.type == constant('TYPE_USER', notification) %}
15 person
16 {% elseif notification.type == constant('TYPE_RELEASE', notification) %}
17 new_releases
18 {% endif %}
19 {% endspaceless %}</i>
20 <span class="title">{{ notification.title }}</span>
4fa9470f 21 <p><em>{{ notification.timestamp | date }}</em></p>
22a4b20e 22 <div class="secondary-content">
4fa9470f
TC
23 {% if not notification.read %}
24 {% for action in notification.actions %}
25 <a class="notification-action btn waves-effect waves-light {% spaceless %}
26 {% if action.type == constant('TYPE_OK', action) %}
27 {% elseif action.type == constant('TYPE_YES', action) %}
28 cyan
29 {% elseif action.type == constant('TYPE_NO', action) %}
30 red
31 {% elseif action.type == constant('TYPE_INFO', action) %}
32 blue-grey
33 {% endif %}
34 {% endspaceless %}" data-id="{{ notification.id }}" href="{{ action.link }}">{{ action.label }}</a>
35 {% endfor %}
36 <button class="notification-action waves-effect waves-teal btn-flat" data-id="{{ notification.id }}"><i data-id="{{ notification.id }}" class="material-icons">check</i></button>
37 {% endif %}
22a4b20e
TC
38 </div>
39 </li>
40 {% endfor %}
41 </ul>
42 <a href="{{ path('notification-archive-all') }}" class="btn waves-effect waves-light ">{{ 'notifications.list.mark_all_as_read' | trans }}</a>
43 </div>
44 </div>
45{% endblock %}