Bug#4601: More w3c compliance fixes in person_link() and SurnameListPages.
svn: r16586
This commit is contained in:
parent
7028619387
commit
aa04f08668
@ -1791,7 +1791,7 @@ class BasePage(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# return hyperlink to its caller
|
# return hyperlink to its caller
|
||||||
return Html("a", _("Family Map"), href = url, title = _("Family Map"), target = "_top",
|
return Html("a", _("Family Map"), href = url, title = _("Family Map"),
|
||||||
class_ = "familymap", inline = True)
|
class_ = "familymap", inline = True)
|
||||||
|
|
||||||
def person_link(self, url, person, name_style, first = True, gid = None, thumbnailUrl = None):
|
def person_link(self, url, person, name_style, first = True, gid = None, thumbnailUrl = None):
|
||||||
@ -2348,7 +2348,8 @@ class SurnamePage(BasePage):
|
|||||||
tcell += ','
|
tcell += ','
|
||||||
if check_person_database(partner):
|
if check_person_database(partner):
|
||||||
url = self.report.build_url_fname_html(partner_handle, "ppl", True)
|
url = self.report.build_url_fname_html(partner_handle, "ppl", True)
|
||||||
tcell += self.person_link(url, partner, _NAME_STYLE_DEFAULT, gid = partner.gramps_id)
|
tcell += self.person_link(url, partner, _NAME_STYLE_DEFAULT,
|
||||||
|
gid = partner.gramps_id)
|
||||||
else:
|
else:
|
||||||
tcell += partner_name
|
tcell += partner_name
|
||||||
else:
|
else:
|
||||||
@ -3262,21 +3263,24 @@ class SurnameListPage(BasePage):
|
|||||||
thead = Html("thead")
|
thead = Html("thead")
|
||||||
table += thead
|
table += thead
|
||||||
|
|
||||||
trow = ( Html("tr") +
|
trow = Html("tr")
|
||||||
Html("th", _("Letter"), class_ = "ColumnLetter", inline = True)
|
|
||||||
)
|
|
||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
|
trow += Html("th", _("Letter"), class_ = "ColumnLetter", inline = True)
|
||||||
|
|
||||||
|
# create table header surname hyperlink
|
||||||
fname = self.report.surname_fname + self.ext
|
fname = self.report.surname_fname + self.ext
|
||||||
tcell = Html("th", class_ = "ColumnSurname", inline = True)
|
tcell = Html("th", class_ = "ColumnSurname", inline = True)
|
||||||
trow += tcell
|
trow += tcell
|
||||||
hyper = Html("a", _("Surname"), href = fname)
|
hyper = Html("a", _("Surname"), href = fname, title = _("Surnames"))
|
||||||
tcell += hyper
|
tcell += hyper
|
||||||
|
|
||||||
|
# create table header number of people hyperlink
|
||||||
fname = "surnames_count" + self.ext
|
fname = "surnames_count" + self.ext
|
||||||
tcell = Html("th", class_ = "ColumnQuantity", inline = True)
|
tcell = Html("th", class_ = "ColumnQuantity", inline = True)
|
||||||
trow += tcell
|
trow += tcell
|
||||||
hyper = Html("a", _('Number of People'), href = fname)
|
num_people = _("Number of People")
|
||||||
|
hyper = Html("a", num_people, href = fname, title = num_people)
|
||||||
tcell += hyper
|
tcell += hyper
|
||||||
|
|
||||||
# begin table body
|
# begin table body
|
||||||
@ -3304,26 +3308,27 @@ class SurnameListPage(BasePage):
|
|||||||
|
|
||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
|
tcell = Html("td", class_ = "ColumnLetter", inline = True)
|
||||||
|
trow += tcell
|
||||||
|
|
||||||
if letter != last_letter:
|
if letter != last_letter:
|
||||||
last_letter = letter
|
last_letter = letter
|
||||||
trow.attr = 'class = "BeginLetter"'
|
trow.attr = 'class = "BeginLetter"'
|
||||||
|
|
||||||
tcell = ( Html("td", class_ = "ColumnLetter") +
|
hyper = Html("a", last_letter, name = last_letter,
|
||||||
Html("a", last_letter, name = last_letter,
|
|
||||||
title = "Surnames with letter " + last_letter, inline = True)
|
title = "Surnames with letter " + last_letter, inline = True)
|
||||||
)
|
tcell += hyper
|
||||||
trow += tcell
|
|
||||||
|
|
||||||
trow += Html("td", self.surname_link(name_to_md5(surname), surname),
|
|
||||||
class_ = "ColumnSurname")
|
|
||||||
|
|
||||||
elif surname != last_surname:
|
elif surname != last_surname:
|
||||||
trow += ( Html("td", " ", class_ = "ColumnLetter") +
|
tcell += " "
|
||||||
Html("td", self.surname_link(name_to_md5(surname), surname),
|
|
||||||
class_ = "ColumnSurname", inline = True)
|
|
||||||
)
|
|
||||||
|
|
||||||
last_surname = surname
|
last_surname = surname
|
||||||
|
|
||||||
|
trow += Html("td", self.surname_link(name_to_md5(surname), surname),
|
||||||
|
class_ = "ColumnSurname", inline = True)
|
||||||
|
|
||||||
trow += Html("td", len(data_list), class_ = "ColumnQuantity", inline = True)
|
trow += Html("td", len(data_list), class_ = "ColumnQuantity", inline = True)
|
||||||
|
|
||||||
# create footer section
|
# create footer section
|
||||||
|
Loading…
x
Reference in New Issue
Block a user