Basic user admin.

This commit is contained in:
James Cole
2016-04-03 07:07:17 +02:00
parent 67caf6ef1f
commit ad402021ed
10 changed files with 322 additions and 6 deletions

View File

@@ -0,0 +1,27 @@
{% extends "./layout/default.twig" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'user_administration'|_ }}</h3>
</div>
<div class="box-body">
<ul>
<li><a href="{{ route('admin.users') }}">{{ 'list_all_users'|_ }}</a></li>
<!-- <li><a href="#">{{ 'user_related_settings'|_ }}</a></li> -->
</ul>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{% endblock %}
{% block styles %}
{% endblock %}

View File

@@ -0,0 +1,60 @@
{% extends "./layout/default.twig" %}
{% block breadcrumbs %}
{{ Breadcrumbs.renderIfExists }}
{% endblock %}
{% block content %}
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'all_users'|_ }}</h3>
</div>
<div class="box-body table-responsive no-padding">
<table class="table table-condensed table-sortable">
<thead>
<tr>
<th>{{ trans('list.email') }}</th>
<th>{{ trans('list.registered_at') }}</th>
<th>{{ trans('list.is_activated') }}</th>
<th>{{ trans('list.is_blocked') }}</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{ user.email }}</td>
<td>
{{ user.created_at.formatLocalized(monthAndDayFormat) }}
{{ user.created_at.format('H:i') }}
</td>
{% if user.activated %}
<td>&nbsp;</td>
{% else %}
<td class="bg-danger"><i class="fa fa-fw fa-times"></i></td>
{% endif %}
{% if user.blocked == 1 %}
<td class="bg-danger">
{% if user.blocked_code == "" %}
<em>no reason</em>
{% else %}
{{ user.blocked_code }}
{% endif %}
</td>
{% else %}
<td>&nbsp;</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
{% endblock %}
{% block styles %}
{% endblock %}