Apply places changes to the narrativeweb. (#547)
* Apply places changes to the narrativeweb. Also change order between locations and locations alternate names. Fixes #10427 * Put the alternate locations back. * Suppress extra line in Alternate Names section.
This commit is contained in:
parent
e202f5cd19
commit
db263ff905
@ -2560,6 +2560,44 @@ class BasePage: # pylint: disable=C1001
|
||||
)
|
||||
tbody += trow
|
||||
|
||||
# display all related locations
|
||||
for placeref in place.get_placeref_list():
|
||||
place_date = self.rlocale.get_date(placeref.get_date_object())
|
||||
if place_date != "":
|
||||
parent_place = self.r_db.get_place_from_handle(placeref.ref)
|
||||
parent_name = parent_place.get_name().get_value()
|
||||
trow = Html('tr') + (
|
||||
Html("td", self._("Locations"), class_="ColumnAttribute",
|
||||
inline=True),
|
||||
Html("td", parent_name, class_="ColumnValue", inline=True),
|
||||
Html("td", place_date, class_="ColumnValue", inline=True)
|
||||
)
|
||||
tbody += trow
|
||||
|
||||
altloc = place.get_alternative_names()
|
||||
if altloc:
|
||||
tbody += Html("tr") + Html("td", " ", colspan=2)
|
||||
trow = Html("tr") + (
|
||||
Html("th", self._("Alternate Names"), colspan=1,
|
||||
class_="ColumnAttribute", inline=True),
|
||||
Html("th", self._("Language"), colspan=1,
|
||||
class_="ColumnAttribute", inline=True),
|
||||
Html("th", self._("Date range in which the name is valid."), colspan=1,
|
||||
class_="ColumnAttribute", inline=True),
|
||||
)
|
||||
tbody += trow
|
||||
for loc in altloc:
|
||||
place_date = self.rlocale.get_date(loc.date)
|
||||
trow = Html("tr") + (
|
||||
Html("td", loc.get_value(), class_="ColumnValue",
|
||||
inline=True),
|
||||
Html("td", loc.get_language(), class_="ColumnValue",
|
||||
inline=True),
|
||||
Html("td", place_date, class_="ColumnValue",
|
||||
inline=True),
|
||||
)
|
||||
tbody += trow
|
||||
|
||||
altloc = place.get_alternate_locations()
|
||||
if altloc:
|
||||
tbody += Html("tr") + Html("td", " ", colspan=2)
|
||||
@ -2587,20 +2625,6 @@ class BasePage: # pylint: disable=C1001
|
||||
tbody += trow
|
||||
tbody += Html("tr") + Html("td", " ", colspan=2)
|
||||
|
||||
# display all related locations
|
||||
for placeref in place.get_placeref_list():
|
||||
place_date = self.rlocale.get_date(placeref.get_date_object())
|
||||
if place_date != "":
|
||||
parent_place = self.r_db.get_place_from_handle(placeref.ref)
|
||||
parent_name = parent_place.get_name().get_value()
|
||||
trow = Html('tr') + (
|
||||
Html("td", self._("Locations"), class_="ColumnAttribute",
|
||||
inline=True),
|
||||
Html("td", parent_name, class_="ColumnValue", inline=True),
|
||||
Html("td", place_date, class_="ColumnValue", inline=True)
|
||||
)
|
||||
tbody += trow
|
||||
|
||||
# return place table to its callers
|
||||
return table
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user