From 9d6ddde2d8ca6779ab86360b6b9fd4fe288797bb Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Mon, 10 Aug 2009 04:52:41 +0000 Subject: [PATCH] Removed source.get_reporef_list() from class SourcePage(). There is no usable information to display. svn: r12941 --- src/plugins/webreport/NarrativeWeb.py | 86 ++++++++++++--------------- 1 file changed, 37 insertions(+), 49 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index b76034dd1..fafac491c 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -447,26 +447,6 @@ class BasePage(object): return htmllist -# --------------------------------------------------------------------------------------- -# -# # Web Page Fortmatter and writer -# -# --------------------------------------------------------------------------------------- - - def mywriter(self, htmlinstance, of): - """ - Will format, write, and close the file - - of -- open file that is being written to - htmlinstance -- web page created with libhtml - src/plugins/lib/libhtml.py - """ - - htmlinstance.write(lambda line: of.write(line + '\n')) - - # closes the file - self.report.close_file(of) - def write_out_addresses(self, obj, spec=False): """ will display an object's addresses, url list, note list, @@ -1292,6 +1272,26 @@ class BasePage(object): # return hyperlink to its callers return hyper +# --------------------------------------------------------------------------------------- +# +# # Web Page Fortmatter and writer +# +# --------------------------------------------------------------------------------------- + + def mywriter(self, htmlinstance, of): + """ + Will format, write, and close the file + + of -- open file that is being written to + htmlinstance -- web page created with libhtml + src/plugins/lib/libhtml.py + """ + + htmlinstance.write(lambda line: of.write(line + '\n')) + + # closes the file + self.report.close_file(of) + class IndividualListPage(BasePage): def __init__(self, report, title, person_handle_list): @@ -2509,30 +2509,26 @@ class SourcePage(BasePage): # add section title section += Html('h3', html_escape(self.page_title.strip()), inline=True) - # begin summaryarea division - with Html('div', id='summaryarea') as summaryarea: - section += summaryarea + # begin sources table + with Html('table', class_='infolist source') as table: + section += table - # begin sources table - with Html('table', class_='infolist source') as table: - summaryarea += table + grampsid = None + if not self.noid: + grampsid = source.gramps_id - grampsid = None - if not self.noid: - grampsid = source.gramps_id + for (label, val) in [(_('GRAMPS ID'), grampsid), + (_('Author'), source.author), + (_('Publication information'), source.pubinfo), + (_('Abbreviation'), source.abbrev)]: + if val: + trow = Html('tr') + ( + Html('td', label, class_='ColumnAttribute'), + Html('td', val, class_='ColumnValue') + ) + table += trow - for (label, val) in [(_('GRAMPS ID'), grampsid), - (_('Author'), source.author), - (_('Publication information'), source.pubinfo), - (_('Abbreviation'), source.abbrev)]: - if val: - trow = Html('tr') + ( - Html('td', label, class_='ColumnAttribute'), - Html('td', val, class_='ColumnValue') - ) - table += trow - - # additional gallery + # additional media sourcegallery = self.display_additional_images_as_gallery(media_list) if sourcegallery is not None: section += sourcegallery @@ -2542,14 +2538,6 @@ class SourcePage(BasePage): if sourcenotes is not None: section += sourcenotes -# # get source repositories -# # TODO: Figure if this is possible -# for handle in source.get_repository_handles(): -# repo = db.get_repository_from_handle(handle) -# sourcerepo = self.write_repositories(repo, handle) -# if sourcerepo is not None: -# section += sourcerepo - # references source_references = self.display_references(src_list[source.handle]) if source_references is not None: