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,6 +171,7 @@ class PlacePages(BasePage):
|
||||
trow = Html("tr")
|
||||
thead += trow
|
||||
|
||||
if self.display_coordinates:
|
||||
trow.extend(
|
||||
Html("th", label, class_=colclass, inline=True)
|
||||
for (label, colclass) in [
|
||||
@ -179,6 +183,16 @@ class PlacePages(BasePage):
|
||||
[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,6 +257,7 @@ class PlacePages(BasePage):
|
||||
]
|
||||
)
|
||||
|
||||
if self.display_coordinates:
|
||||
tcell1 = Html("td", class_="ColumnLatitude",
|
||||
inline=True)
|
||||
tcell2 = Html("td", class_="ColumnLongitude",
|
||||
|
Loading…
x
Reference in New Issue
Block a user