General cleanup, fixing of quotations, fixing of gramps_id where it was used of NarrativeWeb, polishing and cleanup of stylesheet.

svn: r13275
This commit is contained in:
Rob G. Healey 2009-09-29 06:16:35 +00:00
parent e35544a0df
commit 86041e6caf
2 changed files with 123 additions and 136 deletions

View File

@ -493,71 +493,58 @@ table.surname tbody tr td.ColumnParents {
/* Individuals /* Individuals
----------------------------------------------------- */ ----------------------------------------------------- */
#Individuals { } div#Individuals { }
#Individuals table.individuallist { div#Individuals table.individuallist {
border-bottom:solid 1px #453619; border-bottom: solid 1px #5D835F;
} }
#Individuals table.individuallist tbody tr td { div#Individuals table.individuallist tbody tr td {
border-bottom:dashed 1px #453619; border-bottom: dashed 1px #5D835F;
background-color: #D8F3D6;
} }
#Individuals table.individuallist tbody tr td a:hover { div#Individuals table.individuallist tbody tr td a {
text-decoration:none; display: block;
padding: .6em 10px;
} }
table.individuallist tbody tr td.ColumnSurname a:hover, div#Individuals table.individuallist tbody tr td.ColumnSurname a:hover,
table.individuallist tbody tr td.ColumnSurname a:active { div#Individuals table.individuallist tbody tr td.ColumnSurname a:active {
cursor:default; cursor:default;
color:black; color: #000;
background:none; background:none;
} }
table.individuallist tbody tr td.ColumnName { div#Individuals table.individuallist tbody tr td.ColumnName {
padding:0;
background-color: #FFF; background-color: #FFF;
} }
table.individuallist tbody tr td.ColumnName a { div#Individuals table.individuallist tbody tr td.ColumnName a {
display:block;
padding:.6em 10px;
vertical-align:middle; vertical-align:middle;
} }
table.individuallist tbody tr td.ColumnName a:hover { } div#Individuals table.individuallist tbody tr td.ColumnPartner {
table.individuallist tbody tr td.ColumnPartner {
padding:0;
background-color: #FFF; background-color: #FFF;
} }
table.individuallist tbody tr td.ColumnPartner a { div#Individuals div table.infolist tr td p {
display:block;
padding:.6em 10px;
vertical-align:middle;
}
table.individuallist tbody tr td.ColumnPartner a:hover {
}
#Individuals div table.infolist tr td p {
font:normal .9em/1.2em sans-serif; font:normal .9em/1.2em sans-serif;
vertical-align:top; vertical-align:top;
} }
#Individuals div table.infolist tr td p a { div#Individuals div table.infolist tr td p a {
display:inline; display:inline;
} }
/* IndividualDetail div#IndividualDetail { }
------------------------------------------------------ */
#IndividualDetail { }
#IndividualDetail div table.infolist tr td { #IndividualDetail div table.infolist tr td {
font:normal .9em/1.2em sans-serif; font:normal .9em/1.2em sans-serif;
vertical-align:top; vertical-align:top;
} }
#IndividualDetail div table.infolist tr td a { div#IndividualDetail div table.infolist tr td a {
display:inline; display:inline;
} }
#IndividualDetail table.infolist tr td a:hover { div#IndividualDetail table.infolist tr td a:hover {
text-decoration:underline; text-decoration:underline;
} }
#IndividualDetail table.infolist tbody tr td.ColumnAttribute { div#IndividualDetail table.infolist tbody tr td.ColumnAttribute {
width:10%; width:10%;
} }
#IndividualDetail div.subsection table tr td:first-child { div#IndividualDetail div.subsection table tr td:first-child {
padding-left:20px; padding-left:20px;
} }
@ -776,13 +763,13 @@ table.exiflist tr td.ColumnValue {
----------------------------------------------------- */ ----------------------------------------------------- */
#Download { #Download {
margin: 0; margin: 0;
padding: 0 0.5cm 0 0.5cm; padding: .5em 0 .5em 0;
} }
table.download { table.download {
padding: 0; padding: 0;
margin: 2cm 0 2cm 0; margin: .5em 0 .5em 0;
border:solid 2px #000; border: solid 1px #5D835F;
width:100%; width: 100%;
nackground-color: #D8F3D6; nackground-color: #D8F3D6;
} }
table.download img { table.download img {
@ -791,32 +778,21 @@ table.download img {
table.download thead tr th { table.download thead tr th {
background-color: #6AF364; background-color: #6AF364;
color: #000; color: #000;
text-transform:uppercase; padding: 15px 0px 0px 20px;
padding-left:20px;
padding-top:15px;
border-style:solid; border-style:solid;
border-color: #000; border-color: #000;
border-width:0 2px 2px 2px; border-width: 0px 2px 2px 2px;
text-align:left; text-align:left;
} }
table.download tbody tr#Row02 { table.download tbody tr#Row02 {
border-bottom:solid 2px #000; border-bottom:solid 2px #000;
} }
table.download tbody tr td { table.download tbody tr td {
padding-left:20px;
padding-top:15px;
border-style:solid; border-style:solid;
border-color: #000; border-color: #000;
border-width:0 2px 2px 2px; border-width:0 2px 2px 2px;
text-align:left; text-align:left;
} }
table.download td.ColumnDescription {
width:45%;
}
table.download td.ColumnLicense {
width:6%;
padding-left:20px;
}
table.download td.ColumnFilename { table.download td.ColumnFilename {
width:30%; width:30%;
background-color: #FFF; background-color: #FFF;
@ -828,32 +804,37 @@ table.download td.ColumnFilename a {
font-style: italic; font-style: italic;
text-decoration:none; text-decoration:none;
} }
table.download td.ColumnFilename a:hover { table.download td.ColumnDescription {
text-decoration:underline; width:45%;
}
table.download td.ColumnLicense {
width:6%;
} }
table.download td.ColumnModified { table.download td.ColumnModified {
width:17%; width:17%;
font-weight:bold;
} }
/* Sources /* Sources
----------------------------------------------------- */ ----------------------------------------------------- */
#Sources { } #Sources { }
#Sources table.infolist tbody tr td.ColumnRowLabel { div#Sources table.infolist tbody tr td {
background-color: #D8F3D6;
}
div#Sources table.infolist tbody tr td.ColumnRowLabel {
padding-bottom:0; padding-bottom:0;
} }
#Sources table.infolist tbody tr td.ColumnName { div#Sources table.infolist tbody tr td.ColumnName {
padding:0; padding:0;
background-color: #FFF; background-color: #FFF;
} }
#Sources table.infolist tbody tr td.ColumnName a { div#Sources table.infolist tbody tr td.ColumnName a {
font-size:.9em; font-size:.9em;
padding:.1em 10px .3em 10px; padding:.1em 10px .3em 10px;
} }
#Sources table.infolist tbody tr td.ColumnName a:hover { } div#Sources table.infolist tbody tr td.ColumnName a:hover { }
#SourceDetail div#references ol li { div#SourceDetail div#references ol li {
padding-bottom:.5em; padding-bottom:.5em;
} }
@ -861,11 +842,18 @@ table.download td.ColumnModified {
------------------------------------------------------ */ ------------------------------------------------------ */
div#RepositoryList { } div#RepositoryList { }
div#RepositoryList table.repolist tbody tr td {
background-color: #D8F3D6;
}
div#RepositoryList table.repolist tbody tr td a {
display: block;
padding: .3em 10px;
}
div#RepositoryList table.repolist tbody tr td.ColumnRowLabel { div#RepositoryList table.repolist tbody tr td.ColumnRowLabel {
width: 14%; width: 9%;
} }
div#RepositoryList table.repolist tbody tr td.ColumnType { div#RepositoryList table.repolist tbody tr td.ColumnType {
width: 14%; width: 15%;
} }
div#RepositoryList table.repolist tbody tr td.ColumnName { div#RepositoryList table.repolist tbody tr td.ColumnName {
background-color: #FFF; background-color: #FFF;

