aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Notification/notifications.html.twig
blob: bc72c704602014581ab8a27215c1f6c08eade026 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% extends "WallabagCoreBundle::layout.html.twig" %}

{% block title %}{{ 'notifications.list.page_title' | trans }}{% endblock %}

{% block content %}
    <div class="row">
        <div class="col l6 offset-l3">
            <ul class="collection">
            {% for notification in notifications | slice(0, 10) %}
                <li class="collection-item avatar{% if not notification.read %} light-blue lighten-5{% else %} grey-text{% endif %}">
                    <i class="material-icons circle">{% spaceless %}
                            {% if notification.type == constant('TYPE_ADMIN', notification) %}
                                build
                            {% elseif notification.type == constant('TYPE_USER', notification) %}
                                person
                            {% elseif notification.type == constant('TYPE_RELEASE', notification) %}
                                new_releases
                            {% endif %}
                        {% endspaceless %}</i>
                    <span class="title">{{ notification.title }}</span>
                    <p><em>{{ notification.timestamp | date }}</p>
                    <div class="secondary-content">
                        {% for action in notification.actions %}
                            <a class="btn waves-effect waves-light {% spaceless %}
                               {% if action.type == constant('TYPE_OK', action) %}
                               {% elseif action.type == constant('TYPE_YES', action) %}
                                    cyan
                               {% elseif action.type == constant('TYPE_NO', action) %}
                                    red
                               {% elseif action.type == constant('TYPE_INFO', action) %}
                                    blue-grey
                               {% endif %}
                                {% endspaceless %}" href="{{ action.link }}">{{ action.label }}</a>
                        {% endfor %}
                    </div>
                </li>
            {% endfor %}
            </ul>
            <a href="{{ path('notification-archive-all') }}" class="btn waves-effect waves-light ">{{ 'notifications.list.mark_all_as_read' | trans }}</a>
        </div>
    </div>
{% endblock %}