aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Resources
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-04-27 15:58:32 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2017-05-02 15:28:39 +0200
commitc37515f880bd05b86e3e848cc184018295ec1920 (patch)
treec64785ee1bce798fe05d6b06e63abff0a41ffcea /src/Wallabag/UserBundle/Resources
parente1d64050ad6f54e45d3954ffac21daaee58c6240 (diff)
downloadwallabag-c37515f880bd05b86e3e848cc184018295ec1920.tar.gz
wallabag-c37515f880bd05b86e3e848cc184018295ec1920.tar.zst
wallabag-c37515f880bd05b86e3e848cc184018295ec1920.zip
Add filter to users management page
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/UserBundle/Resources')
-rw-r--r--src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig61
-rw-r--r--src/Wallabag/UserBundle/Resources/views/Manage/search_form.html.twig15
2 files changed, 48 insertions, 28 deletions
diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig b/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig
index daba29e4..abc02852 100644
--- a/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig
+++ b/src/Wallabag/UserBundle/Resources/views/Manage/index.html.twig
@@ -8,36 +8,41 @@
8 <div class="col s12"> 8 <div class="col s12">
9 <div class="card-panel"> 9 <div class="card-panel">
10 <div class="row"> 10 <div class="row">
11 <div class="input-field col s12"> 11 <div class="col s6">
12 <p class="help">{{ 'user.description'|trans|raw }}</p> 12 <p class="help">{{ 'user.description'|trans|raw }}</p>
13
14 <table class="bordered">
15 <thead>
16 <tr>
17 <th>{{ 'user.form.username_label'|trans }}</th>
18 <th>{{ 'user.form.email_label'|trans }}</th>
19 <th>{{ 'user.form.last_login_label'|trans }}</th>
20 <th>{{ 'user.list.actions'|trans }}</th>
21 </tr>
22 </thead>
23 <tbody>
24 {% for user in users %}
25 <tr>
26 <td>{{ user.username }}</td>
27 <td>{{ user.email }}</td>
28 <td>{% if user.lastLogin %}{{ user.lastLogin|date('Y-m-d H:i:s') }}{% endif %}</td>
29 <td>
30 <a href="{{ path('user_edit', { 'id': user.id }) }}">{{ 'user.list.edit_action'|trans }}</a>
31 </td>
32 </tr>
33 {% endfor %}
34 </tbody>
35 </table>
36 <br />
37 <p>
38 <a href="{{ path('user_new') }}" class="waves-effect waves-light btn">{{ 'user.list.create_new_one'|trans }}</a>
39 </p>
40 </div> 13 </div>
14 <div class="col s6">
15 <div class="input-field">
16 {{ render(controller("WallabagUserBundle:Manage:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }}
17 </div>
18 </div>
19
20 <table class="bordered">
21 <thead>
22 <tr>
23 <th>{{ 'user.form.username_label'|trans }}</th>
24 <th>{{ 'user.form.email_label'|trans }}</th>
25 <th>{{ 'user.form2017-03-10 16:51:07.last_login_label'|trans }}</th>
26 <th>{{ 'user.list.actions'|trans }}</th>
27 </tr>
28 </thead>
29 <tbody>
30 {% for user in users %}
31 <tr>
32 <td>{{ user.username }}</td>
33 <td>{{ user.email }}</td>
34 <td>{% if user.lastLogin %}{{ user.lastLogin|date('Y-m-d H:i:s') }}{% endif %}</td>
35 <td>
36 <a href="{{ path('user_edit', { 'id': user.id }) }}">{{ 'user.list.edit_action'|trans }}</a>
37 </td>
38 </tr>
39 {% endfor %}
40 </tbody>
41 </table>
42 <br />
43 <p>
44 <a href="{{ path('user_new') }}" class="waves-effect waves-light btn">{{ 'user.list.create_new_one'|trans }}</a>
45 </p>
41 </div> 46 </div>
42 </div> 47 </div>
43 </div> 48 </div>
diff --git a/src/Wallabag/UserBundle/Resources/views/Manage/search_form.html.twig b/src/Wallabag/UserBundle/Resources/views/Manage/search_form.html.twig
new file mode 100644
index 00000000..f59388d0
--- /dev/null
+++ b/src/Wallabag/UserBundle/Resources/views/Manage/search_form.html.twig
@@ -0,0 +1,15 @@
1<form name="search" method="GET" action="{{ path('user-search')}}">
2 {% if form_errors(form) %}
3 <span class="black-text">{{ form_errors(form) }}</span>
4 {% endif %}
5
6 {% if form_errors(form.term) %}
7 <span class="black-text">{{ form_errors(form.term) }}</span>
8 {% endif %}
9
10 <i class="material-icons prefix">search</i>
11 {{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'user.search.placeholder'} }) }}
12 <label for="search_user_term" class="active">{{ 'user.search.label' | trans }}</label>
13
14 {{ form_rest(form) }}
15</form>