Fixed the place detail missing because if place.main_loc in dump_places() was indented one too far.

svn: r15111
This commit is contained in:
Rob G. Healey 2010-04-14 06:00:58 +00:00
parent 26fa02bbf5
commit 491f0d3180

View File

@ -1660,7 +1660,9 @@ class BasePage(object):
return hyper return hyper
def dump_place(self, place, table, gid): def dump_place(self, place, table, gid):
""" dump a place from the database """ """
dump a place's information from within the database
"""
if not self.noid and gid: if not self.noid and gid:
trow = Html("tr") + ( trow = Html("tr") + (
@ -1669,27 +1671,27 @@ class BasePage(object):
) )
table += trow table += trow
if place.main_loc: if place.main_loc:
ml = place.get_main_location() ml = place.get_main_location()
if ml and not ml.is_empty(): if ml and not ml.is_empty():
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),
(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() ) ]: (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),
Html("td", val[1], class_ = "ColumnValue", inline = True) Html("td", val[1], class_ = "ColumnValue", inline = True)
) )
table += trow table += trow
# return place table to its callers # return place table to its callers
return table return table