From bfaab5645fb688888348153a7f2781fa70aae878 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Sat, 13 Feb 2021 17:40:17 +0100 Subject: [PATCH] NarWeb: remove the note type 'Html code' for notes (#1176) * NarWeb: remove the note type 'Html code' for notes Fixes #12184 Html code has no real meaning for a common reader * better pylint score --- gramps/plugins/webreport/basepage.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gramps/plugins/webreport/basepage.py b/gramps/plugins/webreport/basepage.py index 2634776cd..3fdeb8080 100644 --- a/gramps/plugins/webreport/basepage.py +++ b/gramps/plugins/webreport/basepage.py @@ -742,13 +742,15 @@ class BasePage: if this_note is not None: idx += 1 if len(notelist) > 1: - if self.default_note(parent, int(this_note.type)): + if (self.default_note(parent, int(this_note.type)) or + int(this_note.type) == NoteType.HTML_CODE): title_text = self._("Note: %s") % str(idx) else: title = " (" + title + ")" title_text = self._("Note: %s") % str(idx) + title else: - if self.default_note(parent, int(this_note.type)): + if (self.default_note(parent, int(this_note.type)) or + int(this_note.type) == NoteType.HTML_CODE): title_text = self._("Note") else: title_text = title @@ -2393,13 +2395,15 @@ class BasePage: note_text = self.get_note_format(note, True) idx += 1 if len(notelist) > 1: - if self.default_note(parent, int(note.type)): + if (self.default_note(parent, int(note.type)) or + int(note.type) == NoteType.HTML_CODE): title_text = self._("Note: %s") % str(idx) else: title = " (" + title + ")" title_text = self._("Note: %s") % str(idx) + title else: - if self.default_note(parent, int(note.type)): + if (self.default_note(parent, int(note.type)) or + int(note.type) == NoteType.HTML_CODE): title_text = self._("Note") else: title_text = title