From caa7ea2711ecb33a474eb7c247302b3791adb8ce Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Thu, 21 Jul 2016 15:08:29 +0200 Subject: [PATCH] Show tags on bookmarks overview --- digimarks.py | 3 ++- templates/bookmarks.html | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/digimarks.py b/digimarks.py index cfec245..b8173da 100644 --- a/digimarks.py +++ b/digimarks.py @@ -190,7 +190,8 @@ def bookmarks(userkey): #else: # abort(404) bookmarks = Bookmark.select().where(Bookmark.userkey == userkey) - return render_template('bookmarks.html', bookmarks=bookmarks, userkey=userkey) + tags = get_tags_for_user(userkey) + return render_template('bookmarks.html', bookmarks=bookmarks, userkey=userkey, tags=tags) diff --git a/templates/bookmarks.html b/templates/bookmarks.html index 891cc5a..596fd5d 100644 --- a/templates/bookmarks.html +++ b/templates/bookmarks.html @@ -2,6 +2,16 @@ {% block title %}Bookmarks{% endblock %} {% block pageheader %}Bookmarks{% endblock %} {% block pagecontent %} +{% if tags %} +
+ {% for tag in tags %} +
+ {{ tag }} +
+ {% endfor %} +
+{% endif %} +
{% for bookmark in bookmarks %}