aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/templates/bookmarks.html2
-rw-r--r--src/web/views/bookmark.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/web/templates/bookmarks.html b/src/web/templates/bookmarks.html
index 66c6df52..a3ec4580 100644
--- a/src/web/templates/bookmarks.html
+++ b/src/web/templates/bookmarks.html
@@ -39,7 +39,7 @@
{{ pagination.links }}
</div>
</div>
- <br />
+
<div class="row">
<div class="col-md-8">
<ul class="list-group">
diff --git a/src/web/views/bookmark.py b/src/web/views/bookmark.py
index 477ca5fc..e7a4181e 100644
--- a/src/web/views/bookmark.py
+++ b/src/web/views/bookmark.py
@@ -27,6 +27,7 @@ __copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "AGPLv3"
import logging
+import datetime
from werkzeug.exceptions import BadRequest
from flask import Blueprint, render_template, flash, \
@@ -64,7 +65,6 @@ def list_(per_page, status='all'):
query_regex = '%' + query + '%'
filters['__or__'] = {'title__ilike': query_regex,
'description__ilike': query_regex}
-
if current_user.is_authenticated:
# query for the bookmarks of the authenticated user
user_id = current_user.id
@@ -83,6 +83,10 @@ def list_(per_page, status='all'):
pass
else:
# query for the shared bookmarks (of all users)
+ head_titles = [gettext("Recent bookmarks")]
+ not_created_before = datetime.datetime.today() - \
+ datetime.timedelta(days=900)
+ filters['time__gt'] = not_created_before # only "recent" bookmarks
filters['shared'] = True
bookmarks = BookmarkController(user_id) \
bgstack15