forked from wallabag/wallabag
Move templates
This commit is contained in:
81
templates/User/edit.html.twig
Normal file
81
templates/User/edit.html.twig
Normal file
@ -0,0 +1,81 @@
|
||||
{% extends "layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'user.page_title'|trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card-panel">
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<h4>{{ 'user.edit_user'|trans }}</h4>
|
||||
|
||||
<div id="set6" class="col s12">
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_errors(edit_form) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_label(edit_form.name) }}
|
||||
{{ form_errors(edit_form.name) }}
|
||||
{{ form_widget(edit_form.name) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_label(edit_form.username) }}
|
||||
{{ form_errors(edit_form.username) }}
|
||||
{{ form_widget(edit_form.username) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_label(edit_form.email) }}
|
||||
{{ form_errors(edit_form.email) }}
|
||||
{{ form_widget(edit_form.email) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_widget(edit_form.enabled) }}
|
||||
{{ form_label(edit_form.enabled) }}
|
||||
{{ form_errors(edit_form.enabled) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_widget(edit_form.emailTwoFactor) }}
|
||||
{{ form_label(edit_form.emailTwoFactor) }}
|
||||
{{ form_errors(edit_form.emailTwoFactor) }}
|
||||
</div>
|
||||
<div class="input-field col s12">
|
||||
{{ form_widget(edit_form.googleTwoFactor) }}
|
||||
{{ form_label(edit_form.googleTwoFactor) }}
|
||||
{{ form_errors(edit_form.googleTwoFactor) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
|
||||
{{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
|
||||
{{ form_widget(edit_form._token) }}
|
||||
</form>
|
||||
<p>
|
||||
{{ form_start(delete_form) }}
|
||||
<button {% if app.user.id == user.id %}disabled="disabled"{% endif %} onclick="return confirm('{{ 'user.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'user.form.delete'|trans }}</button>
|
||||
{{ form_end(delete_form) }}
|
||||
</p>
|
||||
<p><a class="waves-effect waves-light btn blue-grey" href="{{ path('user_index') }}">{{ 'user.form.back_to_list'|trans }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
69
templates/User/index.html.twig
Normal file
69
templates/User/index.html.twig
Normal file
@ -0,0 +1,69 @@
|
||||
{% extends "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, 'default_wallabag') }}
|
||||
{% 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, 'default_wallabag') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
61
templates/User/new.html.twig
Normal file
61
templates/User/new.html.twig
Normal file
@ -0,0 +1,61 @@
|
||||
{% extends "layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'user.page_title'|trans }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card-panel">
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
<h4>{{ 'user.new_user'|trans }}</h4>
|
||||
|
||||
<div id="set6" class="col s12">
|
||||
{{ form_start(form) }}
|
||||
{{ form_errors(form) }}
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_label(form.username) }}
|
||||
{{ form_errors(form.username) }}
|
||||
{{ form_widget(form.username) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_label(form.plainPassword.first) }}
|
||||
{{ form_errors(form.plainPassword.first) }}
|
||||
{{ form_widget(form.plainPassword.first) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_label(form.plainPassword.second) }}
|
||||
{{ form_errors(form.plainPassword.second) }}
|
||||
{{ form_widget(form.plainPassword.second) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ form_label(form.email) }}
|
||||
{{ form_errors(form.email) }}
|
||||
{{ form_widget(form.email) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
<p><a class="waves-effect waves-light btn blue-grey" href="{{ path('user_index') }}">{{ 'user.form.back_to_list'|trans }}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user