2024-02-18 23:03:14 +00:00
|
|
|
{% extends "layout.html.twig" %}
|
2016-09-30 18:09:06 +00:00
|
|
|
|
|
|
|
{% block title %}{{ 'user.page_title'|trans }}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
|
|
|
<div class="card-panel">
|
2017-04-27 14:23:54 +00:00
|
|
|
{% if users.getNbPages > 1 %}
|
2022-12-14 13:36:29 +00:00
|
|
|
{{ pagerfanta(users, 'default_wallabag') }}
|
2017-04-27 14:23:54 +00:00
|
|
|
{% endif %}
|
2016-09-30 18:09:06 +00:00
|
|
|
<div class="row">
|
2017-04-27 13:58:32 +00:00
|
|
|
<div class="col s6">
|
2016-09-30 18:09:06 +00:00
|
|
|
<p class="help">{{ 'user.description'|trans|raw }}</p>
|
|
|
|
</div>
|
2017-04-27 13:58:32 +00:00
|
|
|
<div class="col s6">
|
2024-02-05 21:02:50 +00:00
|
|
|
{% if is_granted('LIST_USERS') %}
|
|
|
|
<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 %}
|
2017-05-02 13:27:58 +00:00
|
|
|
|
2024-02-05 21:02:50 +00:00
|
|
|
{% if form_errors(searchForm.term) %}
|
|
|
|
<span class="black-text">{{ form_errors(searchForm.term) }}</span>
|
|
|
|
{% endif %}
|
2017-05-02 13:27:58 +00:00
|
|
|
|
2024-02-05 21:02:50 +00:00
|
|
|
{{ form_widget(searchForm.term, {'attr': {'autocomplete': 'off', 'placeholder': 'user.search.placeholder'}}) }}
|
2017-05-02 13:27:58 +00:00
|
|
|
|
2024-02-05 21:02:50 +00:00
|
|
|
{{ form_rest(searchForm) }}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-04-27 13:58:32 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<table class="bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>{{ 'user.form.username_label'|trans }}</th>
|
|
|
|
<th>{{ 'user.form.email_label'|trans }}</th>
|
2017-04-27 14:23:54 +00:00
|
|
|
<th>{{ 'user.form.last_login_label'|trans }}</th>
|
2017-04-27 13:58:32 +00:00
|
|
|
<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>
|
2024-02-05 21:02:50 +00:00
|
|
|
{% if is_granted('EDIT', user) %}
|
|
|
|
<a href="{{ path('user_edit', {'id': user.id}) }}">{{ 'user.list.edit_action'|trans }}</a>
|
|
|
|
{% endif %}
|
2017-04-27 13:58:32 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<br />
|
2024-02-05 21:02:50 +00:00
|
|
|
{% if is_granted('CREATE_USERS') %}
|
|
|
|
<p>
|
|
|
|
<a href="{{ path('user_new') }}" class="waves-effect waves-light btn">{{ 'user.list.create_new_one'|trans }}</a>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2017-04-27 14:23:54 +00:00
|
|
|
{% if users.getNbPages > 1 %}
|
2022-12-14 13:36:29 +00:00
|
|
|
{{ pagerfanta(users, 'default_wallabag') }}
|
2017-04-27 14:23:54 +00:00
|
|
|
{% endif %}
|
2016-09-30 18:09:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|