aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig
blob: 5fc6163efa199c46eb19691ecfa811aa4ad59ec4 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends "WallabagCoreBundle::layout.html.twig" %}

{% block title %}{{ 'user.page_title'|trans }}{% endblock %}

{% block content %}

    <div class="row">
        <div class="col s12">
            <div class="card-panel">
                {% if users.getNbPages > 1 %}
                    {{ pagerfanta(users, 'twitter_bootstrap_translated', {'proximity': 1}) }}
                {% endif %}
                <div class="row">
                    <div class="col s6">
                        <p class="help">{{ 'user.description'|trans|raw }}</p>
                    </div>
                    <div class="col s6">
                        <div class="input-field">
                            <form name="search_users" method="GET" action="{{ path('user_index')}}">
                                {% if form_errors(searchForm) %}
                                    <span class="black-text">{{ form_errors(searchForm) }}</span>
                                {% endif %}

                                {% if form_errors(searchForm.term) %}
                                    <span class="black-text">{{ form_errors(searchForm.term) }}</span>
                                {% endif %}

                                {{ form_widget(searchForm.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'user.search.placeholder'} }) }}

                                {{ form_rest(searchForm) }}
                            </form>
                        </div>
                        
                    </div>

                    <table class="bordered">
                        <thead>
                            <tr>
                                <th>{{ 'user.form.username_label'|trans }}</th>
                                <th>{{ 'user.form.email_label'|trans }}</th>
                                <th>{{ 'user.form.last_login_label'|trans }}</th>
                                <th>{{ 'user.list.actions'|trans }}</th>
                            </tr>
                        </thead>
                        <tbody>
                        {% for user in users %}
                            <tr>
                                <td>{{ user.username }}</td>
                                <td>{{ user.email }}</td>
                                <td>{% if user.lastLogin %}{{ user.lastLogin|date('Y-m-d H:i:s') }}{% endif %}</td>
                                <td>
                                    <a href="{{ path('user_edit', { 'id': user.id }) }}">{{ 'user.list.edit_action'|trans }}</a>
                                </td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                    <br />
                    <p>
                        <a href="{{ path('user_new') }}" class="waves-effect waves-light btn">{{ 'user.list.create_new_one'|trans }}</a>
                    </p>
                    {% if users.getNbPages > 1 %}
                        {{ pagerfanta(users, 'twitter_bootstrap_translated', {'proximity': 1}) }}
                    {% endif %}
                </div>
            </div>
        </div>
    </div>

{% endblock %}