aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-15 22:16:52 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-05-15 22:16:52 +0200
commit8af13a28e46e1cbdd1599e4b4d539f434c5ab3bc (patch)
tree798e4d5badca3709f2411659436f94d5b1bda143
parentNo need to display the user's activation key. (diff)
downloadnewspipe-8af13a28e46e1cbdd1599e4b4d539f434c5ab3bc.tar.gz
newspipe-8af13a28e46e1cbdd1599e4b4d539f434c5ab3bc.tar.bz2
newspipe-8af13a28e46e1cbdd1599e4b4d539f434c5ab3bc.zip
List all users in the table.
-rw-r--r--pyaggr3g470r/templates/admin/dashboard.html2
-rw-r--r--pyaggr3g470r/views.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/pyaggr3g470r/templates/admin/dashboard.html b/pyaggr3g470r/templates/admin/dashboard.html
index d40ffdf5..147edf49 100644
--- a/pyaggr3g470r/templates/admin/dashboard.html
+++ b/pyaggr3g470r/templates/admin/dashboard.html
@@ -18,7 +18,7 @@
{% for user in users|sort(attribute="nickname") %}
<tr>
<td>{{ loop.index }}</td>
- <td><a href="/admin/user/{{ user.id }}/">{{ user.nickname }}</a></td>
+ <td><a href="/admin/user/{{ user.id }}/">{{ user.nickname }}{{ if user.id == current_user.id }} (It's you!){{ endif }}</a></td>
<td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td>
<td>
<a href="/admin/user/{{ user.id }}/"><i class="glyphicon glyphicon-user" title="{{ _('View this user') }}<"></i></a>
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 6fd06560..0d85aeb7 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -693,8 +693,7 @@ def dashboard():
Adminstrator's dashboard.
"""
users = User.query.all()
- users.remove(g.user)
- return render_template('admin/dashboard.html', users=users)
+ return render_template('admin/dashboard.html', users=users, current_user=g.user)
@app.route('/admin/create_user/', methods=['GET', 'POST'])
@app.route('/admin/edit_user/<int:user_id>/', methods=['GET', 'POST'])
bgstack15