Fixed alphabet navigation to remove the table elements.
svn: r13192
This commit is contained in:
parent
941fff23ae
commit
44e1291b79
@ -5704,7 +5704,8 @@ def _has_webpage_extension(url):
|
|||||||
|
|
||||||
def alphabet_navigation(db, handle_list, key):
|
def alphabet_navigation(db, handle_list, key):
|
||||||
"""
|
"""
|
||||||
Will create the alphabetical navigation bar...
|
Will create the alphabet navigation bar for classes IndividualListPage,
|
||||||
|
SurnameListPage, and PlaceListPage
|
||||||
|
|
||||||
handle_list -- a list of people's or Places' handles
|
handle_list -- a list of people's or Places' handles
|
||||||
key -- _PERSON or _PLACE
|
key -- _PERSON or _PLACE
|
||||||
@ -5742,34 +5743,28 @@ def alphabet_navigation(db, handle_list, key):
|
|||||||
# begin alphabet division
|
# begin alphabet division
|
||||||
with Html("div", id='alphabet') as section:
|
with Html("div", id='alphabet') as section:
|
||||||
|
|
||||||
# set up table
|
num_ltrs = len(sorted_alpha_index)
|
||||||
with Html("table", class_ = "infolist alphabet") as table:
|
nrows = (num_ltrs / 35) + 1
|
||||||
section += table
|
index = 0
|
||||||
|
for rows in xrange(nrows):
|
||||||
num_ltrs = len(sorted_alpha_index)
|
unordered = Html('ul')
|
||||||
nrows = (num_ltrs / 35) + 1
|
section += unordered
|
||||||
index = 0
|
cols = 0
|
||||||
for rows in xrange(nrows):
|
while (cols <= 35 and index < num_ltrs):
|
||||||
trow = Html("tr")
|
ltr = sorted_alpha_index[index]
|
||||||
table += trow
|
title_str = _('Surnames') if key == 0 else _('Places')
|
||||||
unordered = Html('ul')
|
if lang_country == "sv_SE" and ltr == u'V':
|
||||||
trow += unordered
|
title_str += _(' starting with %s') % "V,W"
|
||||||
cols = 0
|
unordered += (Html('li', class_ = "letters", inline = True) +
|
||||||
while (cols <= 35 and index < num_ltrs):
|
Html('a', "V,W", href="#V,W", title=title_str)
|
||||||
ltr = sorted_alpha_index[index]
|
)
|
||||||
title_str = _('Surnames') if key == 0 else _('Places')
|
else:
|
||||||
if lang_country == "sv_SE" and ltr == u'V':
|
title_str += _(' starting with %s') % ltr
|
||||||
title_str += _(' starting with %s') % "V,W"
|
unordered += Html('li', class_ = "letters", inline = True) + (
|
||||||
unordered += (Html('li', class_ = "letters", inline = True) +
|
Html('a', ltr, href='#%s' % ltr, title=title_str)
|
||||||
Html('a', "V,W", href="#V,W", title=title_str)
|
)
|
||||||
)
|
cols += 1
|
||||||
else:
|
index += 1
|
||||||
title_str += _(' starting with %s') % ltr
|
|
||||||
unordered += Html('li', class_ = "letters", inline = True) + (
|
|
||||||
Html('a', ltr, href='#%s' % ltr, title=title_str)
|
|
||||||
)
|
|
||||||
cols += 1
|
|
||||||
index += 1
|
|
||||||
|
|
||||||
# return alphabet navigation to its callers
|
# return alphabet navigation to its callers
|
||||||
return section
|
return section
|
||||||
|
Loading…
Reference in New Issue
Block a user