persist filter_[cat/value] in redirects
This commit is contained in:
parent
14b5aabfa6
commit
88d12ef63b
|
@ -94,8 +94,12 @@ class index:
|
|||
if not vars.sort: #no arguments, default to coockies.
|
||||
vars.update(cookies())
|
||||
else: #has arguments:set cookies from arguments.
|
||||
for key in ["sort", "order", "state", "tracker", "keyword"]:
|
||||
setcookie(key,getattr(vars,key))
|
||||
for key in ["sort", "order", "filter_cat","filter_value"]:
|
||||
value = getattr(vars, key)
|
||||
if value:
|
||||
setcookie(key, value)
|
||||
else:
|
||||
setcookie(key, "")
|
||||
|
||||
#organize-filters
|
||||
label_filters = {}
|
||||
|
|
|
@ -113,13 +113,6 @@ def error_page(error):
|
|||
web.header("Cache-Control", "no-cache, must-revalidate")
|
||||
print render.error(error)
|
||||
|
||||
#template-defs:
|
||||
"""
|
||||
obsolete:
|
||||
def category_tabs(torrent_list):
|
||||
filter_tabs, category_tabs = get_category_choosers(torrent_list)
|
||||
return render.part_categories(filter_tabs, category_tabs)
|
||||
"""
|
||||
|
||||
def template_crop_middle(text, maxlen):
|
||||
try:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$def with (column_id, column_name, order, active_up, active_down)
|
||||
<th class="torrent_table">
|
||||
<a href="$base/index?sort=$column_id&order=$order&state=$get('state')&tracker=$get('tracker')&keyword=$get('keyword')"">
|
||||
<a href="$base/index?sort=$column_id&order=$order&filter_cat=$get('filter_cat')&filter_value=$get('filter_value')"">
|
||||
$column_name\
|
||||
$if active_up:
|
||||
<img src="$base/static/images/tango/up.png" />
|
||||
|
|
Loading…
Reference in New Issue