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.
|
if not vars.sort: #no arguments, default to coockies.
|
||||||
vars.update(cookies())
|
vars.update(cookies())
|
||||||
else: #has arguments:set cookies from arguments.
|
else: #has arguments:set cookies from arguments.
|
||||||
for key in ["sort", "order", "state", "tracker", "keyword"]:
|
for key in ["sort", "order", "filter_cat","filter_value"]:
|
||||||
setcookie(key,getattr(vars,key))
|
value = getattr(vars, key)
|
||||||
|
if value:
|
||||||
|
setcookie(key, value)
|
||||||
|
else:
|
||||||
|
setcookie(key, "")
|
||||||
|
|
||||||
#organize-filters
|
#organize-filters
|
||||||
label_filters = {}
|
label_filters = {}
|
||||||
|
|
|
@ -113,13 +113,6 @@ def error_page(error):
|
||||||
web.header("Cache-Control", "no-cache, must-revalidate")
|
web.header("Cache-Control", "no-cache, must-revalidate")
|
||||||
print render.error(error)
|
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):
|
def template_crop_middle(text, maxlen):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
$def with (column_id, column_name, order, active_up, active_down)
|
$def with (column_id, column_name, order, active_up, active_down)
|
||||||
<th class="torrent_table">
|
<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\
|
$column_name\
|
||||||
$if active_up:
|
$if active_up:
|
||||||
<img src="$base/static/images/tango/up.png" />
|
<img src="$base/static/images/tango/up.png" />
|
||||||
|
|
Loading…
Reference in New Issue