Narweb: Private notes for home, intro and contact (#953)

If the notes are private, we can't use them in these pages.
This commit is contained in:
Serge Noiraud 2020-01-09 19:09:25 +01:00 committed by Paul Culley
parent d693881b98
commit 06cb9d7ea6
4 changed files with 19 additions and 14 deletions

View File

@ -126,10 +126,11 @@ class ContactPage(BasePage):
note_id = report.options['contactnote']
if note_id:
note = self.r_db.get_note_from_gramps_id(note_id)
note_text = self.get_note_format(note, False)
if note:
note_text = self.get_note_format(note, False)
# attach note
summaryarea += note_text
# attach note
summaryarea += note_text
# add clearline for proper styling
# add footer section

View File

@ -87,15 +87,17 @@ class HomePage(BasePage):
section += homeimg
note_id = report.options['homenote']
ldatec = None
if note_id:
note = self.r_db.get_note_from_gramps_id(note_id)
note_text = self.get_note_format(note, False)
if note:
note_text = self.get_note_format(note, False)
# attach note
section += note_text
# attach note
section += note_text
# last modification of this note
ldatec = note.get_change_time()
# last modification of this note
ldatec = note.get_change_time()
# create clear line for proper styling
# create footer section

View File

@ -87,15 +87,17 @@ class IntroductionPage(BasePage):
section += introimg
note_id = report.options['intronote']
ldatec = None
if note_id:
note = self.r_db.get_note_from_gramps_id(note_id)
note_text = self.get_note_format(note, False)
if note:
note_text = self.get_note_format(note, False)
# attach note
section += note_text
# attach note
section += note_text
# last modification of this note
ldatec = note.get_change_time()
# last modification of this note
ldatec = note.get_change_time()
# add clearline for proper styling
# create footer section

View File

@ -1453,7 +1453,7 @@ class NavWebReport(Report):
output_file.close()
else:
output_file.close()
if date > 0:
if date is not None and date > 0:
os.utime(output_file.name, (date, date))
def prepare_copy_media(self, photo):