Birthday and Anniversary Report: add person ID
This commit is contained in:
parent
860406e2a3
commit
417a65f721
@ -104,6 +104,7 @@ class BirthdayReport(Report):
|
|||||||
self.filter_option = menu.get_option_by_name('filter')
|
self.filter_option = menu.get_option_by_name('filter')
|
||||||
self.filter = self.filter_option.get_filter()
|
self.filter = self.filter_option.get_filter()
|
||||||
self.showyear = mgobn('showyear')
|
self.showyear = mgobn('showyear')
|
||||||
|
self.inc_gid = mgobn('inc_id')
|
||||||
pid = mgobn('pid')
|
pid = mgobn('pid')
|
||||||
|
|
||||||
self.set_locale(menu.get_option_by_name('trans').get_value())
|
self.set_locale(menu.get_option_by_name('trans').get_value())
|
||||||
@ -137,6 +138,10 @@ class BirthdayReport(Report):
|
|||||||
surname_obj.set_surname(maiden_name)
|
surname_obj.set_surname(maiden_name)
|
||||||
else:
|
else:
|
||||||
name = Name(primary_name)
|
name = Name(primary_name)
|
||||||
|
if self.inc_gid:
|
||||||
|
return "%s (%s)" % (self._name_display.display_name(name),
|
||||||
|
person.get_gramps_id())
|
||||||
|
else:
|
||||||
return self._name_display.display_name(name)
|
return self._name_display.display_name(name)
|
||||||
|
|
||||||
def add_day_item(self, text, month, day, person=None):
|
def add_day_item(self, text, month, day, person=None):
|
||||||
@ -509,6 +514,8 @@ class BirthdayOptions(MenuReportOptions):
|
|||||||
alive.set_help(_("Include only living people in the report"))
|
alive.set_help(_("Include only living people in the report"))
|
||||||
menu.add_option(category_name, "alive", alive)
|
menu.add_option(category_name, "alive", alive)
|
||||||
|
|
||||||
|
stdoptions.add_gramps_id_option(menu, category_name)
|
||||||
|
|
||||||
deadtxt = StringOption(_("Dead Symbol"), _(_DEADTXT))
|
deadtxt = StringOption(_("Dead Symbol"), _(_DEADTXT))
|
||||||
deadtxt.set_help(_("This will show after name to indicate that person is dead"))
|
deadtxt.set_help(_("This will show after name to indicate that person is dead"))
|
||||||
menu.add_option(category_name, "deadtxt", deadtxt)
|
menu.add_option(category_name, "deadtxt", deadtxt)
|
||||||
|
Loading…
Reference in New Issue
Block a user