user profile, editing and more statistics

This commit is contained in:
Kevin Papst
2016-11-09 21:58:00 +01:00
parent 1678129fe9
commit 8401797728
42 changed files with 1441 additions and 195 deletions

View File

@@ -16,17 +16,24 @@
'label.title': 'graduation-cap',
'label.active': 'lock',
'label.roles': 'users',
'label.actions': 'pencil-square-o',
}) }}
{% for entry in entries %}
<tr>
<td>{{ entry.id }}</td>
<td>{{ entry.username }}</td>
<td><a href="{{ path('user_profile', {'username' : entry.username}) }}">{{ entry.username }}</a></td>
<td>{{ entry.alias }}</td>
<td>{{ entry.email }}</td>
<td>{{ entry.title }}</td>
<td>{{ widgets.label_visible(entry.active) }}</td>
<td>{{ entry.roles|join(',')|trans }}</td>
<td>
{{ widgets.button_group({
'edit': path('user_profile', {'username' : entry.username}),
'trash': path('user_profile_delete', {'username' : entry.username})
}) }}
</td>
</tr>
{% endfor %}

View File

@@ -0,0 +1,13 @@
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ user.username }}</h3>
</div>
{{ form_start(form) }}
<div class="box-body">
{{ form_widget(form) }}
</div>
<div class="box-footer">
<input type="submit" value="{{ 'action.save'|trans }}" class="btn btn-primary" />
</div>
{{ form_end(form) }}
</div>

View File

@@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block page_title %}{{ 'edit_profile.title'|trans }}{% endblock %}
{% block page_subtitle %}{{ 'edit_profile.subtitle'|trans({'%username%': user.username}) }}{% endblock %}
{% block main %}
{{ include('default/_flash_messages.html.twig') }}
{{ include('admin/user/_form.html.twig', {
user: user,
form: form,
}, with_context = false) }}
{% endblock %}