From 2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 13 Nov 2016 21:41:24 +0100 Subject: Various improvements for the public pages and the private profile edition page. --- src/web/templates/edit_feed.html | 2 ++ src/web/templates/feed.html | 6 ++++-- src/web/views/user.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'src/web') diff --git a/src/web/templates/edit_feed.html b/src/web/templates/edit_feed.html index 128b54fb..fd2427c1 100644 --- a/src/web/templates/edit_feed.html +++ b/src/web/templates/edit_feed.html @@ -52,7 +52,9 @@
{{ form.private(class_="checkbox", style="margin-left: 0px;") }}
+ {{ _("If checked, articles of this feed won't be available to others and the feed won't be listed on your profile page.", url=url_for('user.profile_public', nickname=current_user.nickname) ) }} +
diff --git a/src/web/templates/feed.html b/src/web/templates/feed.html index e3241ede..6b2e5e40 100644 --- a/src/web/templates/feed.html +++ b/src/web/templates/feed.html @@ -66,8 +66,9 @@
+

{{ _('Most recurrent words') }}

{% if articles | count != 0 %} -
{{ tag_cloud | safe }}
+
{{ tag_cloud | safe }}
{% endif %}
@@ -76,7 +77,8 @@ diff --git a/src/web/views/user.py b/src/web/views/user.py index 21427d3c..91cf7e4a 100644 --- a/src/web/views/user.py +++ b/src/web/views/user.py @@ -27,7 +27,9 @@ def profile_public(nickname=None): user_contr = UserController() user = user_contr.get(nickname=nickname) if not user.is_public_profile: - return redirect(url_for('home')) + if current_user.is_authenticated and current_user.id == user.id: + flash('You must set your profile to public.', 'info') + return redirect(url_for('user.profile')) filters = {} filters['private'] = False -- cgit