0001994: Cannot properly sort dates stored in few quick reports using SimpleTab

svn: r10425
This commit is contained in:
Doug Blank 2008-03-30 12:38:32 +00:00
parent cf6073a4ba
commit 015bde9e01
3 changed files with 17 additions and 5 deletions

View File

@ -571,6 +571,18 @@ class SimpleAccess:
else:
return u''
def event_date_obj(self, event):
"""
Return a string indicating the date of the event
@param event: Event object
@type event: L{gen.lib.Event}
@return: Returns a string indicating the date of the event
@rtype: unicode
"""
assert(isinstance(event, (gen.lib.Event, NoneType)))
return event.get_date_object()
def event_type(self, event):
"""
Return a string indicating the type of the event

View File

@ -59,7 +59,7 @@ def run(database, document, person):
for event in event_list:
stab.row(event,
sdb.event_date(event),
sdb.event_date_obj(event),
sdb.event_place(event))
stab.write()
@ -104,7 +104,7 @@ def run_fam(database, document, family):
for (person, event) in event_list:
stab.row(person, sdb.event_type(event),
sdb.event_date(event),
sdb.event_date_obj(event),
sdb.event_place(event))
stab.write()
@ -114,7 +114,7 @@ def run_fam(database, document, family):
_("Event Date"), _("Event Place"))
for (person, event) in event_list_children:
stab.row(person, sdb.event_type(event),
sdb.event_date(event),
sdb.event_date_obj(event),
sdb.event_place(event))
stab.write()

View File

@ -113,8 +113,8 @@ def make_details(gender, person, sa, sd, database, stab) :
rem_str = ""
while person:
person_handle = person.handle
stab.row(person, sa.birth_date(person),
sa.death_date(person), rem_str)
stab.row(person, sa.birth_date_obj(person),
sa.death_date_obj(person), rem_str)
#if rem_str:
# sd.paragraph(__FMT_REM % (_("Remark"), rem_str))