Added place.get_alternate_locations() amd place.get_source_references() to class PlacePae. Modified and clean up of display_ind_events().
svn: r12958
This commit is contained in:
parent
f0ad462488
commit
6996ad22e6
@ -134,6 +134,10 @@ STATE = _('State/ Province')
|
|||||||
COUNTRY = _('Country')
|
COUNTRY = _('Country')
|
||||||
POSTAL = _('Postal Code')
|
POSTAL = _('Postal Code')
|
||||||
PHONE = _('Phone')
|
PHONE = _('Phone')
|
||||||
|
LONGITUDE = _('Longitude')
|
||||||
|
LATITUDE = _('Latitude')
|
||||||
|
PARISH = _('Church Parish')
|
||||||
|
LOCATIONS = _('Alternate Locations')
|
||||||
|
|
||||||
# define clear blank line for proper styling
|
# define clear blank line for proper styling
|
||||||
fullclear = Html('div', class_='fullclear', inline=True)
|
fullclear = Html('div', class_='fullclear', inline=True)
|
||||||
@ -1791,15 +1795,17 @@ class PlacePage(BasePage):
|
|||||||
if place.main_loc:
|
if place.main_loc:
|
||||||
ml = place.main_loc
|
ml = place.main_loc
|
||||||
for val in [
|
for val in [
|
||||||
(_('Latitude'), place.lat),
|
(LATITUDE, place.lat),
|
||||||
(_('Longitude'), place.long),
|
(LONGITUDE, place.long),
|
||||||
(STREET, ml.street),
|
(STREET, ml.street),
|
||||||
(CITY, ml.city),
|
(CITY, ml.city),
|
||||||
(_('Church Parish'), ml.parish),
|
(PARISH, ml.parish),
|
||||||
(COUNTY, ml.county),
|
(COUNTY, ml.county),
|
||||||
(STATE, ml.state),
|
(STATE, ml.state),
|
||||||
(POSTAL, ml.postal),
|
(POSTAL, ml.postal),
|
||||||
(COUNTRY, ml.country)]:
|
(COUNTRY, ml.country),
|
||||||
|
(LOCATIONS, place.get_alternate_locations()) ]:
|
||||||
|
|
||||||
if val[1]:
|
if val[1]:
|
||||||
trow = Html('tr') + (
|
trow = Html('tr') + (
|
||||||
Html('td', val[0], class_='ColumnAttribute', inline=True),
|
Html('td', val[0], class_='ColumnAttribute', inline=True),
|
||||||
@ -1823,6 +1829,11 @@ class PlacePage(BasePage):
|
|||||||
if urllinks is not None:
|
if urllinks is not None:
|
||||||
placedetail += urllinks
|
placedetail += urllinks
|
||||||
|
|
||||||
|
# source references
|
||||||
|
sourcerefs = self.get_citation_links(place.get_source_references() )
|
||||||
|
if sourcerefs is not None:
|
||||||
|
placedetail += sourcerefs
|
||||||
|
|
||||||
# place references
|
# place references
|
||||||
referenceslist = self.display_references(place_list[place.handle])
|
referenceslist = self.display_references(place_list[place.handle])
|
||||||
if referenceslist is not None:
|
if referenceslist is not None:
|
||||||
@ -3341,22 +3352,31 @@ class IndividualPage(BasePage):
|
|||||||
return None
|
return None
|
||||||
db = self.report.database
|
db = self.report.database
|
||||||
|
|
||||||
|
# begin events division and section title
|
||||||
with Html('div', class_='subsection', id='events') as section:
|
with Html('div', class_='subsection', id='events') as section:
|
||||||
section += Html('h4', _('Events'), inline=True)
|
section += Html('h4', _('Events'), inline=True)
|
||||||
|
|
||||||
|
# begin events table
|
||||||
with Html('table', class_='infolist eventtable') as table:
|
with Html('table', class_='infolist eventtable') as table:
|
||||||
section += table
|
section += table
|
||||||
with Html('thead') as thead:
|
|
||||||
table += thead
|
# begin table head
|
||||||
thead += self.display_event_header()
|
thead = Html('thead')
|
||||||
with Html('tbody') as tbody:
|
table += thead
|
||||||
table += tbody
|
thead += self.display_event_header()
|
||||||
for event_ref in evt_ref_list:
|
|
||||||
event = db.get_event_from_handle(event_ref.ref)
|
tbody = Html('tbody')
|
||||||
if event:
|
table += tbody
|
||||||
tbody += self.display_event_row(db, event, event_ref)
|
|
||||||
|
for event_ref in evt_ref_list:
|
||||||
|
event = db.get_event_from_handle(event_ref.ref)
|
||||||
|
if event:
|
||||||
|
tbody += self.display_event_row(event, event_ref)
|
||||||
|
|
||||||
|
# return section to its caller
|
||||||
return section
|
return section
|
||||||
|
|
||||||
def display_event_row(self, db, event, event_ref):
|
def display_event_row(self, event, event_ref):
|
||||||
"""
|
"""
|
||||||
display the event row
|
display the event row
|
||||||
"""
|
"""
|
||||||
@ -3413,11 +3433,11 @@ class IndividualPage(BasePage):
|
|||||||
['Source', event.get_source_references()]
|
['Source', event.get_source_references()]
|
||||||
]
|
]
|
||||||
|
|
||||||
# Format date
|
# Format date as in preferences
|
||||||
event_data_row[1][1] = _dd.display(event_data_row[1][1])
|
event_data_row[1][1] = _dd.display(event_data_row[1][1])
|
||||||
|
|
||||||
# get citation links
|
# get citation links
|
||||||
event_data_row[4][1] = self.get_citation_links(event_data_row[4][1])
|
event_data_row[4][1] = self.get_citation_links(event_data_row[4][1] )
|
||||||
|
|
||||||
trow = Html('tr')
|
trow = Html('tr')
|
||||||
for (colclass, data) in event_data_row:
|
for (colclass, data) in event_data_row:
|
||||||
@ -3444,7 +3464,7 @@ class IndividualPage(BasePage):
|
|||||||
# attach note
|
# attach note
|
||||||
tcell += note_text
|
tcell += note_text
|
||||||
|
|
||||||
# return events table row to its caller
|
# return events table row to its callers
|
||||||
return trow
|
return trow
|
||||||
|
|
||||||
def display_addresses(self):
|
def display_addresses(self):
|
||||||
@ -3990,10 +4010,10 @@ class IndividualPage(BasePage):
|
|||||||
for event_ref in eventlist:
|
for event_ref in eventlist:
|
||||||
|
|
||||||
event = db.get_event_from_handle(event_ref.ref)
|
event = db.get_event_from_handle(event_ref.ref)
|
||||||
evtType = str(event.get_type())
|
evtType = str(event.get_type() )
|
||||||
|
|
||||||
# add event body row
|
# add event body row
|
||||||
tbody += self.display_event_row( db, event, event_ref )
|
tbody += self.display_event_row(event, event_ref )
|
||||||
|
|
||||||
# return table to its callers
|
# return table to its callers
|
||||||
return table
|
return table
|
||||||
|
Loading…
Reference in New Issue
Block a user