parent
d677a1a785
commit
d59fe6b2af
@ -1730,6 +1730,12 @@ class NavWebOptions(MenuReportOptions):
|
||||
_('Whether to display children in birth order or in entry order?'))
|
||||
addopt("birthorder", birthorder)
|
||||
|
||||
coordinates = BooleanOption(
|
||||
_('Do we display coordinates in the places list?'), False)
|
||||
coordinates.set_help(
|
||||
_('Whether to display latitude/longitude in the places list?'))
|
||||
addopt("coordinates", coordinates)
|
||||
|
||||
def __add_page_generation_options(self, menu):
|
||||
"""
|
||||
Options on the "Page Generation" tab.
|
||||
|
@ -100,6 +100,9 @@ class PlacePages(BasePage):
|
||||
self.familymappages = None
|
||||
self.googlemapkey = None
|
||||
|
||||
# Place needs to display coordinates?
|
||||
self.display_coordinates = report.options["coordinates"]
|
||||
|
||||
def display_pages(self, title):
|
||||
"""
|
||||
Generate and output the pages under the Place tab, namely the place
|
||||
@ -168,17 +171,28 @@ class PlacePages(BasePage):
|
||||
trow = Html("tr")
|
||||
thead += trow
|
||||
|
||||
trow.extend(
|
||||
Html("th", label, class_=colclass, inline=True)
|
||||
for (label, colclass) in [
|
||||
[self._("Letter"), "ColumnLetter"],
|
||||
[self._("Place Name | Name"), "ColumnName"],
|
||||
[self._("State/ Province"), "ColumnState"],
|
||||
[self._("Country"), "ColumnCountry"],
|
||||
[self._("Latitude"), "ColumnLatitude"],
|
||||
[self._("Longitude"), "ColumnLongitude"]
|
||||
]
|
||||
)
|
||||
if self.display_coordinates:
|
||||
trow.extend(
|
||||
Html("th", label, class_=colclass, inline=True)
|
||||
for (label, colclass) in [
|
||||
[self._("Letter"), "ColumnLetter"],
|
||||
[self._("Place Name | Name"), "ColumnName"],
|
||||
[self._("State/ Province"), "ColumnState"],
|
||||
[self._("Country"), "ColumnCountry"],
|
||||
[self._("Latitude"), "ColumnLatitude"],
|
||||
[self._("Longitude"), "ColumnLongitude"]
|
||||
]
|
||||
)
|
||||
else:
|
||||
trow.extend(
|
||||
Html("th", label, class_=colclass, inline=True)
|
||||
for (label, colclass) in [
|
||||
[self._("Letter"), "ColumnLetter"],
|
||||
[self._("Place Name | Name"), "ColumnName"],
|
||||
[self._("State/ Province"), "ColumnState"],
|
||||
[self._("Country"), "ColumnCountry"]
|
||||
]
|
||||
)
|
||||
|
||||
# bug 9495 : incomplete display of place hierarchy labels
|
||||
def sort_by_place_name(obj):
|
||||
@ -243,21 +257,22 @@ class PlacePages(BasePage):
|
||||
]
|
||||
)
|
||||
|
||||
tcell1 = Html("td", class_="ColumnLatitude",
|
||||
inline=True)
|
||||
tcell2 = Html("td", class_="ColumnLongitude",
|
||||
inline=True)
|
||||
trow += (tcell1, tcell2)
|
||||
if self.display_coordinates:
|
||||
tcell1 = Html("td", class_="ColumnLatitude",
|
||||
inline=True)
|
||||
tcell2 = Html("td", class_="ColumnLongitude",
|
||||
inline=True)
|
||||
trow += (tcell1, tcell2)
|
||||
|
||||
if place.lat and place.long:
|
||||
latitude, longitude = conv_lat_lon(place.lat,
|
||||
place.long,
|
||||
"DEG")
|
||||
tcell1 += latitude
|
||||
tcell2 += longitude
|
||||
else:
|
||||
tcell1 += ' '
|
||||
tcell2 += ' '
|
||||
if place.lat and place.long:
|
||||
latitude, longitude = conv_lat_lon(place.lat,
|
||||
place.long,
|
||||
"DEG")
|
||||
tcell1 += latitude
|
||||
tcell2 += longitude
|
||||
else:
|
||||
tcell1 += ' '
|
||||
tcell2 += ' '
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
|
Loading…
Reference in New Issue
Block a user