/browse: Fix bug in handling custom column based categories

This commit is contained in:
Kovid Goyal 2010-10-18 10:28:17 -06:00
parent a9b64899aa
commit f57024d7c8
2 changed files with 5 additions and 2 deletions

View File

@ -53,6 +53,7 @@ div.navigation {
} }
#listing td { #listing td {
padding: 0.25em; padding: 0.25em;
vertical-align: middle;
} }
#listing td.thumbnail { #listing td.thumbnail {
@ -73,6 +74,7 @@ div.navigation {
overflow: hidden; overflow: hidden;
text-align: center; text-align: center;
text-decoration: none; text-decoration: none;
vertical-align: middle;
} }
#logo { #logo {

View File

@ -7,6 +7,7 @@ __docformat__ = 'restructuredtext en'
import operator, os, json import operator, os, json
from binascii import hexlify, unhexlify from binascii import hexlify, unhexlify
from urllib import quote
import cherrypy import cherrypy
@ -136,7 +137,7 @@ def get_category_items(category, items, db, datatype): # {{{
q = i.category q = i.category
if not q: if not q:
q = category q = category
href = '/browse/matches/%s/%s'%(q, id_) href = '/browse/matches/%s/%s'%(quote(q), quote(id_))
return templ.format(xml(name), rating, return templ.format(xml(name), rating,
xml(desc), xml(href), rstring) xml(desc), xml(href), rstring)
@ -329,7 +330,7 @@ class BrowseServer(object):
cats = [('<li title="{2} {0}"><img src="{src}" alt="{0}" />' cats = [('<li title="{2} {0}"><img src="{src}" alt="{0}" />'
'<span class="label">{0}</span>' '<span class="label">{0}</span>'
'<span class="url">/browse/category/{1}</span></li>') '<span class="url">/browse/category/{1}</span></li>')
.format(xml(x, True), xml(y), xml(_('Browse books by')), .format(xml(x, True), xml(quote(y)), xml(_('Browse books by')),
src='/browse/icon/'+z) src='/browse/icon/'+z)
for x, y, z in cats] for x, y, z in cats]