mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 20:14:13 +00:00
label: remember filters
This commit is contained in:
parent
c1c2ce4244
commit
32e2e37277
@ -174,6 +174,11 @@ def ftime(val):
|
||||
return _("∞")
|
||||
return common.ftime(val)
|
||||
|
||||
def template_get(key):
|
||||
val = getattr(web.input(**{key:None}), key)
|
||||
if not val:
|
||||
return getcookie(key)
|
||||
|
||||
template.Template.globals.update({
|
||||
'sort_head': template_sort_head,
|
||||
'part_stats':template_part_stats,
|
||||
@ -195,7 +200,7 @@ template.Template.globals.update({
|
||||
'version':common.get_version() ,
|
||||
'rev': common.get_revision(),
|
||||
'getcookie':getcookie,
|
||||
'get': lambda (var): getattr(web.input(**{var:None}), var), # unreadable :-(
|
||||
'get': template_get,
|
||||
#'env':'0.6',
|
||||
'forms':web.Storage(),
|
||||
'enumerate':enumerate,
|
||||
|
@ -39,7 +39,7 @@ $for cat in ["state", "tracker", "label"]:
|
||||
$if not get('filter_cat'):
|
||||
class="selected"
|
||||
>
|
||||
<a href="$self_url(filter_cat=cat, filter_value=value)">
|
||||
<a href="$self_url(filter_cat=cat, filter_value=value, sort=get('sort'), order=get('order')) ">
|
||||
$if cat == "state":
|
||||
<img src="/pixmaps/$(value.lower())"></img>
|
||||
$value ($count)</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user