aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/views')
-rw-r--r--src/web/views/bookmark.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/web/views/bookmark.py b/src/web/views/bookmark.py
index 841d7364..8736e1ca 100644
--- a/src/web/views/bookmark.py
+++ b/src/web/views/bookmark.py
@@ -54,10 +54,13 @@ bookmark_bp = Blueprint('bookmark', __name__, url_prefix='/bookmark')
def list_(per_page, status='all'):
"Lists the bookmarks."
head_titles = [gettext("Bookmarks")]
+ filters = {}
+ tag = request.args.get('tag', None)
+ if tag:
+ filters['tags_proxy__contains'] = tag
if current_user.is_authenticated:
# query for the bookmarks of the authenticated user
- filters = {}
if status == 'public':
filters['shared'] = True
elif status == 'private':
@@ -72,7 +75,8 @@ def list_(per_page, status='all'):
bookmark_query = BookmarkController(current_user.id).read(**filters)
else:
# query for the shared bookmarks (of all users)
- bookmark_query = BookmarkController().read(**{'shared': True})
+ filters['shared'] = True
+ bookmark_query = BookmarkController().read(**filters)
bookmarks = bookmark_query.order_by(desc('time'))
page, per_page, offset = get_page_args()
bgstack15