diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/web/templates/management.html | 1 | ||||
-rw-r--r-- | src/web/views/user.py | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/web/templates/management.html b/src/web/templates/management.html index dc95a052..0a844365 100644 --- a/src/web/templates/management.html +++ b/src/web/templates/management.html @@ -5,6 +5,7 @@ <h1>{{ _('Your subscriptions') }}</h1> <p>{{ _('You are subscribed to') }} {{ nb_feeds }} <a href="/feeds">{{ _('feeds') }}</a>. <a href="{{ url_for("feed.form") }}">{{ _('Add') }}</a> {{ _('a feed') }}.</p> <p>{{ nb_articles }} {{ _('articles are stored in the database with') }} {{ nb_unread_articles }} {{ _('unread articles') }}.</p> + <p>You have {{ nb_categories }} <a href="{{ url_for("categories.list_")}}">categories</a>.</p> <a href="{{ url_for("articles.expire", weeks=10) }}" class="btn btn-default" onclick="return confirm('{{ _('You are going to delete old articles.') }}');">{{ _('Delete articles older than 10 weeks') }}</a> </div> <div class="well"> diff --git a/src/web/views/user.py b/src/web/views/user.py index f24da37a..1ce16ade 100644 --- a/src/web/views/user.py +++ b/src/web/views/user.py @@ -8,7 +8,8 @@ from flask.ext.login import login_required, current_user import conf from web import utils, notifications from web.lib.user_utils import confirm_token -from web.controllers import (UserController, FeedController, ArticleController) +from web.controllers import (UserController, FeedController, ArticleController, + CategoryController) from web.forms import ProfileForm, RecoverPasswordForm @@ -58,9 +59,11 @@ def management(): art_contr = ArticleController(current_user.id) nb_articles = art_contr.read().count() nb_unread_articles = art_contr.read(readed=False).count() + nb_categories = CategoryController(current_user.id).read().count() return render_template('management.html', user=current_user, nb_feeds=nb_feeds, nb_articles=nb_articles, - nb_unread_articles=nb_unread_articles) + nb_unread_articles=nb_unread_articles, + nb_categories=nb_categories) @user_bp.route('/profile', methods=['GET', 'POST']) |