* src/ReportBase/_ReportUtils.py: Add function "get_address_str"

* src/plugins/DetDescendantReport.py: Add addresses (0000791)
* src/plugins/DetAncestralReport.py: Add addresses (0000791)
* src/plugins/IndivComplete.py: Add addresses (0000791)
* src/plugins/NarrativeWeb.py: use "get_address_str"
* src/plugins/FamilyGroup.py: use "get_address_str"

svn: r7956
This commit is contained in:
Brian Matherly
2007-01-23 01:51:33 +00:00
parent c43c32a644
commit 1a57769135
7 changed files with 134 additions and 4 deletions

View File

@ -2285,3 +2285,32 @@ def get_person_mark(db,person):
key = "%s (%s - %s)" % (name,birth,death)
return BaseDoc.IndexMark( key, BaseDoc.INDEX_TYPE_ALP )
#-------------------------------------------------------------------------
#
# Address String
#
#-------------------------------------------------------------------------
def get_address_str(addr):
"""
Returns a string that combines the elements of an addres
@param addr: the GRAMPS address instance
"""
str = ""
elems = [ addr.get_street(),
addr.get_city(),
addr.get_county(),
addr.get_state(),
addr.get_country(),
addr.get_postal_code(),
addr.get_phone() ]
for info in elems:
if info:
if str == "":
str = info
else:
str = "%s, %s" % (str,info)
return str