3131: sibling quickview doesn't reflect person view
svn: r15033
This commit is contained in:
@@ -76,28 +76,28 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
if (filter_name == 'all people'):
|
||||
stab.columns(_("Person"), _("Birth Date"), _("Name type"))
|
||||
for person in database.iter_people():
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
elif (filter_name == 'males'):
|
||||
stab.columns(_("Person"), _("Birth Date"), _("Name type"))
|
||||
for person in database.iter_people():
|
||||
if person.gender == Person.MALE:
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
elif (filter_name == 'females'):
|
||||
stab.columns(_("Person"), _("Birth Date"), _("Name type"))
|
||||
for person in database.iter_people():
|
||||
if person.gender == Person.FEMALE:
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
elif (filter_name == 'people with unknown gender'):
|
||||
stab.columns(_("Person"), _("Birth Date"), _("Name type"))
|
||||
for person in database.iter_people():
|
||||
if person.gender not in [Person.FEMALE, Person.MALE]:
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
elif (filter_name == 'people with incomplete names'):
|
||||
@@ -105,7 +105,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
for person in database.iter_people():
|
||||
for name in [person.get_primary_name()] + person.get_alternate_names():
|
||||
if name.get_group_name() == "" or name.get_first_name() == "":
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
elif (filter_name == 'people with missing birth dates'):
|
||||
@@ -125,7 +125,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
for person in database.iter_people():
|
||||
if ((not person.get_main_parents_family_handle()) and
|
||||
(not len(person.get_family_handle_list()))):
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
elif (filter_name == 'all families'):
|
||||
@@ -193,7 +193,7 @@ def run(database, document, filter_name, *args, **kwargs):
|
||||
handles = kwargs["handles"]
|
||||
for person_handle in handles:
|
||||
person = database.get_person_from_handle(person_handle)
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
else:
|
||||
|
@@ -118,7 +118,7 @@ def run(database, document, person):
|
||||
matches = 0
|
||||
for person_handle in people:
|
||||
person = database.get_person_from_handle(person_handle)
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
|
||||
@@ -159,7 +159,7 @@ def run_given(database, document, person):
|
||||
matches = 0
|
||||
for person_handle in people:
|
||||
person = database.get_person_from_handle(person_handle)
|
||||
stab.row(person, sdb.birth_date_obj(person),
|
||||
stab.row(person, sdb.birth_or_fallback(person),
|
||||
str(person.get_primary_name().get_type()))
|
||||
matches += 1
|
||||
|
||||
|
@@ -112,8 +112,8 @@ def make_details(gender, person, sa, sd, database, stab) :
|
||||
rem_str = ""
|
||||
while person:
|
||||
person_handle = person.handle
|
||||
stab.row(person, sa.birth_date_obj(person),
|
||||
sa.death_date_obj(person), rem_str)
|
||||
stab.row(person, sa.birth_or_fallback(person),
|
||||
sa.death_or_fallback(person), rem_str)
|
||||
#if rem_str:
|
||||
# sd.paragraph(__FMT_REM % (_("Remark"), rem_str))
|
||||
|
||||
|
@@ -61,6 +61,6 @@ def run(database, document, person):
|
||||
# pass row the child object to make link:
|
||||
stab.row(child,
|
||||
sdb.gender(child),
|
||||
sdb.birth_date_obj(child),
|
||||
sdb.birth_or_fallback(child),
|
||||
rel_str)
|
||||
stab.write(sdoc)
|
||||
|
Reference in New Issue
Block a user