Fixed a lot of string items, whereas href=; it becomes href = as an example. This was talked about a while back, and Brian or Benny made the point to code like this.
svn: r13432
This commit is contained in:
parent
7fe80cc10b
commit
77da65bc71
@ -276,7 +276,7 @@ class BasePage(object):
|
||||
This is the base class to write certain HTML pages.
|
||||
"""
|
||||
|
||||
def __init__(self, report, title, gid=None):
|
||||
def __init__(self, report, title, gid = None):
|
||||
"""
|
||||
report - instance of NavWebReport
|
||||
title - text for the <title> tag
|
||||
@ -366,7 +366,7 @@ class BasePage(object):
|
||||
for ref in gid_list:
|
||||
index, key = self.bibli.add_reference(ref)
|
||||
id_ = "%d%s" % (index+1, key)
|
||||
text = text + '<a href="#sref%s">%s</a>' % (id_, id_)
|
||||
text = text + '<a href = "#sref%s">%s</a>' % (id_, id_)
|
||||
text = text + "</sup>"
|
||||
|
||||
# return citation list text to its callers
|
||||
@ -501,7 +501,7 @@ class BasePage(object):
|
||||
# return events table row to its callers
|
||||
return trow
|
||||
|
||||
def event_link(self, eventtype, handle, gid=None, up=False):
|
||||
def event_link(self, eventtype, handle, gid = None, up=False):
|
||||
""" createsa hyperlink for an event based on its type """
|
||||
|
||||
url = self.report.build_url_fname_html(handle, 'evt', up)
|
||||
@ -509,7 +509,7 @@ class BasePage(object):
|
||||
|
||||
# if event pages are being created, then hyperlink the event type
|
||||
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:
|
||||
evt_hyper += Html("span", " [%s] " % gid, class_ = "grampsid",
|
||||
inline = True)
|
||||
@ -521,7 +521,7 @@ class BasePage(object):
|
||||
else:
|
||||
return eventtype
|
||||
|
||||
def get_event_data(self, evt, evt_ref, showplc, showdescr, showsrc, shownote, subdirs, hyp, gid=None):
|
||||
def get_event_data(self, evt, evt_ref, showplc, showdescr, showsrc, shownote, subdirs, hyp, gid = None):
|
||||
"""
|
||||
retrieve event data from event and evt_ref
|
||||
|
||||
@ -667,7 +667,7 @@ class BasePage(object):
|
||||
# return table to its callers
|
||||
return table
|
||||
|
||||
def source_link(self, handle, hyper_name, name, gid=None, up=False):
|
||||
def source_link(self, handle, hyper_name, name, gid = None, up=False):
|
||||
|
||||
url = self.report.build_url_fname_html(handle, 'src', up)
|
||||
|
||||
@ -886,14 +886,14 @@ class BasePage(object):
|
||||
note = db.get_note_from_gramps_id(footer_note)
|
||||
note_text = self.get_note_format(note)
|
||||
|
||||
user_footer = Html("div", id='user_footer')
|
||||
user_footer = Html("div", id = 'user_footer')
|
||||
footer += user_footer
|
||||
|
||||
# attach note
|
||||
user_footer += note_text
|
||||
|
||||
value = _dd.display(date.Today())
|
||||
msg = _('Generated by <a href="%(homepage)s">'
|
||||
msg = _('Generated by <a href = "%(homepage)s">'
|
||||
'GRAMPS</a> on %(date)s') % {
|
||||
'date': value, 'homepage' : const.URL_HOMEPAGE
|
||||
}
|
||||
@ -908,11 +908,11 @@ class BasePage(object):
|
||||
self.up)
|
||||
|
||||
home_person_name = self.get_name(home_person)
|
||||
msg += _(' Created for <a href="%s">%s</a>') % (
|
||||
msg += _(' Created for <a href = "%s">%s</a>') % (
|
||||
home_person_url, home_person_name)
|
||||
|
||||
# creation date
|
||||
footer += Html("p", msg, id='createdate')
|
||||
footer += Html("p", msg, id = 'createdate')
|
||||
|
||||
# get copyright license for all pages
|
||||
copy_nr = self.report.copyright
|
||||
@ -929,7 +929,7 @@ class BasePage(object):
|
||||
fname = "/".join(["images", "somerights20.gif"])
|
||||
url = self.report.build_url_fname(fname, None, self.up)
|
||||
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
|
||||
@ -982,10 +982,10 @@ class BasePage(object):
|
||||
url5 = self.report.build_url_image('favicon.ico', 'images', self.up)
|
||||
|
||||
# create stylesheet and favicon links
|
||||
links = [Html("link", href=url5, type="image/x-icon", rel="shortcut icon"),
|
||||
Html("link", href=url1, type="text/css", media="screen", rel="stylesheet"),
|
||||
Html("link", href=url3, type="text/css", media="screen", rel="stylesheet"),
|
||||
Html("link", href=url4, type="text/css", media='print', rel="stylesheet")
|
||||
links = [Html("link", href = url5, type = "image/x-icon", rel = "shortcut icon"),
|
||||
Html("link", href = url1, type = "text/css", media = "screen", rel = "stylesheet"),
|
||||
Html("link", href = url3, type = "text/css", media = "screen", rel = "stylesheet"),
|
||||
Html("link", href = url4, type = "text/css", media = 'print', rel = "stylesheet")
|
||||
]
|
||||
|
||||
# add additional meta and link tags
|
||||
@ -993,8 +993,8 @@ class BasePage(object):
|
||||
head += links
|
||||
|
||||
# begin header section
|
||||
headerdiv = (Html("div", id='header') +
|
||||
Html('h1', html_escape(self.title_str), id='SiteTitle', inline = True)
|
||||
headerdiv = (Html("div", id = 'header') +
|
||||
Html('h1', html_escape(self.title_str), id = 'SiteTitle', inline = True)
|
||||
)
|
||||
body += headerdiv
|
||||
|
||||
@ -1003,7 +1003,7 @@ class BasePage(object):
|
||||
note = db.get_note_from_gramps_id(header_note)
|
||||
note_text = self.get_note_format(note)
|
||||
|
||||
user_header = Html("div", id='user_header')
|
||||
user_header = Html("div", id = 'user_header')
|
||||
headerdiv += user_header
|
||||
|
||||
# attach note
|
||||
@ -1042,7 +1042,7 @@ class BasePage(object):
|
||||
('repositories', _("Repositories"), inc_repos),
|
||||
]
|
||||
|
||||
navigation = Html("div", id='navigation')
|
||||
navigation = Html("div", id = 'navigation')
|
||||
ul = Html('ul')
|
||||
|
||||
navs = ((u, n) for u, n, c in navs if c)
|
||||
@ -1085,7 +1085,7 @@ class BasePage(object):
|
||||
|
||||
cs = cs and 'class="CurrentSection"' or ''
|
||||
ul += (Html("li", attr = cs, inline = True) +
|
||||
Html("a", nav_text, href=url)
|
||||
Html("a", nav_text, href = url)
|
||||
)
|
||||
|
||||
navigation += ul
|
||||
@ -1254,15 +1254,15 @@ class BasePage(object):
|
||||
if not descr:
|
||||
descr = uri
|
||||
if url.get_type() == UrlType.EMAIL and not uri.startswith("mailto:"):
|
||||
ordered += Html("li") + Html("a",descr, href='mailto:%s' % url)
|
||||
ordered += Html("li") + Html("a",descr, href = 'mailto:%s' % url)
|
||||
|
||||
elif url.get_type() == UrlType.WEB_HOME and not uri.startswith("http://"):
|
||||
ordered += Html("li") + Html("a", descr, href='http://%s' % url)
|
||||
ordered += Html("li") + Html("a", descr, href = 'http://%s' % url)
|
||||
|
||||
elif url.get_type() == UrlType.WEB_FTP and not uri.startswith("ftp://"):
|
||||
ordered += Html("li") + Html("a", descr, href='ftp://%s' % url)
|
||||
ordered += Html("li") + Html("a", descr, href = 'ftp://%s' % url)
|
||||
else:
|
||||
ordered += Html("li") + Html("a", descr, href=url)
|
||||
ordered += Html("li") + Html("a", descr, href = url)
|
||||
|
||||
# return web links to its caller
|
||||
return section
|
||||
@ -1348,12 +1348,12 @@ class BasePage(object):
|
||||
|
||||
# Note. 'path' already has a filename extension
|
||||
url = self.report.build_url_fname(path, None, self.up)
|
||||
list += self.person_link(url, name, None, gid=gid)
|
||||
list += self.person_link(url, name, None, gid = gid)
|
||||
|
||||
# return references division to its caller
|
||||
return section
|
||||
|
||||
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):
|
||||
"""
|
||||
creates a hyperlink for a person
|
||||
|
||||
@ -1377,7 +1377,7 @@ class BasePage(object):
|
||||
person_name = person
|
||||
|
||||
# 1. start building link to image or person
|
||||
hyper = Html("a", href=url)
|
||||
hyper = Html("a", href = url)
|
||||
|
||||
# 2. insert thumbnail if there is one, otherwise insert class = "noThumb"
|
||||
if thumbnailUrl:
|
||||
@ -1408,7 +1408,7 @@ class BasePage(object):
|
||||
with Html("div", class_ = "thumbnail") as thumbnail:
|
||||
|
||||
# begin hyperlink
|
||||
hyper = (Html("a", href=url, title=name) +
|
||||
hyper = (Html("a", href = url, title=name) +
|
||||
Html('img', src=img_url, alt=name) )
|
||||
thumbnail += hyper
|
||||
|
||||
@ -1438,21 +1438,21 @@ class BasePage(object):
|
||||
# return thumbnail division to its callers
|
||||
return thumbnail
|
||||
|
||||
def repository_link(self, handle, name, cindex, gid=None, up=False):
|
||||
def repository_link(self, handle, name, cindex, gid = None, up=False):
|
||||
|
||||
url = self.report.build_url_fname_html(handle, 'repo', up)
|
||||
# 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:
|
||||
hyper += Html("span", '[%s]' % gid, class_ = "grampsid", inline = True)
|
||||
|
||||
# return hyperlink to its callers
|
||||
return hyper
|
||||
|
||||
def place_link(self, handle, name, gid=None, up=False):
|
||||
def place_link(self, handle, name, gid = None, up=False):
|
||||
url = self.report.build_url_fname_html(handle, 'plc', up)
|
||||
|
||||
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:
|
||||
hyper += Html("span", " [%s] " % gid, class_ = "grampsid", inline = True)
|
||||
|
||||
@ -1505,7 +1505,7 @@ class IndividualListPage(BasePage):
|
||||
msg = _("This page contains an index of all the individuals in the "
|
||||
"database, sorted by their last names. Selecting the person’s "
|
||||
"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
|
||||
alpha_nav = alphabet_navigation(db, person_handle_list, _PERSON)
|
||||
@ -1568,7 +1568,7 @@ class IndividualListPage(BasePage):
|
||||
tcell = Html("td", class_ = "ColumnName")
|
||||
trow += tcell
|
||||
url = self.report.build_url_fname_html(person.handle, 'ppl')
|
||||
tcell += self.person_link(url, person, False, gid=person.gramps_id)
|
||||
tcell += self.person_link(url, person, False, gid = person.gramps_id)
|
||||
|
||||
# birth column
|
||||
if showbirth:
|
||||
@ -1621,7 +1621,7 @@ class IndividualListPage(BasePage):
|
||||
url = self.report.build_url_fname_html(
|
||||
partner_handle, 'ppl')
|
||||
tcell += self.person_link(url, partner, True,
|
||||
gid=partner.gramps_id)
|
||||
gid = partner.gramps_id)
|
||||
else:
|
||||
tcell += partner_name
|
||||
first_family = False
|
||||
@ -1694,7 +1694,7 @@ class SurnamePage(BasePage):
|
||||
msg = _("This page contains an index of all the individuals in the "
|
||||
"database with the surname of %s. Selecting the person’s name "
|
||||
"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
|
||||
with Html("table", class_ = "infolist surname") as surname_table:
|
||||
@ -1730,7 +1730,7 @@ class SurnamePage(BasePage):
|
||||
trow = Html("tr")
|
||||
tcell = Html("td", class_ = "ColumnName")
|
||||
url = self.report.build_url_fname_html(person.handle, 'ppl', True)
|
||||
tcell += self.person_link(url, person, False, gid=person.gramps_id)
|
||||
tcell += self.person_link(url, person, False, gid = person.gramps_id)
|
||||
trow += tcell
|
||||
|
||||
# birth column
|
||||
@ -1779,7 +1779,7 @@ class SurnamePage(BasePage):
|
||||
url = self.report.build_url_fname_html(
|
||||
partner_handle, 'ppl', True)
|
||||
tcell += self.person_link(url, partner, True,
|
||||
gid=partner.gramps_id)
|
||||
gid = partner.gramps_id)
|
||||
else:
|
||||
tcell += partner_name
|
||||
else:
|
||||
@ -1844,7 +1844,7 @@ class PlaceListPage(BasePage):
|
||||
msg = _("This page contains an index of all the places in the "
|
||||
"database, sorted by their title. Clicking on a place’s "
|
||||
"title will take you to that place’s page.")
|
||||
placelist += Html("p", msg, id='description')
|
||||
placelist += Html("p", msg, id = 'description')
|
||||
|
||||
# begin alphabet navigation
|
||||
alpha_nav = alphabet_navigation(db, place_handles, _PLACE)
|
||||
@ -1935,7 +1935,7 @@ class PlacePage(BasePage):
|
||||
placedetail += Html('h3', html_escape(self.page_title.strip()))
|
||||
|
||||
# begin summaryarea division and places table
|
||||
with Html("div", id='summaryarea') as summaryarea:
|
||||
with Html("div", id = 'summaryarea') as summaryarea:
|
||||
placedetail += summaryarea
|
||||
|
||||
with Html("table", class_ = "infolist place") as table:
|
||||
@ -2083,7 +2083,7 @@ class EventListPage(BasePage):
|
||||
|
||||
# get person's hyperlink
|
||||
url = self.report.build_url_fname_html(person.handle, 'ppl', subdirs)
|
||||
person_hyper = self.person_link(url, person, True, first, gid=person.gramps_id)
|
||||
person_hyper = self.person_link(url, person, True, first, gid = person.gramps_id)
|
||||
|
||||
# begin table row
|
||||
trow = Html("tr")
|
||||
@ -2116,7 +2116,7 @@ class EventListPage(BasePage):
|
||||
|
||||
# get partner hyperlink
|
||||
url = self.report.build_url_fname_html(partner.handle, 'ppl', subdirs)
|
||||
partner_hyper = self.person_link(url, partner, True, gid=partner.gramps_id)
|
||||
partner_hyper = self.person_link(url, partner, True, gid = partner.gramps_id)
|
||||
trow += Html("td", partner_hyper, class_ = "ColumnPartner")
|
||||
|
||||
# return EventList row to its caller
|
||||
@ -2180,7 +2180,7 @@ class EventPage(BasePage):
|
||||
|
||||
# get person hyperlink
|
||||
url = self.report.build_url_fname_html(person.handle, 'ppl', self.up)
|
||||
person_hyper = self.person_link(url, person, True, gid=person.gramps_id)
|
||||
person_hyper = self.person_link(url, person, True, gid = person.gramps_id)
|
||||
trow = Html("tr") + (
|
||||
Html("td", _('Person'), class_ = "ColumnAttribute", inline = True),
|
||||
Html("td", person_hyper, class_ = "ColumnPerson")
|
||||
@ -2190,7 +2190,7 @@ class EventPage(BasePage):
|
||||
# display partner if type is either Marriage or Divorce
|
||||
if partner is not None:
|
||||
url = self.report.build_url_fname_html(partner.handle, 'ppl', self.up)
|
||||
partner_hyper = self.person_link(url, partner, True, gid=partner.gramps_id)
|
||||
partner_hyper = self.person_link(url, partner, True, gid = partner.gramps_id)
|
||||
trow = Html("tr") + (
|
||||
Html("td", _('Partner'), class_ = "ColumnAttribute", inline = True),
|
||||
Html("td", partner_hyper, class_ = "ColumnPartner")
|
||||
@ -2315,14 +2315,14 @@ class MediaPage(BasePage):
|
||||
body += mediadetail
|
||||
|
||||
# gallery navigation
|
||||
gallerynav = Html("div", id='GalleryNav')
|
||||
gallerynav = Html("div", id = 'GalleryNav')
|
||||
mediadetail += gallerynav
|
||||
if prev:
|
||||
gallerynav += self.gallery_nav_link(prev, _('Previous'), True)
|
||||
data = _('<strong id = "GalleryCurrent">%(page_number)d</strong> of '
|
||||
'<strong id = "GalleryTotal">%(total_pages)d</strong>' ) % {
|
||||
'page_number' : page_number, 'total_pages' : total_pages }
|
||||
gallerynav += Html("span", data, id='GalleryPages')
|
||||
gallerynav += Html("span", data, id = 'GalleryPages')
|
||||
if next:
|
||||
gallerynav += self.gallery_nav_link(next, _('Next'), True)
|
||||
|
||||
@ -2331,12 +2331,12 @@ class MediaPage(BasePage):
|
||||
missingimage = Html("span", errormsg, class_ = "MissingImage")
|
||||
|
||||
# begin summaryarea division
|
||||
summaryarea = Html("div", id='summaryarea')
|
||||
summaryarea = Html("div", id = 'summaryarea')
|
||||
mediadetail += summaryarea
|
||||
if mime_type:
|
||||
if mime_type.startswith("image/"):
|
||||
if not target_exists:
|
||||
mediadisplay = Html("div", id='GalleryDisplay') + \
|
||||
mediadisplay = Html("div", id = 'GalleryDisplay') + \
|
||||
missingimage
|
||||
summaryarea += mediadisplay
|
||||
else:
|
||||
@ -2392,13 +2392,13 @@ class MediaPage(BasePage):
|
||||
(name, x, y, w, h, linkurl) = _region_items.pop()
|
||||
ordered += Html("li", style='left:%d%%; top:%d%%; width:%d%%; height:%d%%;'
|
||||
% (x, y, w, h)) +(
|
||||
Html("a", name, href=linkurl)
|
||||
Html("a", name, href = linkurl)
|
||||
)
|
||||
|
||||
# display the image
|
||||
if initial_image_path != newpath:
|
||||
url = self.report.build_url_fname(newpath, None, self.up)
|
||||
mediadisplay += Html("a", href=url) + (
|
||||
mediadisplay += Html("a", href = url) + (
|
||||
Html('img', width=new_width, height=new_height, src=url,
|
||||
alt=html_escape(self.page_title))
|
||||
)
|
||||
@ -2421,12 +2421,12 @@ class MediaPage(BasePage):
|
||||
path = os.path.join('images', 'document.png')
|
||||
os.rmdir(dirname)
|
||||
|
||||
mediadisplay = Html("div", id='GalleryDisplay')
|
||||
mediadisplay = Html("div", id = 'GalleryDisplay')
|
||||
summaryarea += mediadisplay
|
||||
if target_exists:
|
||||
# TODO. Convert disk path to URL
|
||||
url = self.report.build_url_fname(newpath, None, self.up)
|
||||
hyper = Html("a", href=url)
|
||||
hyper = Html("a", href = url)
|
||||
# TODO. Mixup url and path
|
||||
# path = convert_disk_path_to_url(path)
|
||||
url = self.report.build_url_fname(path, None, self.up)
|
||||
@ -2439,7 +2439,7 @@ class MediaPage(BasePage):
|
||||
else:
|
||||
mediadisplay += missingimage
|
||||
else:
|
||||
mediadisplay = Html("div", id='GalleryDisplay')
|
||||
mediadisplay = Html("div", id = 'GalleryDisplay')
|
||||
summaryarea += mediadisplay
|
||||
url = self.report.build_url_image('document.png', 'images', self.up)
|
||||
mediadisplay += Html('img', src=url, alt=html_escape(self.page_title))
|
||||
@ -2545,7 +2545,7 @@ class MediaPage(BasePage):
|
||||
|
||||
url = self.report.build_url_fname_html(handle, 'img', up)
|
||||
name = html_escape(name)
|
||||
hyper = Html("a", name, id=name, href=url, title=name, inline = True)
|
||||
hyper = Html("a", name, id = name, href = url, title=name, inline = True)
|
||||
|
||||
# return hyperlink to its callers
|
||||
return hyper
|
||||
@ -2626,7 +2626,7 @@ class SurnameListPage(BasePage):
|
||||
'surnames in the database. Selecting a link '
|
||||
'will lead to a list of individuals in the '
|
||||
'database with this same surname.')
|
||||
surnamelist += Html("p", msg, id='description')
|
||||
surnamelist += Html("p", msg, id = 'description')
|
||||
|
||||
# add alphabet navigation...
|
||||
# only if surname list not surname count
|
||||
@ -2641,7 +2641,7 @@ class SurnameListPage(BasePage):
|
||||
table_id = 'SortByName'
|
||||
|
||||
# begin surnamelist table and table head
|
||||
with Html("table", class_ = "infolist surnamelist", id=table_id) as table:
|
||||
with Html("table", class_ = "infolist surnamelist", id = table_id) as table:
|
||||
surnamelist += table
|
||||
|
||||
thead = Html("thead")
|
||||
@ -2655,13 +2655,13 @@ class SurnameListPage(BasePage):
|
||||
fname = self.report.surname_fname + self.ext
|
||||
tcell = Html("th", class_ = "ColumnSurname", inline = True)
|
||||
trow += tcell
|
||||
hyper = Html("a", _('Surname'), href=fname)
|
||||
hyper = Html("a", _('Surname'), href = fname)
|
||||
tcell += hyper
|
||||
|
||||
fname = "surnames_count" + self.ext
|
||||
tcell = Html("th", class_ = "ColumnQuantity", inline = True)
|
||||
trow += tcell
|
||||
hyper = Html("a", _('Number of People'), href=fname)
|
||||
hyper = Html("a", _('Number of People'), href = fname)
|
||||
tcell += hyper
|
||||
|
||||
# begin table body
|
||||
@ -2723,7 +2723,7 @@ class SurnameListPage(BasePage):
|
||||
|
||||
def surname_link(self, fname, name, opt_val=None, up=False):
|
||||
url = self.report.build_url_fname_html(fname, 'srn', up)
|
||||
hyper = Html("a", name, href=url, title=name)
|
||||
hyper = Html("a", name, href = url, title=name)
|
||||
if opt_val is not None:
|
||||
hyper += opt_val
|
||||
|
||||
@ -2831,7 +2831,7 @@ class SourceListPage(BasePage):
|
||||
msg = _("This page contains an index of all the sources in the "
|
||||
"database, sorted by their title. Clicking on a source’s "
|
||||
"title will take you to that source’s page.")
|
||||
sourceslist += Html("p", msg, id='description')
|
||||
sourceslist += Html("p", msg, id = 'description')
|
||||
|
||||
# begin sourcelist table and table head
|
||||
with Html("table", class_ = "infolist sourcelist") as table:
|
||||
@ -2962,7 +2962,7 @@ class MediaListPage(BasePage):
|
||||
"the title will take you to that media object’s page. "
|
||||
"If you see media size densions above an image, click on the "
|
||||
"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
|
||||
with Html("table", class_ = "infolist gallerylist") as table:
|
||||
@ -3022,7 +3022,7 @@ class MediaListPage(BasePage):
|
||||
name = html_escape(name)
|
||||
|
||||
# begin hyper link
|
||||
hyper = Html("a", name, href=url, title=name)
|
||||
hyper = Html("a", name, href = url, title=name)
|
||||
|
||||
# return hyperlink to its callers
|
||||
return hyper
|
||||
@ -3095,12 +3095,12 @@ class DownloadPage(BasePage):
|
||||
tbody = Html("tbody")
|
||||
table += tbody
|
||||
|
||||
trow = Html("tr", id='Row01')
|
||||
trow = Html("tr", id = 'Row01')
|
||||
tbody += trow
|
||||
|
||||
fname = os.path.basename(dlfname1)
|
||||
tcell = Html("td", class_ = "Filename") + (
|
||||
Html("a", fname, href=dlfname1, alt=dldescr1)
|
||||
Html("a", fname, href = dlfname1, alt=dldescr1)
|
||||
)
|
||||
trow += tcell
|
||||
|
||||
@ -3123,12 +3123,12 @@ class DownloadPage(BasePage):
|
||||
if dlfname2:
|
||||
|
||||
# begin row #2
|
||||
trow = Html("tr", id='Row02')
|
||||
trow = Html("tr", id = 'Row02')
|
||||
tbody += trow
|
||||
|
||||
fname = os.path.basename(dlfname2)
|
||||
tcell = Html("td", class_ = "Filename") + (
|
||||
Html("a", fname, href=dlfname2, alt=dldescr2)
|
||||
Html("a", fname, href = dlfname2, alt=dldescr2)
|
||||
)
|
||||
trow += tcell
|
||||
|
||||
@ -3138,7 +3138,7 @@ class DownloadPage(BasePage):
|
||||
copyright = self.get_copyright_license(dlcopy) or " "
|
||||
trow += Html("td", copyright, class_ = "License", inline = True)
|
||||
|
||||
tcell = Html("td", id='Col04', class_ = "Modified", inline = True)
|
||||
tcell = Html("td", id = 'Col04', class_ = "Modified", inline = True)
|
||||
trow += tcell
|
||||
if os.path.exists(dlfname2):
|
||||
modified = os.stat(dlfname2).st_mtime
|
||||
@ -3170,7 +3170,7 @@ class ContactPage(BasePage):
|
||||
body += section
|
||||
|
||||
# begin summaryarea division
|
||||
with Html("div", id='summaryarea') as summaryarea:
|
||||
with Html("div", id = 'summaryarea') as summaryarea:
|
||||
section += summaryarea
|
||||
|
||||
contactimg = report.add_image('contactimg', 200)
|
||||
@ -3180,24 +3180,24 @@ class ContactPage(BasePage):
|
||||
# get researcher information
|
||||
r = Utils.get_researcher()
|
||||
|
||||
with Html("div", id='researcher') as researcher:
|
||||
with Html("div", id = 'researcher') as researcher:
|
||||
summaryarea += researcher
|
||||
if r.name:
|
||||
r.name = r.name.replace(',,,', '')
|
||||
researcher += Html('h3', r.name, inline = True)
|
||||
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])
|
||||
if text:
|
||||
city = Html("span", r.city, id='city', inline = True)
|
||||
state = Html("span", r.state, id='state', inline = True)
|
||||
postal = Html("span", r.postal, id='postalcode', inline = True)
|
||||
city = Html("span", r.city, id = 'city', inline = True)
|
||||
state = Html("span", r.state, id = 'state', inline = True)
|
||||
postal = Html("span", r.postal, id = 'postalcode', inline = True)
|
||||
researcher += (city, state, postal)
|
||||
if r.country:
|
||||
researcher += Html("span", r.country, id='country', inline = True)
|
||||
researcher += Html("span", r.country, id = 'country', inline = True)
|
||||
if r.email:
|
||||
researcher += Html("span", id='email') + (
|
||||
Html("a", r.email, href='mailto:%s?subject="from GRAMPS Web Site"'
|
||||
researcher += Html("span", id = 'email') + (
|
||||
Html("a", r.email, href = 'mailto:%s?subject="from GRAMPS Web Site"'
|
||||
% r.email, inline = True)
|
||||
)
|
||||
|
||||
@ -3248,7 +3248,7 @@ class IndividualPage(BasePage):
|
||||
indivdetpage, body = self.write_header(self.sort_name)
|
||||
|
||||
# begin individualdetail division
|
||||
with Html("div", class_ = "content", id='IndividualDetail') as individualdetail:
|
||||
with Html("div", class_ = "content", id = 'IndividualDetail') as individualdetail:
|
||||
body += individualdetail
|
||||
|
||||
# display a person's general data
|
||||
@ -3629,7 +3629,7 @@ class IndividualPage(BasePage):
|
||||
section_title = Html('h3', self.get_name(self.person), inline = True)
|
||||
|
||||
# begin summaryarea division
|
||||
with Html("div", id='summaryarea') as summaryarea:
|
||||
with Html("div", id = 'summaryarea') as summaryarea:
|
||||
|
||||
# begin general details table
|
||||
with Html("table", class_ = "infolist") as table:
|
||||
@ -3843,7 +3843,7 @@ class IndividualPage(BasePage):
|
||||
list = Html("li")
|
||||
if child_handle in self.ind_list:
|
||||
url = self.report.build_url_fname_html(child_handle, 'ppl', True)
|
||||
list += self.person_link(url, child, True, gid=gid)
|
||||
list += self.person_link(url, child, True, gid = gid)
|
||||
|
||||
else:
|
||||
list += self.get_name(child)
|
||||
@ -3864,7 +3864,7 @@ class IndividualPage(BasePage):
|
||||
gid = person.gramps_id
|
||||
if handle in self.ind_list:
|
||||
url = self.report.build_url_fname_html(handle, 'ppl', True)
|
||||
tcell2 += self.person_link(url, person, True, gid=gid)
|
||||
tcell2 += self.person_link(url, person, True, gid = gid)
|
||||
else:
|
||||
person_name = self.get_name(person)
|
||||
tcell2 += person_name
|
||||
@ -4219,7 +4219,7 @@ class IndividualPage(BasePage):
|
||||
if partner_handle:
|
||||
if partner_handle in self.ind_list:
|
||||
url = self.report.build_url_fname_html(partner_handle, 'ppl', True)
|
||||
tcell += self.person_link(url, partner, True, gid=partner.gramps_id)
|
||||
tcell += self.person_link(url, partner, True, gid = partner.gramps_id)
|
||||
else:
|
||||
tcell += partner_name
|
||||
|
||||
@ -4376,7 +4376,7 @@ class RepositoryListPage(BasePage):
|
||||
msg = _("This page contains an index of all the repositories in the "
|
||||
"database, sorted by their title. Clicking on a repositories’s "
|
||||
"title will take you to that repositories’s page.")
|
||||
repositorylist += Html("p", msg, id='description')
|
||||
repositorylist += Html("p", msg, id = 'description')
|
||||
|
||||
# begin repositories table and table head
|
||||
with Html("table", class_ = "infolist repolist") as table:
|
||||
@ -5675,7 +5675,7 @@ def first_letter(string):
|
||||
letter = normalize('NFKC', unicode(string))[0].upper()
|
||||
else:
|
||||
letter = u' '
|
||||
# See : http://www.gramps-project.org/bugs/view.php?id=2933
|
||||
# See : http://www.gramps-project.org/bugs/view.php?id = 2933
|
||||
(lang_country, modifier ) = locale.getlocale()
|
||||
if lang_country == "sv_SE" and (letter == u'W' or letter == u'V'):
|
||||
letter = u'V,W'
|
||||
@ -5719,7 +5719,7 @@ def alphabet_navigation(db, handle_list, key):
|
||||
# % words or names are only to be distinguished by 'v' or % 'w', 'v' is
|
||||
# % placed before 'w'.
|
||||
#
|
||||
# See : http://www.gramps-project.org/bugs/view.php?id=2933
|
||||
# See : http://www.gramps-project.org/bugs/view.php?id = 2933
|
||||
#
|
||||
(lang_country, modifier ) = locale.getlocale()
|
||||
|
||||
@ -5762,10 +5762,10 @@ def alphabet_navigation(db, handle_list, key):
|
||||
title_str = _("Surnames") if key == 0 else _("Places")
|
||||
if lang_country == "sv_SE" and ltr == u'V':
|
||||
title_str += _(" starting with %s") % "V,W"
|
||||
hyper = Html("a", "V,W", href="#V,W")
|
||||
hyper = Html("a", "V,W", href = "#V,W")
|
||||
else:
|
||||
title_str += _(" starting with %s") % ltr
|
||||
hyper = Html("a", ltr, href="#%s" % ltr)
|
||||
hyper = Html("a", ltr, href = "#%s" % ltr)
|
||||
hyper.attr += " title = %s" % title_str
|
||||
list += hyper
|
||||
|
||||
|
@ -35,8 +35,8 @@ plg.version = '1.0'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'NarrativeWeb.py'
|
||||
plg.ptype = REPORT
|
||||
plg.authors = ["Donald N. Allingham"]
|
||||
plg.authors_email = ["don@gramps-project.org"]
|
||||
plg.authors = ["Donald N. Allingham", "Rob G. Healey"]
|
||||
plg.authors_email = ["don@gramps-project.org", "robhealey1@gmail.com"]
|
||||
plg.category = CATEGORY_WEB
|
||||
plg.reportclass = 'NavWebReport'
|
||||
plg.optionclass = 'NavWebOptions'
|
||||
@ -57,8 +57,8 @@ plg.version = '1.0'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'WebCal.py'
|
||||
plg.ptype = REPORT
|
||||
plg.authors = ["Thom Sturgill"]
|
||||
plg.authors_email = ["thsturgill@yahoo.com"]
|
||||
plg.authors = ["Thom Sturgill", "Rob G. Healey"]
|
||||
plg.authors_email = ["thsturgill@yahoo.com", "robhealey1@gmail.com"]
|
||||
plg.category = CATEGORY_WEB
|
||||
plg.reportclass = 'WebCalReport'
|
||||
plg.optionclass = 'WebCalOptions'
|
||||
|
Loading…
Reference in New Issue
Block a user