Adding source references to all major objects: person, event, attribute, address.

svn: r12916
This commit is contained in:
Rob G. Healey 2009-08-07 20:02:55 +00:00
parent 9b8d97455f
commit 9eeb2d8b92

View File

@ -24,7 +24,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# $Id:$ # $Id: $
""" """
Narrative Web Page generator. Narrative Web Page generator.
@ -1519,8 +1519,14 @@ 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:
<<<<<<< .mine
url = self.report.build_url_fname_html(
partner_handle, 'ppl', True)
tcell += self.individual_link(url, 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.individual_link(url, partner) tcell += self.individual_link(url, partner)
>>>>>>> .r12915
else: else:
tcell += partner_name tcell += partner_name
else: else:
@ -2097,26 +2103,52 @@ class MediaPage(BasePage):
return None return None
# begin attributes division # begin attributes division
with Html('div', id='attributes') as section: with Html('div', class_='subsection', id='attributes') as section:
# section section title # section title
section += Html('h4', _('Attributes'), inline=True) section += Html('h4', _('Attributes'), inline=True)
# begin attrib table # begin attrib table
with Html('table', class_='infolist') as table: with Html('table', class_='infolist') as table:
section += table section += table
# begin table head
thead = Html('thead')
table += thead
trow = Html('tr')
thead += trow
for label, colclass in [
[_('Type'), 'Type'],
[_('Value'), 'Value'],
[_('Sources'), 'Sources'] ]:
trow += Html('th', label, class_='Column%s' % colclass, inline=True)
# begin table body # begin table body
tbody = Html('tbody') tbody = Html('tbody')
table += tbody
for attr in attrlist: for attr in attrlist:
atType = str( attr.get_type() ) trow = Html('tr')
trow = Html('tr') + (
Html('td', atType, class_='ColumnAttribute', inline=True),
Html('td', attr.get_value(), class_='ColumnValue', inline=True)
)
tbody += trow tbody += trow
table += tbody
attr_data_list = [
['Type', attr.get_type.xml_str()],
['Value', attr.get_value()],
['Sources', attr.get_source_references()]
]
# get source references
attr_data_list[2][1] = self.display_source_refs(attr_data_list[2][1])
for colclass, value in attr_data_list:
trow += Html('td', value, class_='Column%s' % colclass, inline=True)
# attach notes to section
notelist = self.display_note_list(attr.get_note_list())
if notelist is not None:
section += notelist
# return attributes division to its caller # return attributes division to its caller
return section return section
@ -3364,7 +3396,7 @@ class IndividualPage(BasePage):
place = '' place = ''
# begin table row for either: display_event_row() or format_event() # begin table row for either: display_event_row() or format_event()
with Html('tr') as trow: trow = Html('tr')
# Event/ Type # Event/ Type
evt_name = str(event.get_type()) evt_name = str(event.get_type())
@ -3397,9 +3429,7 @@ class IndividualPage(BasePage):
self.place_list[place_handle] = [lnk] self.place_list[place_handle] = [lnk]
place = self.place_link(place_handle, place = self.place_link(place_handle,
ReportUtils.place_name(db, ReportUtils.place_name(db, place_handle), up=True)
place_handle),
up=True)
else: else:
place = None place = None
txt = place or '&nbsp;' txt = place or '&nbsp;'