Add option that allows to use the name of the individual as title.
This commit is contained in:
@@ -141,6 +141,8 @@ class IndivCompleteReport(Report):
|
|||||||
|
|
||||||
self.sort = menu.get_option_by_name('sort').get_value()
|
self.sort = menu.get_option_by_name('sort').get_value()
|
||||||
|
|
||||||
|
self.name_is_title = menu.get_option_by_name('name_is_title').get_value()
|
||||||
|
|
||||||
self.use_attrs = menu.get_option_by_name('incl_attrs').get_value()
|
self.use_attrs = menu.get_option_by_name('incl_attrs').get_value()
|
||||||
self.use_census = menu.get_option_by_name('incl_census').get_value()
|
self.use_census = menu.get_option_by_name('incl_census').get_value()
|
||||||
self.use_gramps_id = menu.get_option_by_name('inc_id').get_value()
|
self.use_gramps_id = menu.get_option_by_name('inc_id').get_value()
|
||||||
@@ -853,13 +855,17 @@ class IndivCompleteReport(Report):
|
|||||||
self.bibli = Bibliography(
|
self.bibli = Bibliography(
|
||||||
Bibliography.MODE_DATE|Bibliography.MODE_PAGE)
|
Bibliography.MODE_DATE|Bibliography.MODE_PAGE)
|
||||||
|
|
||||||
|
if self.name_is_title:
|
||||||
|
title1 = self._name_display.display(self.person)
|
||||||
|
else:
|
||||||
title1 = self._("Complete Individual Report")
|
title1 = self._("Complete Individual Report")
|
||||||
text2 = self._name_display.display(self.person)
|
text2 = self._name_display.display(self.person)
|
||||||
mark1 = IndexMark(title1, INDEX_TYPE_TOC, 1)
|
|
||||||
mark2 = IndexMark(text2, INDEX_TYPE_TOC, 2)
|
mark2 = IndexMark(text2, INDEX_TYPE_TOC, 2)
|
||||||
|
mark1 = IndexMark(title1, INDEX_TYPE_TOC, 1)
|
||||||
self.doc.start_paragraph("IDS-Title")
|
self.doc.start_paragraph("IDS-Title")
|
||||||
self.doc.write_text(title1, mark1)
|
self.doc.write_text(title1, mark1)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
if not self.name_is_title:
|
||||||
self.doc.start_paragraph("IDS-Title")
|
self.doc.start_paragraph("IDS-Title")
|
||||||
self.doc.write_text(text2, mark2)
|
self.doc.write_text(text2, mark2)
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@@ -1079,6 +1085,11 @@ class IndivCompleteOptions(MenuReportOptions):
|
|||||||
_("Whether to start a new page before the end notes."))
|
_("Whether to start a new page before the end notes."))
|
||||||
menu.add_option(category_name, "pageben", pageben)
|
menu.add_option(category_name, "pageben", pageben)
|
||||||
|
|
||||||
|
name_is_title = BooleanOption(_("Use name of person as title"), False)
|
||||||
|
name_is_title.set_help(_("Whether the title should be the name of the "
|
||||||
|
"person, or 'Complete Individual Report'"))
|
||||||
|
menu.add_option(category_name, "name_is_title", name_is_title)
|
||||||
|
|
||||||
################################
|
################################
|
||||||
category_name = _("Report Options (2)")
|
category_name = _("Report Options (2)")
|
||||||
################################
|
################################
|
||||||
|
Reference in New Issue
Block a user