From e39e59c7951ab5c6f2c00cd120ab11771913d47d Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Sun, 25 Aug 2019 10:47:50 +0200 Subject: [PATCH] Make the narratives notes placement an option From 5.1 the narrative notes are placed just after the name, gender and age at death. This follow the feature request #6772. Some people want to have this placement an option to have the same functionality as before Fixes #11283 --- gramps/plugins/webreport/narrativeweb.py | 9 ++++++++- gramps/plugins/webreport/person.py | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gramps/plugins/webreport/narrativeweb.py b/gramps/plugins/webreport/narrativeweb.py index c1e1441a4..ca2471ae6 100644 --- a/gramps/plugins/webreport/narrativeweb.py +++ b/gramps/plugins/webreport/narrativeweb.py @@ -1797,9 +1797,16 @@ class NavWebOptions(MenuReportOptions): self.__graphgens.set_help(_("The number of generations to include in " "the ancestor graph")) addopt("graphgens", self.__graphgens) - self.__graph_changed() + notes = BooleanOption( + _('Include narrative notes just after name, gender'), True) + notes.set_help( + _('Include narrative notes just after name, gender and' + ' age at death (default) or include them just before' + ' attributes.')) + addopt("notes", notes) + def __add_page_generation_options(self, menu): """ Options on the "Page Generation" tab. diff --git a/gramps/plugins/webreport/person.py b/gramps/plugins/webreport/person.py index 41af1735f..4d8ad2746 100644 --- a/gramps/plugins/webreport/person.py +++ b/gramps/plugins/webreport/person.py @@ -490,11 +490,12 @@ class PersonPages(BasePage): individualdetail += thumbnail individualdetail += (name, summary) - # display Narrative Notes - notelist = person.get_note_list() - sect8 = self.display_note_list(notelist) - if sect8 is not None: - individualdetail += sect8 + if self.report.options['notes']: + # display Narrative Notes + notelist = person.get_note_list() + sect8 = self.display_note_list(notelist) + if sect8 is not None: + individualdetail += sect8 # display a person's events sect2 = self.display_ind_events(place_lat_long) @@ -557,6 +558,13 @@ class PersonPages(BasePage): if sect7 is not None: individualdetail += sect7 + if not self.report.options['notes']: + # display Narrative Notes + notelist = person.get_note_list() + sect8 = self.display_note_list(notelist) + if sect8 is not None: + individualdetail += sect8 + # display attributes attrlist = person.get_attribute_list() if attrlist: