From d6d7855caa4c3d288e2839b912aec95db5d11654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Charette?= Date: Mon, 23 Feb 2009 01:47:39 +0000 Subject: [PATCH] bug #2736 - fix 'link-home' feature svn: r12087 --- src/plugins/webreport/NarrativeWeb.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 5c66ae4b9..2c74ba9c8 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -298,7 +298,7 @@ class BasePage: of.write('\t\n') else: @@ -335,6 +335,15 @@ class BasePage: msg = _('Generated by ' 'GRAMPS on %(date)s') % {'date' : value} + # optional "link-home" feature; see bug report #2736 + if self.report.options['linkhome']: + home_person = self.report.database.get_default_person() + if home_person: + home_person_url = self.report.build_url_fname_html(home_person.handle, 'ppl', self.up) + home_person_name = home_person.get_primary_name().get_regular_name() + msg += '
' + msg += _('Created for %s') % (home_person_url, home_person_name) + of.write('\t

%s

\n' % msg) copy_nr = self.report.copyright @@ -409,16 +418,6 @@ class BasePage: if header: note = self.report.database.get_note_from_gramps_id(header) of.write('\t

%s

\n' % note.get()) - - linkhome = self.report.options['linkhome'] - if linkhome: - home_person = self.report.database.get_default_person() - if home_person: - home_person_url = self.report.build_url_fname_html(home_person.handle, 'ppl', self.up) - home_person_name = home_person.get_primary_name().get_regular_name() - msg = _('Created for %s') % (home_person_url, home_person_name) - of.write('\t

%s

\n' % msg) - of.write('\n') # Begin Navigation Menu