Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'hotfix/0.2.1'

  • Loading branch information...
commit 7277305c77f6431e750d0e7552e7764f6cfa7266 2 parents 6e0e4e5 + 430d525
@mitechie mitechie authored
View
6 bookie/templates/bmark/func.mako
@@ -100,7 +100,7 @@
</div>
</%def>
-<%def name="bmarknextprev(page, max_count, count, next_url, url_params=None)">
+<%def name="bmarknextprev(page, max_count, count, next_url, url_params=None, tags=None)">
<%
if max_count == count:
show_next = True
@@ -116,12 +116,12 @@
%>
% if page != 0:
- <a href="${request.route_url(next_url, **url_params)}?page=${prev}"
+ <a href="${request.route_url(next_url, tags=tags, **url_params)}?page=${prev}"
class="button">Prev</a>
% endif
% if show_next:
- <a href="${request.route_url(next_url, **url_params)}?page=${next}"
+ <a href="${request.route_url(next_url, tags=tags, **url_params)}?page=${next}"
class="button">Next</a>
% endif
View
10 bookie/templates/bmark/recent.mako
@@ -5,7 +5,13 @@
<h1></h1>
<!-- Show the tag filter ui -->
+<%
+ if tags:
+ url = 'bmark_recent_tags'
+ else:
+ url = 'bmark_recent'
+%>
<div class="yui3-g data_list">
<div class="yui3-u-2-3">
${tag_filter(tags)}
@@ -14,7 +20,7 @@
<div class="yui3-u-7-8">&nbsp;</div>
<div class="yui3-u-1-8 col_end buttons">
- ${bmarknextprev(page, max_count, count, 'bmark_recent')}
+ ${bmarknextprev(page, max_count, count, url, tags=tags)}
</div>
<div class="yui3-u-1 data_body">
@@ -24,6 +30,6 @@
<div class="yui3-u-7-8">&nbsp;</div>
<div class="yui3-u-1-8 col_end buttons">
- ${bmarknextprev(page, max_count, count, 'bmark_recent')}
+ ${bmarknextprev(page, max_count, count, url, tags=tags)}
</div>
</div>
View
6 bookie/views/bmarks.py
@@ -29,6 +29,9 @@ def recent(request):
# do we have any tags to filter upon
tags = rdict.get('tags', None)
+ if isinstance(tags, str):
+ tags = [tags]
+
# if we don't have tags, we might have them sent by a non-js browser as a
# string in a query string
if not tags and 'tag_filter' in params:
@@ -37,7 +40,6 @@ def recent(request):
LOG.debug('tags')
LOG.debug(tags)
-
recent_list = BmarkMgr.find(limit=RESULTS_MAX,
order_by=Bmark.stored.desc(),
tags=tags,
@@ -54,8 +56,6 @@ def recent(request):
'allow_edit': access.edit_enabled(request.registry.settings),
}
- LOG.debug('RET')
- LOG.debug(ret)
return ret
Please sign in to comment.
Something went wrong with that request. Please try again.