no label, ui fixes
This commit is contained in:
parent
8c676a950e
commit
4e720b9364
|
@ -90,10 +90,9 @@ class index:
|
|||
def GET(self, name):
|
||||
vars = web.input(sort=None, order=None, filter_cat=None ,filter_value=None , tracker=None)
|
||||
|
||||
#cookies are a delicious delecacy.
|
||||
if not vars.sort: #no arguments, default to coockies.
|
||||
newvars = cookies()
|
||||
if vars.filter_cat: #i'm doing it wrong :( , but it works..
|
||||
if vars.filter_cat:
|
||||
newvars['filter_cat'] = vars.filter_cat
|
||||
newvars['filter_value'] = vars.filter_value
|
||||
vars.update(newvars)
|
||||
|
@ -105,7 +104,7 @@ class index:
|
|||
|
||||
#Filters
|
||||
filter_dict = {}
|
||||
if vars.filter_cat and vars.filter_value and vars.filter_value <> "All":
|
||||
if vars.filter_cat and vars.filter_value <> "All":
|
||||
filter_dict = {vars.filter_cat:vars.filter_value}
|
||||
|
||||
torrents = proxy.get_torrents_status(filter_dict, TORRENT_KEYS)
|
||||
|
|
|
@ -178,7 +178,7 @@ def template_get(key):
|
|||
val = getattr(web.input(**{key:None}), key)
|
||||
if not val:
|
||||
val = getcookie(key)
|
||||
return val
|
||||
return val or ""
|
||||
|
||||
def id_to_label(text):
|
||||
"translated capitalize"
|
||||
|
|
|
@ -44,6 +44,12 @@ $for cat in filter_items.keys():
|
|||
<img src="/pixmaps/$(value.lower())"></img>
|
||||
$if cat == "tracker_host":
|
||||
<img src="http://$value/favicon.ico" width="16" height="16"></img>
|
||||
$if not value:
|
||||
$if cat == "label":
|
||||
$_("No Label") ($count)</a>
|
||||
$else:
|
||||
$_("None") ($count)</a>
|
||||
$else:
|
||||
$value ($count)</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue