From f7aa2f39d500d95bdf6cd3c28741c7f1eb2d4fa6 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 16 Feb 2016 08:42:36 +0100 Subject: Removed the possibility to see the list of feeds of a user. A new column in the table from of dashboard has been added. --- src/web/templates/admin/dashboard.html | 11 ++++------- src/web/templates/admin/user.html | 19 ------------------- src/web/templates/feed_list.html | 12 ++++-------- src/web/views/admin.py | 15 +-------------- 4 files changed, 9 insertions(+), 48 deletions(-) delete mode 100644 src/web/templates/admin/user.html diff --git a/src/web/templates/admin/dashboard.html b/src/web/templates/admin/dashboard.html index 2436c955..22e82349 100644 --- a/src/web/templates/admin/dashboard.html +++ b/src/web/templates/admin/dashboard.html @@ -11,6 +11,7 @@ # {{ _('Nickname') }} {{ _('Email') }} + {{ _('Member since') }} {{ _('Last seen') }} {{ _('Actions') }} @@ -19,15 +20,11 @@ {% for user in users|sort(attribute="last_seen")|reverse %} {{ loop.index }} - {% if user.id == current_user.id %} - {{ user.nickname }} (It's you!) - {% else %} - {{ user.nickname }} - {% endif %} + {{ user.nickname }}{% if user.id == current_user.id %} (It's you!){% endif %} {{ user.email }} - {{ user.last_seen }} + {{ user.date_created | datetime }} + {{ user.last_seen | datetime }} - {% if user.id != current_user.id %} diff --git a/src/web/templates/admin/user.html b/src/web/templates/admin/user.html deleted file mode 100644 index d1e08c0d..00000000 --- a/src/web/templates/admin/user.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "layout.html" %} -{% block head%} -{{super()}} -{% endblock %} -{% block content %} -
-
- {{ _('Edit this user') }} -

{{ _('Membership') }}

-
-
-

{{ _('Member since') }} {{ user.date_created | datetime }}.

-

{{ _('Last seen:') }} {{ user.last_seen | datetime }}.

-
-
-
- {% include "feed_list.html" %} -
-{% endblock %} diff --git a/src/web/templates/feed_list.html b/src/web/templates/feed_list.html index 2cfab7d8..114ae960 100644 --- a/src/web/templates/feed_list.html +++ b/src/web/templates/feed_list.html @@ -34,14 +34,10 @@ {{ feed.site_link }} ( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }} - {% if feed.user_id == current_user.id %} - - - - - {% else %} - - {% endif %} + + + + {% endfor %} diff --git a/src/web/views/admin.py b/src/web/views/admin.py index 753b864f..30758f63 100644 --- a/src/web/views/admin.py +++ b/src/web/views/admin.py @@ -7,7 +7,7 @@ from flask.ext.principal import Permission, RoleNeed from web.lib.utils import redirect_url from web.models import Role -from web.controllers import UserController, ArticleController, FeedController +from web.controllers import UserController, ArticleController from web.forms import InformationMessageForm, UserForm from web import notifications @@ -130,19 +130,6 @@ def delete_user(user_id=None): '%(error)', error=error), 'danger') return redirect(redirect_url()) -@admin_bp.route('/delete/', methods=['GET']) -@login_required -@admin_permission.require(http_exception=403) -def delete(feed_id=None): - "Deletes the feed of a user." - try: - feed = FeedController().delete(feed_id) - flash(gettext("Feed successfully deleted."), 'success') - except Exception as error: - flash('An error occured while trying to delete a feed: ' - + str(error), 'danger') - return redirect(url_for('home')) - @admin_bp.route('/toggle_user/', methods=['GET']) @login_required @admin_permission.require() -- cgit