4015: Addition of option of 'Page Break before Endnotes' on DDR and DAR reports

svn: r15482
This commit is contained in:
Doug Blank 2010-05-25 21:21:52 +00:00
parent 72eadb0d71
commit 8f9970839b
2 changed files with 18 additions and 0 deletions

View File

@ -84,6 +84,7 @@ class DetAncestorReport(Report):
gen - Maximum number of generations to include.
pagebgg - Whether to include page breaks between generations.
pageben - Whether to include page break before End Notes.
firstName - Whether to use first names instead of pronouns.
fulldate - Whether to use full dates instead of just year.
listchildren - Whether to list children.
@ -105,6 +106,7 @@ class DetAncestorReport(Report):
menu = options_class.menu
self.max_generations = menu.get_option_by_name('gen').get_value()
self.pgbrk = menu.get_option_by_name('pagebbg').get_value()
self.pgbrkenotes = menu.get_option_by_name('pageben').get_value()
self.fulldate = menu.get_option_by_name('fulldates').get_value()
self.listchildren = menu.get_option_by_name('listc').get_value()
self.includenotes = menu.get_option_by_name('incnotes').get_value()
@ -204,6 +206,8 @@ class DetAncestorReport(Report):
if self.inc_events:
self.write_family_events(family)
if self.inc_sources:
if self.pgbrkenotes:
self.doc.page_break()
endnotes.write_endnotes(self.bibli, self.database, self.doc,
printnotes=self.inc_srcnotes)
@ -676,6 +680,11 @@ class DetAncestorOptions(MenuReportOptions):
pagebbg.set_help(
_("Whether to start a new page after each generation."))
menu.add_option(category_name,"pagebbg",pagebbg)
pageben = BooleanOption(_("Page break before end notes"),False)
pageben.set_help(
_("Whether to start a new page before the end notes."))
menu.add_option(category_name,"pageben",pageben)
category_name = _("Content")

View File

@ -87,6 +87,7 @@ class DetDescendantReport(Report):
gen - Maximum number of generations to include.
pagebgg - Whether to include page breaks between generations.
pageben - Whether to include page break before End Notes.
fulldates - Whether to use full dates instead of just year.
listc - Whether to list children.
incnotes - Whether to include notes.
@ -116,6 +117,7 @@ class DetDescendantReport(Report):
menu = options_class.menu
self.max_generations = menu.get_option_by_name('gen').get_value()
self.pgbrk = menu.get_option_by_name('pagebbg').get_value()
self.pgbrkenotes = menu.get_option_by_name('pageben').get_value()
self.fulldate = menu.get_option_by_name('fulldates').get_value()
self.listchildren = menu.get_option_by_name('listc').get_value()
self.inc_notes = menu.get_option_by_name('incnotes').get_value()
@ -277,6 +279,8 @@ class DetDescendantReport(Report):
self.write_person(key)
if self.inc_sources:
if self.pgbrkenotes:
self.doc.page_break()
endnotes.write_endnotes(self.bibli, self.database, self.doc,
printnotes=self.inc_srcnotes)
@ -770,6 +774,11 @@ class DetDescendantOptions(MenuReportOptions):
_("Whether to start a new page after each generation."))
menu.add_option(category_name, "pagebbg", pagebbg)
pageben = BooleanOption(_("Page break before end notes"),False)
pageben.set_help(
_("Whether to start a new page before the end notes."))
menu.add_option(category_name,"pageben",pageben)
category_name = _("Content")
usecall = BooleanOption(_("Use callname for common name"), False)