bug #2648, 'link home' option was no longer working

svn: r11711
This commit is contained in:
Stéphane Charette 2009-01-25 08:24:56 +00:00
parent 6d50c002fe
commit 4e5f282137

View File

@ -4,7 +4,7 @@
# Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com> # Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com>
# Copyright (C) 2007 Gary Burton <gary.burton@zen.co.uk> # Copyright (C) 2007 Gary Burton <gary.burton@zen.co.uk>
# Copyright (C) 2007-2008 Stephane Charette <stephanecharette@gmail.com> # Copyright (C) 2007-2009 Stephane Charette <stephanecharette@gmail.com>
# Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Jason M. Simanek <jason@bohemianalps.com> # Copyright (C) 2008 Jason M. Simanek <jason@bohemianalps.com>
# #
@ -294,6 +294,14 @@ class BasePage:
value = _dd.display(value) value = _dd.display(value)
msg = _('Generated by <a href="http://gramps-project.org">' msg = _('Generated by <a href="http://gramps-project.org">'
'GRAMPS</a> on %(date)s') % {'date' : value} 'GRAMPS</a> on %(date)s') % {'date' : value}
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 += _('<br />for <a href="%s">%s</a>') % (home_person_url, home_person_name)
of.write('\t<p id="createdate">%s</p>\n' % msg) of.write('\t<p id="createdate">%s</p>\n' % msg)
copy_nr = self.report.copyright copy_nr = self.report.copyright
@ -362,11 +370,6 @@ class BasePage:
of.write('<div id="header">\n') of.write('<div id="header">\n')
db = self.report.database db = self.report.database
if self.linkhome:
home_person = db.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()
of.write('\t<h1 id="SiteTitle">%s</h1>\n' % html_escape(self.title_str)) of.write('\t<h1 id="SiteTitle">%s</h1>\n' % html_escape(self.title_str))
header = self.report.options['headernote'] header = self.report.options['headernote']