parent
d677a1a785
commit
d59fe6b2af
@ -1730,6 +1730,12 @@ class NavWebOptions(MenuReportOptions):
|
|||||||
_('Whether to display children in birth order or in entry order?'))
|
_('Whether to display children in birth order or in entry order?'))
|
||||||
addopt("birthorder", birthorder)
|
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):
|
def __add_page_generation_options(self, menu):
|
||||||
"""
|
"""
|
||||||
Options on the "Page Generation" tab.
|
Options on the "Page Generation" tab.
|
||||||
|
@ -100,6 +100,9 @@ class PlacePages(BasePage):
|
|||||||
self.familymappages = None
|
self.familymappages = None
|
||||||
self.googlemapkey = None
|
self.googlemapkey = None
|
||||||
|
|
||||||
|
# Place needs to display coordinates?
|
||||||
|
self.display_coordinates = report.options["coordinates"]
|
||||||
|
|
||||||
def display_pages(self, title):
|
def display_pages(self, title):
|
||||||
"""
|
"""
|
||||||
Generate and output the pages under the Place tab, namely the place
|
Generate and output the pages under the Place tab, namely the place
|
||||||
@ -168,6 +171,7 @@ class PlacePages(BasePage):
|
|||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
|
if self.display_coordinates:
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("th", label, class_=colclass, inline=True)
|
Html("th", label, class_=colclass, inline=True)
|
||||||
for (label, colclass) in [
|
for (label, colclass) in [
|
||||||
@ -179,6 +183,16 @@ class PlacePages(BasePage):
|
|||||||
[self._("Longitude"), "ColumnLongitude"]
|
[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
|
# bug 9495 : incomplete display of place hierarchy labels
|
||||||
def sort_by_place_name(obj):
|
def sort_by_place_name(obj):
|
||||||
@ -243,6 +257,7 @@ class PlacePages(BasePage):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.display_coordinates:
|
||||||
tcell1 = Html("td", class_="ColumnLatitude",
|
tcell1 = Html("td", class_="ColumnLatitude",
|
||||||
inline=True)
|
inline=True)
|
||||||
tcell2 = Html("td", class_="ColumnLongitude",
|
tcell2 = Html("td", class_="ColumnLongitude",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user