View File

@ -387,7 +387,7 @@ class BasePage(object):
if htmlnotetext: if htmlnotetext:
text = htmlnotetext text = htmlnotetext
else: else:
text = Html('p', note_text) text = Html("p", note_text)
# return text of the note to its callers # return text of the note to its callers
return text return text
@ -421,7 +421,7 @@ class BasePage(object):
#FIXME: following split should be regex to match \n\s*\n instead? #FIXME: following split should be regex to match \n\s*\n instead?
htmllist += Html('pre', indent=None, inline = True) htmllist += Html('pre', indent=None, inline = True)
for line in markuptext.split('\n\n'): for line in markuptext.split('\n\n'):
htmllist += Html('p') htmllist += Html("p")
for realline in line.split('\n'): for realline in line.split('\n'):
htmllist += realline htmllist += realline
htmllist += Html('br') htmllist += Html('br')
@ -430,7 +430,7 @@ class BasePage(object):
#flowed #flowed
#FIXME: following split should be regex to match \n\s*\n instead? #FIXME: following split should be regex to match \n\s*\n instead?
for line in markuptext.split('\n\n'): for line in markuptext.split('\n\n'):
htmllist += Html('p') htmllist += Html("p")
htmllist += line htmllist += line
return htmllist return htmllist
@ -511,7 +511,7 @@ class BasePage(object):
if self.inc_events: if self.inc_events:
evt_hyper = Html('a', eventtype, href=url, title=eventtype) evt_hyper = Html('a', eventtype, href=url, title=eventtype)
if not self.noid and gid: if not self.noid and gid:
evt_hyper += Html('span', ' [%s] ' % gid, class_ = "grampsid", evt_hyper += Html("span", " [%s] " % gid, class_ = "grampsid",
inline = True) inline = True)
# return event hyper link to its callers # return event hyper link to its callers
@ -673,7 +673,7 @@ class BasePage(object):
# begin hyperlink # begin hyperlink
hyper = Html('a', html_escape(name), href=url, title=html_escape(name)) hyper = Html('a', html_escape(name), href=url, title=html_escape(name))
if not self.noid and gid: if not self.noid and gid:
hyper += Html('span', '[%s]' % gid, class_ = "grampsid", inline = True) hyper += Html("span", '[%s]' % gid, class_ = "grampsid", inline = True)
# return hyperlink to its callers # return hyperlink to its callers
return hyper return hyper
@ -905,7 +905,7 @@ class BasePage(object):
home_person_url, home_person_name) home_person_url, home_person_name)
# creation date # creation date
footer += Html('p', msg, id='createdate') footer += Html("p", msg, id='createdate')
# get copyright license for all pages # get copyright license for all pages
copy_nr = self.report.copyright copy_nr = self.report.copyright
@ -922,7 +922,7 @@ class BasePage(object):
fname = "/".join(["images", "somerights20.gif"]) fname = "/".join(["images", "somerights20.gif"])
url = self.report.build_url_fname(fname, None, self.up) url = self.report.build_url_fname(fname, None, self.up)
text = _CC[copy_nr] % {'gif_fname' : url} text = _CC[copy_nr] % {'gif_fname' : url}
footer += Html('p', text, id='copyright') footer += Html("p", text, id='copyright')
# return footer to its callers # return footer to its callers
return footer return footer
@ -1355,13 +1355,12 @@ class BasePage(object):
# Note. 'path' already has a filename extension # Note. 'path' already has a filename extension
url = self.report.build_url_fname(path, None, self.up) url = self.report.build_url_fname(path, None, self.up)
list += self.person_link(url, name, None, gid) list += self.person_link(url, name, None, gid=gid)
# return references division to its caller # return references division to its caller
return section return section
def person_link(self, url, person, name_style, first=True, gid=None, def person_link(self, url, person, name_style, first=True, gid=None, thumbnailUrl=None):
thumbnailUrl=None):
""" """
creates a hyperlink for a person creates a hyperlink for a person
@ -1389,7 +1388,7 @@ class BasePage(object):
# 2. insert thumbnail if there is one, otherwise insert class = "noThumb" # 2. insert thumbnail if there is one, otherwise insert class = "noThumb"
if thumbnailUrl: if thumbnailUrl:
hyper += (Html('span', class_ = "thumbnail") + hyper += (Html("span", class_ = "thumbnail") +
Html('img', src= thumbnailUrl, alt = "Image of " + person_name) Html('img', src= thumbnailUrl, alt = "Image of " + person_name)
) )
else: else:
@ -1400,7 +1399,7 @@ class BasePage(object):
# 3. insert gramps id if requested and available # 3. insert gramps id if requested and available
if not self.noid and gid: if not self.noid and gid:
hyper += Html('span', " [%s]" % gid, class_ = "grampsid", inline = True) hyper += Html("span", " [%s]" % gid, class_ = "grampsid", inline = True)
else: else:
hyper = " " hyper = " "
@ -1418,7 +1417,7 @@ class BasePage(object):
# begin hyperlink # begin hyperlink
hyper = (Html('a', href=url, title=name) + hyper = (Html('a', href=url, title=name) +
Html('img', src=img_url, alt=name) + Html('img', src=img_url, alt=name) +
(Html('p', inline = True) + (Html("p", inline = True) +
html_escape(name) if usedescr else '') html_escape(name) if usedescr else '')
) )
# add hyperlink and description to thumbnail division # add hyperlink and description to thumbnail division
@ -1439,7 +1438,7 @@ class BasePage(object):
url = self.report.build_url_image('document.png', 'images', up) url = self.report.build_url_image('document.png', 'images', up)
hyper += Html('img', src=url, alt=html_escape(name)) hyper += Html('img', src=url, alt=html_escape(name))
if usedescr: if usedescr:
descr = Html('p', html_escape(name), inline = True) descr = Html("p", html_escape(name), inline = True)
else: else:
descr = '' descr = ''
@ -1455,7 +1454,7 @@ class BasePage(object):
# begin hyperlink # begin hyperlink
hyper = Html('a', html_escape(name), href=url, title=name) hyper = Html('a', html_escape(name), href=url, title=name)
if not self.noid and gid: if not self.noid and gid:
hyper += Html('span', '[%s]' % gid, class_ = "grampsid", inline = True) hyper += Html("span", '[%s]' % gid, class_ = "grampsid", inline = True)
# return hyperlink to its callers # return hyperlink to its callers
return hyper return hyper
@ -1465,7 +1464,7 @@ class BasePage(object):
hyper = Html('a', html_escape(name), href=url, title=name) hyper = Html('a', html_escape(name), href=url, title=name)
if not self.noid and gid: if not self.noid and gid:
hyper += Html('span', ' [%s] ' % gid, class_ = "grampsid", inline = True) hyper += Html("span", " [%s] " % gid, class_ = "grampsid", inline = True)
# return hyperlink to its callers # return hyperlink to its callers
return hyper return hyper
@ -1516,7 +1515,7 @@ class IndividualListPage(BasePage):
msg = _("This page contains an index of all the individuals in the " msg = _("This page contains an index of all the individuals in the "
"database, sorted by their last names. Selecting the person’s " "database, sorted by their last names. Selecting the person’s "
"name will take you to that person’s individual page.") "name will take you to that person’s individual page.")
individuallist += Html('p', msg, id='description') individuallist += Html("p", msg, id='description')
# add alphabet navigation # add alphabet navigation
alpha_nav = alphabet_navigation(db, person_handle_list, _PERSON) alpha_nav = alphabet_navigation(db, person_handle_list, _PERSON)
@ -1532,28 +1531,23 @@ class IndividualListPage(BasePage):
trow = Html("tr") trow = Html("tr")
thead += trow thead += trow
# Table Header -- Surname and Given name columns # show surname and first name
tcell1 = Html("th", _('Surname'), class_ = "ColumnSurname", inline = True) tcell1 = Html("th", _("Surname"), class_ = "ColumnSurname", inline = True)
tcell2 = Html("th", _('Name'), class_ = "ColumnName", inline = True) tcell2 = Html("th", _("Name"), class_ = "ColumnName", inline = True)
trow += (tcell1, tcell2) trow += (tcell1, tcell2)
# table header -- show birth column
if showbirth: if showbirth:
trow += Html("th", _('Birth'), class_ = "ColumnBirth", inline = True) trow += Html("th", _("Birth"), class_ = "ColumnBirth", inline = True)
# table header -- show death column
if showdeath: if showdeath:
trow += Html("th", _('Death'), class_ = "ColumnDeath", inline = True) trow += Html("th", _("Death"), class_ = "ColumnDeath", inline = True)
# table header -- show partmer column
if showpartner: if showpartner:
trow += Html("th", _('Partner'), class_ = "ColumnPartner", inline = True) trow += Html("th", _("Partner"), class_ = "ColumnPartner", inline = True)
# table header -- show parents column
if showparents: if showparents:
trow += Html("th", _('Parents'), class_ = "ColumnParents", inline = True) trow += Html("th", _("Parents"), class_ = "ColumnParents", inline = True)
# begin table body
tbody = Html("tbody") tbody = Html("tbody")
table += tbody table += tbody
@ -1570,10 +1564,10 @@ class IndividualListPage(BasePage):
tcell = Html("td", class_ = "ColumnSurname", inline = True) tcell = Html("td", class_ = "ColumnSurname", inline = True)
trow += tcell trow += tcell
if first: if first:
trow.attr = 'class="BeginSurname"' trow.attr = 'class="BeginSurname" '
if surname: if surname:
tcell += Html('a', surname, name=letter, tcell += Html("a", surname, name = letter,
title='Surnames starting with letter %s' % letter) title = "Letter %s" % letter)
else: else:
tcell += " " tcell += " "
else: else:
@ -1584,7 +1578,7 @@ class IndividualListPage(BasePage):
tcell = Html("td", class_ = "ColumnName") tcell = Html("td", class_ = "ColumnName")
trow += tcell trow += tcell
url = self.report.build_url_fname_html(person.handle, 'ppl') url = self.report.build_url_fname_html(person.handle, 'ppl')
tcell += self.person_link(url, person, False, person.gramps_id) tcell += self.person_link(url, person, False, gid=person.gramps_id)
# birth column # birth column
if showbirth: if showbirth:
@ -1632,10 +1626,12 @@ class IndividualListPage(BasePage):
partner = db.get_person_from_handle(partner_handle) partner = db.get_person_from_handle(partner_handle)
partner_name = self.get_name(partner) partner_name = self.get_name(partner)
if not first_family: if not first_family:
tcell += ', ' tcell += ", "
if partner_handle in report_handle_list: if partner_handle in report_handle_list:
url = self.report.build_url_fname_html(partner_handle, 'ppl') url = self.report.build_url_fname_html(
tcell += self.person_link(url, partner, True, partner.gramps_id) partner_handle, 'ppl')
tcell += self.person_link(url, partner, True,
gid=partner.gramps_id)
else: else:
tcell += partner_name tcell += partner_name
first_family = False first_family = False
@ -1662,13 +1658,14 @@ class IndividualListPage(BasePage):
if mother: if mother:
mother_name = self.get_name(mother) mother_name = self.get_name(mother)
if mother and father: if mother and father:
fathercell = Html('span', father_name, class_ = "father fatherNmother") fathercell = Html("span", father_name,
mothercell = Html('span', mother_name, class_ = "mother") class_ = "father fatherNmother")
mothercell = Html("span", mother_name, class_ = "mother")
tcell += (fathercell, mothercell) tcell += (fathercell, mothercell)
elif mother: elif mother:
tcell += Html('span', mother_name, class_ = "mother") tcell += Html("span", mother_name, class_ = "mother")
elif father: elif father:
tcell += Html('span', father_name, class_ = "father") tcell += Html("span", father_name, class_ = "father")
else: else:
tcell += " " tcell += " "
@ -1707,7 +1704,7 @@ class SurnamePage(BasePage):
msg = _("This page contains an index of all the individuals in the " msg = _("This page contains an index of all the individuals in the "
"database with the surname of %s. Selecting the person’s name " "database with the surname of %s. Selecting the person’s name "
"will take you to that person’s individual page.") % surname "will take you to that person’s individual page.") % surname
surnamedetail += Html('p', msg, id='description') surnamedetail += Html("p", msg, id='description')
# begin surname table and thead # begin surname table and thead
with Html("table", class_ = "infolist surname") as surname_table: with Html("table", class_ = "infolist surname") as surname_table:
@ -1743,7 +1740,7 @@ class SurnamePage(BasePage):
trow = Html("tr") trow = Html("tr")
tcell = Html("td", class_ = "ColumnName") tcell = Html("td", class_ = "ColumnName")
url = self.report.build_url_fname_html(person.handle, 'ppl', True) url = self.report.build_url_fname_html(person.handle, 'ppl', True)
tcell += self.person_link(url, person, False, person.gramps_id) tcell += self.person_link(url, person, False, gid=person.gramps_id)
trow += tcell trow += tcell
# birth column # birth column
@ -1789,8 +1786,10 @@ class SurnamePage(BasePage):
if not first_family: if not first_family:
tcell += ',' tcell += ','
if partner_handle in report_handle_list: if partner_handle in report_handle_list:
url = self.report.build_url_fname_html(partner_handle, 'ppl', True) url = self.report.build_url_fname_html(
tcell += self.person_link(url, partner, True, partner.gramps_id) partner_handle, 'ppl', True)
tcell += self.person_link(url, partner, True,
gid=partner.gramps_id)
else: else:
tcell += partner_name tcell += partner_name
else: else:
@ -1815,14 +1814,14 @@ class SurnamePage(BasePage):
if mother: if mother:
mother_name = self.get_name(mother) mother_name = self.get_name(mother)
if mother and father: if mother and father:
tcell += Html('span', father_name, tcell += Html("span", father_name,
class_ = "father fatherNmother") + ( class_ = "father fatherNmother") + (
Html('span', mother_name, class_ = "mother") Html("span", mother_name, class_ = "mother")
) )
elif mother: elif mother:
tcell += Html('span', mother_name, class_ = "mother") tcell += Html("span", mother_name, class_ = "mother")
elif father: elif father:
tcell += Html('span', father_name, class_ = "father") tcell += Html("span", father_name, class_ = "father")
else: else:
tcell += " " tcell += " "
trow += tcell trow += tcell
@ -1855,7 +1854,7 @@ class PlaceListPage(BasePage):
msg = _("This page contains an index of all the places in the " msg = _("This page contains an index of all the places in the "
"database, sorted by their title. Clicking on a place’s " "database, sorted by their title. Clicking on a place’s "
"title will take you to that place’s page.") "title will take you to that place’s page.")
placelist += Html('p', msg, id='description') placelist += Html("p", msg, id='description')
# begin alphabet navigation # begin alphabet navigation
alpha_nav = alphabet_navigation(db, place_handles, _PLACE) alpha_nav = alphabet_navigation(db, place_handles, _PLACE)
@ -2094,7 +2093,7 @@ class EventListPage(BasePage):
# get person's hyperlink # get person's hyperlink
url = self.report.build_url_fname_html(person.handle, 'ppl', subdirs) url = self.report.build_url_fname_html(person.handle, 'ppl', subdirs)
person_hyper = self.person_link(url, person, True, first) person_hyper = self.person_link(url, person, True, first, gid=person.gramps_id)
# begin table row # begin table row
trow = Html("tr") trow = Html("tr")
@ -2127,7 +2126,7 @@ class EventListPage(BasePage):
# get partner hyperlink # get partner hyperlink
url = self.report.build_url_fname_html(partner.handle, 'ppl', subdirs) url = self.report.build_url_fname_html(partner.handle, 'ppl', subdirs)
partner_hyper = self.person_link(url, partner, True) partner_hyper = self.person_link(url, partner, True, gid=partner.gramps_id)
trow += Html("td", partner_hyper, class_ = "ColumnPartner") trow += Html("td", partner_hyper, class_ = "ColumnPartner")
# return EventList row to its caller # return EventList row to its caller
@ -2333,13 +2332,13 @@ class MediaPage(BasePage):
data = _('<strong id="GalleryCurrent">%(page_number)d</strong> of ' data = _('<strong id="GalleryCurrent">%(page_number)d</strong> of '
'<strong id="GalleryTotal">%(total_pages)d</strong>' ) % { '<strong id="GalleryTotal">%(total_pages)d</strong>' ) % {
'page_number' : page_number, 'total_pages' : total_pages } 'page_number' : page_number, 'total_pages' : total_pages }
gallerynav += Html('span', data, id='GalleryPages') gallerynav += Html("span", data, id='GalleryPages')
if next: if next:
gallerynav += self.gallery_nav_link(next, _('Next'), True) gallerynav += self.gallery_nav_link(next, _('Next'), True)
# missing media error msg # missing media error msg
errormsg = _('The file has been moved or deleted.') errormsg = _('The file has been moved or deleted.')
missingimage = Html('span', errormsg, class_ = "MissingImage") missingimage = Html("span", errormsg, class_ = "MissingImage")
# begin summaryarea division # begin summaryarea division
summaryarea = Html("div", id='summaryarea') summaryarea = Html("div", id='summaryarea')
@ -2388,7 +2387,7 @@ class MediaPage(BasePage):
# TODO. Convert disk path to URL. # TODO. Convert disk path to URL.
url = self.report.build_url_fname(initial_image_path, None, self.up) url = self.report.build_url_fname(initial_image_path, None, self.up)
if initial_image_path != newpath: if initial_image_path != newpath:
scalemsg = Html('p', '(%d x %d).' % (width, height), inline = True) scalemsg = Html("p", '(%d x %d).' % (width, height), inline = True)
summaryarea += scalemsg summaryarea += scalemsg
mediadisplay = Html("div", style='width:%dpx; height:%dpx;' % (new_width, new_height)) mediadisplay = Html("div", style='width:%dpx; height:%dpx;' % (new_width, new_height))
summaryarea += mediadisplay summaryarea += mediadisplay
@ -2637,7 +2636,7 @@ class SurnameListPage(BasePage):
'surnames in the database. Selecting a link ' 'surnames in the database. Selecting a link '
'will lead to a list of individuals in the ' 'will lead to a list of individuals in the '
'database with this same surname.') 'database with this same surname.')
surnamelist += Html('p', msg, id='description') surnamelist += Html("p", msg, id='description')
# add alphabet navigation... # add alphabet navigation...
# only if surname list not surname count # only if surname list not surname count
@ -2825,11 +2824,11 @@ class SourceListPage(BasePage):
source_dict = {} source_dict = {}
of = self.report.create_file("sources") of = self.report.create_file("sources")
sourcelistpage, body = self.write_header(_('Sources')) sourcelistpage, body = self.write_header(_("Sources"))
# begin source list division # begin source list division
with Html("div", class_ = "content", id="sources") as section: with Html("div", class_ = "content", id="Sources") as sourceslist:
body += section body += sourceslist
# Sort the sources # Sort the sources
for handle in handle_list: for handle in handle_list:
@ -2842,14 +2841,14 @@ class SourceListPage(BasePage):
msg = _("This page contains an index of all the sources in the " msg = _("This page contains an index of all the sources in the "
"database, sorted by their title. Clicking on a source&#8217;s " "database, sorted by their title. Clicking on a source&#8217;s "
"title will take you to that source&#8217;s page.") "title will take you to that source&#8217;s page.")
section += Html('p', msg, id='description') sourceslist += Html("p", msg, id='description')
# begin sourcelist table and table head # begin sourcelist table and table head
with Html("table", class_ = "infolist sourcelist") as table: with Html("table", class_ = "infolist sourcelist") as table:
section += table sourceslist += table
thead = Html("thead") thead = Html("thead")
table += thead table += thead
trow = Html("tr") trow = Html("tr")
thead += trow thead += trow
@ -2973,7 +2972,7 @@ class MediaListPage(BasePage):
"the title will take you to that media object&#8217;s page. " "the title will take you to that media object&#8217;s page. "
"If you see media size densions above an image, click on the " "If you see media size densions above an image, click on the "
"image to see the full sized version. ") "image to see the full sized version. ")
section += Html('p', msg, id='description') section += Html("p", msg, id='description')
# begin gallery table and table head # begin gallery table and table head
with Html("table", class_ = "infolist gallerylist") as table: with Html("table", class_ = "infolist gallerylist") as table:
@ -3082,7 +3081,7 @@ class DownloadPage(BasePage):
if downloadnote: if downloadnote:
note = db.get_note_from_gramps_id(downloadnote) note = db.get_note_from_gramps_id(downloadnote)
note_text = self.get_note_format(note) note_text = self.get_note_format(note)
download += Html('p', note_text, id="description") download += Html("p", note_text, id="description")
# begin download table # begin download table
with Html("table", class_ = "infolist download") as table: with Html("table", class_ = "infolist download") as table:
@ -3226,17 +3225,17 @@ class ContactPage(BasePage):
r.name = r.name.replace(',,,', '') r.name = r.name.replace(',,,', '')
researcher += Html('h3', r.name, inline = True) researcher += Html('h3', r.name, inline = True)
if r.addr: if r.addr:
researcher += Html('span', r.addr, id='streetaddress') researcher += Html("span", r.addr, id='streetaddress')
text = "".join([r.city, r.state, r.postal]) text = "".join([r.city, r.state, r.postal])
if text: if text:
city = Html('span', r.city, id='city', inline = True) city = Html("span", r.city, id='city', inline = True)
state = Html('span', r.state, id='state', inline = True) state = Html("span", r.state, id='state', inline = True)
postal = Html('span', r.postal, id='postalcode', inline = True) postal = Html("span", r.postal, id='postalcode', inline = True)
researcher += (city, state, postal) researcher += (city, state, postal)
if r.country: if r.country:
researcher += Html('span', r.country, id='country', inline = True) researcher += Html("span", r.country, id='country', inline = True)
if r.email: if r.email:
researcher += Html('span', id='email') + ( researcher += Html("span", id='email') + (
Html('a', r.email, href='mailto:%s?subject="from GRAMPS Web Site"' Html('a', r.email, href='mailto:%s?subject="from GRAMPS Web Site"'
% r.email, inline = True) % r.email, inline = True)
) )
@ -3425,7 +3424,7 @@ class IndividualPage(BasePage):
boxbg += self.person_link(url, person, name_style=True, boxbg += self.person_link(url, person, name_style=True,
thumbnailUrl=thumbnailUrl) thumbnailUrl=thumbnailUrl)
else: else:
boxbg += Html('span', person_name, class_ = "unlinked", inline = True) boxbg += Html("span", person_name, class_ = "unlinked", inline = True)
shadow = Html("div", class_ = "shadow", inline = True, style="top: %dpx; left: %dpx;" shadow = Html("div", class_ = "shadow", inline = True, style="top: %dpx; left: %dpx;"
% (top+_SHADOW, xoff+_SHADOW) ) % (top+_SHADOW, xoff+_SHADOW) )
@ -3883,7 +3882,7 @@ class IndividualPage(BasePage):
list = Html('li') list = Html('li')
if child_handle in self.ind_list: if child_handle in self.ind_list:
url = self.report.build_url_fname_html(child_handle, 'ppl', True) url = self.report.build_url_fname_html(child_handle, 'ppl', True)
list += self.person_link(url, child, True, gid) list += self.person_link(url, child, True, gid=gid)
else: else:
list += self.get_name(child) list += self.get_name(child)
@ -3904,7 +3903,7 @@ class IndividualPage(BasePage):
gid = person.gramps_id gid = person.gramps_id
if handle in self.ind_list: if handle in self.ind_list:
url = self.report.build_url_fname_html(handle, 'ppl', True) url = self.report.build_url_fname_html(handle, 'ppl', True)
tcell2 += self.person_link(url, person, True, gid) tcell2 += self.person_link(url, person, True, gid=gid)
else: else:
person_name = self.get_name(person) person_name = self.get_name(person)
tcell2 += person_name tcell2 += person_name
@ -4259,7 +4258,7 @@ class IndividualPage(BasePage):
if partner_handle: if partner_handle:
if partner_handle in self.ind_list: if partner_handle in self.ind_list:
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, True, partner.gramps_id) tcell += self.person_link(url, partner, True, gid=partner.gramps_id)
else: else:
tcell += partner_name tcell += partner_name
@ -4416,7 +4415,7 @@ class RepositoryListPage(BasePage):
msg = _("This page contains an index of all the repositories in the " msg = _("This page contains an index of all the repositories in the "
"database, sorted by their title. Clicking on a repositories&#8217;s " "database, sorted by their title. Clicking on a repositories&#8217;s "
"title will take you to that repositories&#8217;s page.") "title will take you to that repositories&#8217;s page.")
repositorylist += Html('p', msg, id='description') repositorylist += Html("p", msg, id='description')
# begin repositories table and table head # begin repositories table and table head
with Html("table", class_ = "infolist repolist") as table: with Html("table", class_ = "infolist repolist") as table: