aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-13 21:41:24 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-13 21:41:24 +0100
commit2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa (patch)
treedada79f00267fce1ad974bb0c9a52a243b4855b7 /src/web
parentFormat the date. (diff)
downloadnewspipe-2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa.tar.gz
newspipe-2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa.tar.bz2
newspipe-2f5424febbc1e12b6abf29f5e0259d4b8c17d2aa.zip
Various improvements for the public pages and the private profile edition page.
Diffstat (limited to 'src/web')
-rw-r--r--src/web/templates/edit_feed.html2
-rw-r--r--src/web/templates/feed.html6
-rw-r--r--src/web/views/user.py4
3 files changed, 9 insertions, 3 deletions
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 @@
<div class="checkbox">
{{ form.private(class_="checkbox", style="margin-left: 0px;") }}
</div>
+ <span class="text-muted">{{ _("If checked, articles of this feed won't be available to others and the feed won't be listed on <a href='%(url)s'>your profile page</a>.", url=url_for('user.profile_public', nickname=current_user.nickname) ) }}</span>
</div>
+
</div>
<div class="form-group">
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 @@
</div>
</div>
<div class="col-md-4">
+ <p><h3>{{ _('Most recurrent words') }}</h3></p>
{% if articles | count != 0 %}
- <div>{{ tag_cloud | safe }}</div>
+ <div class="well">{{ tag_cloud | safe }}</div>
{% endif %}
</div>
</div>
@@ -76,7 +77,8 @@
<script>
$(document).ready(function() {
$('#table-articles').DataTable( {
- responsive: true
+ responsive: true,
+ order: [[1, "desc"]]
});
});
</script>
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
bgstack15