forked from wallabag/wallabag
Add filter to users management page
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
committed by
Nicolas Lœuillet
parent
e1d64050ad
commit
c37515f880
@ -8,36 +8,41 @@
|
||||
<div class="col s12">
|
||||
<div class="card-panel">
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<div class="col s6">
|
||||
<p class="help">{{ 'user.description'|trans|raw }}</p>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
<div class="col s6">
|
||||
<div class="input-field">
|
||||
{{ render(controller("WallabagUserBundle:Manage:searchForm", {'currentRoute': app.request.attributes.get('_route')})) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'user.form.username_label'|trans }}</th>
|
||||
<th>{{ 'user.form.email_label'|trans }}</th>
|
||||
<th>{{ 'user.form2017-03-10 16:51:07.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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
<form name="search" method="GET" action="{{ path('user-search')}}">
|
||||
{% if form_errors(form) %}
|
||||
<span class="black-text">{{ form_errors(form) }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if form_errors(form.term) %}
|
||||
<span class="black-text">{{ form_errors(form.term) }}</span>
|
||||
{% endif %}
|
||||
|
||||
<i class="material-icons prefix">search</i>
|
||||
{{ form_widget(form.term, { 'attr': {'autocomplete': 'off', 'placeholder': 'user.search.placeholder'} }) }}
|
||||
<label for="search_user_term" class="active">{{ 'user.search.label' | trans }}</label>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
Reference in New Issue
Block a user