aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-29 14:55:06 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2017-05-29 14:55:06 +0200
commita20643b2cc12c420ada7de9fadc15bb677c8b80c (patch)
tree86969f3e8648e542171adec4798b89fc084cc3f0 /src/web
parentadded some fitlters for the bookmarks page (diff)
downloadnewspipe-a20643b2cc12c420ada7de9fadc15bb677c8b80c.tar.gz
newspipe-a20643b2cc12c420ada7de9fadc15bb677c8b80c.tar.bz2
newspipe-a20643b2cc12c420ada7de9fadc15bb677c8b80c.zip
Display edition/deletion links only for connected users.
Diffstat (limited to 'src/web')
-rw-r--r--src/web/templates/bookmarks.html16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/web/templates/bookmarks.html b/src/web/templates/bookmarks.html
index ee93253c..6e79bed2 100644
--- a/src/web/templates/bookmarks.html
+++ b/src/web/templates/bookmarks.html
@@ -6,10 +6,12 @@
{{ pagination.info }}
</div>
<div class="col-md-6 text-right">
- <a class="text-muted" href="{{ url_for('bookmarks.list_') }}">all</a>&nbsp;⸱&nbsp;
- <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'private' }}">private</a>&nbsp;⸱&nbsp;
- <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'public' }}">public</a>&nbsp;⸱&nbsp;
- <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'unread' }}">unread</a>
+ {% if current_user.is_authenticated %}
+ <a class="text-muted" href="{{ url_for('bookmarks.list_') }}">all</a>&nbsp;⸱&nbsp;
+ <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'private' }}">private</a>&nbsp;⸱&nbsp;
+ <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'public' }}">public</a>&nbsp;⸱&nbsp;
+ <a class="text-muted" href="{{ url_for('bookmarks.list_') + 'unread' }}">unread</a>
+ {% endif %}
</div>
</div>
{{ pagination.links }}
@@ -24,8 +26,10 @@
<div class="text-muted">{{ bookmark.description }}</div>
<div>{{ " ".join(bookmark.tags_proxy) }}</div>
{{ bookmark.time }}
- <a class="text-muted" href="{{ url_for('bookmark.form', bookmark_id=bookmark.id) }}">edit</a>
- <a class="text-muted" href="{{ url_for('bookmark.delete', bookmark_id=bookmark.id) }}">delete</a>
+ {% if current_user.is_authenticated %}
+ <a class="text-muted" href="{{ url_for('bookmark.form', bookmark_id=bookmark.id) }}">edit</a>
+ <a class="text-muted" href="{{ url_for('bookmark.delete', bookmark_id=bookmark.id) }}">delete</a>
+ {% endif %}
</p>
</a>
</li>
bgstack15