Added Locality to Addresses, Places, and ContactPage.
svn: r16385
This commit is contained in:
parent
45b1b97897
commit
51f239f53b
@ -884,23 +884,24 @@ class BasePage(object):
|
|||||||
thead += trow
|
thead += trow
|
||||||
|
|
||||||
addr_header = [
|
addr_header = [
|
||||||
[DHEAD, "Date"],
|
[DHEAD, "Date"],
|
||||||
[STREET, "StreetAddress"],
|
[STREET, "StreetAddress"],
|
||||||
[CITY, "City"],
|
[_("Locality"), "Locality"],
|
||||||
[COUNTY, "County"],
|
[CITY, "City"],
|
||||||
[STATE, "State"],
|
[STATE, "State"],
|
||||||
[COUNTRY, "Cntry"],
|
[COUNTY, "County"],
|
||||||
[POSTAL, "Postalcode"],
|
[POSTAL, "Postalcode"],
|
||||||
[PHONE, "Phone"] ]
|
[COUNTRY, "Cntry"],
|
||||||
|
[PHONE, "Phone"] ]
|
||||||
|
|
||||||
# if showsrc = True -- an individual's address else repository
|
# if showsrc = True -- an individual's address else repository
|
||||||
if showsrc:
|
if showsrc:
|
||||||
addr_header.append([SHEAD, "Sources"])
|
addr_header.append([SHEAD, "Sources"])
|
||||||
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("th", label, class_="Colummn" + colclass, inline = True)
|
Html("th", label, class_ = "Colummn" + colclass, inline = True)
|
||||||
for (label, colclass) in addr_header
|
for (label, colclass) in addr_header
|
||||||
)
|
)
|
||||||
|
|
||||||
# begin table body
|
# begin table body
|
||||||
tbody = Html("tbody")
|
tbody = Html("tbody")
|
||||||
@ -913,14 +914,15 @@ class BasePage(object):
|
|||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
addr_data_row = [
|
addr_data_row = [
|
||||||
["Date", _dd.display(address.get_date_object() )],
|
["Date", _dd.display(address.get_date_object() )],
|
||||||
["Streetaddress", address.get_street()],
|
["Streetaddress", address.get_street()],
|
||||||
["City", address.get_city()],
|
["Locality", address.get_locality()],
|
||||||
["County", address.get_county()],
|
["City", address.get_city()],
|
||||||
["State/ Province", address.get_state()],
|
["State", address.get_state()],
|
||||||
["Cntry", address.get_country()],
|
["County", address.get_county()],
|
||||||
["Postslcode", address.get_postal_code()],
|
["Postslcode", address.get_postal_code()],
|
||||||
["Phone", address.get_phone()] ]
|
["Cntry", address.get_country()],
|
||||||
|
["Phone", address.get_phone()] ]
|
||||||
|
|
||||||
# get source citation list
|
# get source citation list
|
||||||
if showsrc:
|
if showsrc:
|
||||||
@ -930,7 +932,7 @@ class BasePage(object):
|
|||||||
trow.extend(
|
trow.extend(
|
||||||
Html("td", value or " ", class_="Column" + colclass, inline=True)
|
Html("td", value or " ", class_="Column" + colclass, inline=True)
|
||||||
for (colclass, value) in addr_data_row
|
for (colclass, value) in addr_data_row
|
||||||
)
|
)
|
||||||
|
|
||||||
# address: notelist
|
# address: notelist
|
||||||
if showsrc is not None:
|
if showsrc is not None:
|
||||||
@ -1951,7 +1953,7 @@ class BasePage(object):
|
|||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", GRAMPSID, class_ = "ColumnAttribute", inline = True),
|
Html("td", GRAMPSID, class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", gid, class_ = "ColumnValue", inline = True)
|
Html("td", gid, class_ = "ColumnValue", inline = True)
|
||||||
)
|
)
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
if place.main_loc:
|
if place.main_loc:
|
||||||
@ -1959,16 +1961,17 @@ class BasePage(object):
|
|||||||
if ml and not ml.is_empty():
|
if ml and not ml.is_empty():
|
||||||
|
|
||||||
for (label, data) in [
|
for (label, data) in [
|
||||||
(STREET, ml.street),
|
(LATITUDE, place.lat),
|
||||||
(CITY, ml.city),
|
(LONGITUDE, place.long),
|
||||||
(PARISH, ml.parish),
|
(STREET, ml.street),
|
||||||
(COUNTY, ml.county),
|
(_("Locality"), ml.locality),
|
||||||
(STATE, ml.state),
|
(CITY, ml.city),
|
||||||
(POSTAL, ml.postal),
|
(PARISH, ml.parish),
|
||||||
(COUNTRY, ml.country),
|
(STATE, ml.state),
|
||||||
(LATITUDE, place.lat),
|
(COUNTY, ml.county),
|
||||||
(LONGITUDE, place.long),
|
(POSTAL, ml.postal),
|
||||||
(ALT_LOCATIONS, place.get_alternate_locations() ) ]:
|
(COUNTRY, ml.country),
|
||||||
|
(_("Telephone"), ml.phone) ]:
|
||||||
if data:
|
if data:
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
||||||
@ -1981,7 +1984,7 @@ class BasePage(object):
|
|||||||
table += Html("tr") + Html("td", " ", colspan = 2)
|
table += Html("tr") + Html("td", " ", colspan = 2)
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("th", ALT_LOCATIONS, colspan = 2, class_ = "ColumnAttribute", inline = True),
|
Html("th", ALT_LOCATIONS, colspan = 2, class_ = "ColumnAttribute", inline = True),
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
for loc in (nonempt for nonempt in altloc if not nonempt.is_empty()):
|
for loc in (nonempt for nonempt in altloc if not nonempt.is_empty()):
|
||||||
for (label, data) in [
|
for (label, data) in [
|
||||||
@ -1992,14 +1995,14 @@ class BasePage(object):
|
|||||||
(STATE, loc.state),
|
(STATE, loc.state),
|
||||||
(POSTAL, loc.postal),
|
(POSTAL, loc.postal),
|
||||||
(COUNTRY, loc.country),]:
|
(COUNTRY, loc.country),]:
|
||||||
|
|
||||||
if data:
|
if data:
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", data, class_ = "ColumnValue", inline = True)
|
Html("td", data, class_ = "ColumnValue", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
table += Html("tr") + Html("td", " ", colspan = 2)
|
table += Html("tr") + Html("td", " ", colspan = 2)
|
||||||
|
|
||||||
# return place table to its callers
|
# return place table to its callers
|
||||||
return table
|
return table
|
||||||
|
|
||||||
@ -3830,7 +3833,9 @@ class ContactPage(BasePage):
|
|||||||
r.name = r.name.replace(',,,', '')
|
r.name = r.name.replace(',,,', '')
|
||||||
researcher += Html("h3", r.name, inline = True)
|
researcher += Html("h3", r.name, inline = True)
|
||||||
if r.addr:
|
if r.addr:
|
||||||
researcher += Html("span", r.addr, id = 'streetaddress')
|
researcher += Html("span", r.addr, id = 'streetaddress', inline = True)
|
||||||
|
if r.locality:
|
||||||
|
researcher += Html("span", r.locality, id = "locality", inline = True)
|
||||||
text = "".join([r.city, r.state, r.postal])
|
text = "".join([r.city, r.state, r.postal])
|
||||||
if text:
|
if text:
|
||||||
city = Html("span", r.city, id = 'city', inline = True)
|
city = Html("span", r.city, id = 'city', inline = True)
|
||||||
@ -3843,7 +3848,7 @@ class ContactPage(BasePage):
|
|||||||
researcher += ( Html("span", id = 'email') +
|
researcher += ( Html("span", id = 'email') +
|
||||||
Html("a", r.email, href = 'mailto:%s?subject="from Gramps Web Site"'
|
Html("a", r.email, href = 'mailto:%s?subject="from Gramps Web Site"'
|
||||||
% r.email, inline = True)
|
% r.email, inline = True)
|
||||||
)
|
)
|
||||||
|
|
||||||
# add clear line for proper styling
|
# add clear line for proper styling
|
||||||
summaryarea += fullclear
|
summaryarea += fullclear
|
||||||
|
Loading…
Reference in New Issue
Block a user