Narrativeweb : Created for in footer not consistant with filter option.

This commit is contained in:
SNoiraud 2016-09-01 16:52:27 +02:00
parent 59e7675a3e
commit ca227013bf

View File

@ -1711,6 +1711,8 @@ class BasePage:
else: else:
msg += _(' on %(date)s') % {'date' : _dd.display(Today())} msg += _(' on %(date)s') % {'date' : _dd.display(Today())}
origin1 = self.report.filter.get_name()
filt_number = self.report.options['filter']
# optional "link-home" feature; see bug report #2736 # optional "link-home" feature; see bug report #2736
if self.report.options['linkhome']: if self.report.options['linkhome']:
center_person = self.r_db.get_person_from_gramps_id( center_person = self.r_db.get_person_from_gramps_id(
@ -1721,12 +1723,20 @@ class BasePage:
center_person.handle, "ppl", self.uplink) center_person.handle, "ppl", self.uplink)
person_name = self.get_name(center_person) person_name = self.get_name(center_person)
subject_url = '<a href="' + center_person_url + '">' if filt_number > 0 and filt_number < 5:
subject_url += person_name + '</a>' subject_url = '<a href="' + center_person_url + '">'
subject_url += origin1 + '</a>'
else:
subject_url = origin1
msg += _( msg += _(
'%(http_break)sCreated for %(subject_url)s') % { '%(http_break)sCreated for %(subject_url)s') % {
'http_break' : '<br />', 'http_break' : '<br />',
'subject_url' : subject_url} 'subject_url' : subject_url}
else:
msg += _(
'%(http_break)sCreated for %(subject_url)s') % {
'http_break' : '<br />',
'subject_url' : origin1}
# creation author # creation author
footer += Html("p", msg, id='createdate') footer += Html("p", msg, id='createdate')