2007-11-03 Gary Burton <gary.burton@zen.co.uk>

* src/plugins/DetDescendantReport.py
	* src/plugins/DetAncestralReport.py
	Added functionality to print event and event reference notes. issue #1335



svn: r9292
This commit is contained in:
Gary Burton 2007-11-03 22:08:34 +00:00
parent 0aefbc706a
commit bdd2c23393
3 changed files with 39 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2007-11-03 Gary Burton <gary.burton@zen.co.uk>
* src/plugins/DetDescendantReport.py
* src/plugins/DetAncestralReport.py
Added functionality to print event and event reference notes. issue #1335
2007-11-02 Stéphane Charette <stephanecharette@gmail.com>
* src/plugins/NarrativeWeb.py: issue #1340, do not display mime-types
in NarrativeWeb for image/*

View File

@ -393,16 +393,31 @@ class DetAncestorReport(Report):
if self.includeAttrs:
text = ""
for attr in event.get_attribute_list():
attr_list = event.get_attribute_list()
attr_list.extend(event_ref.get_attribute_list())
for attr in attr_list:
if text:
text += "; "
text += _("%(type)s: %(value)s%(endnotes)s") % {
'type' : attr.get_type(),
'value' : attr.get_value(),
'endnotes' : self.endnotes(attr) }
text = " " + text
self.doc.write_text(text)
self.doc.end_paragraph()
if self.includeNotes:
# if the event or event reference has a note attached to it,
# get the text and format it correctly
notelist = event.get_note_list()
notelist.extend(event_ref.get_note_list())
for notehandle in notelist:
note = self.database.get_note_from_handle(notehandle)
self.doc.start_paragraph('DAR-MoreDetails')
self.doc.write_text("test")
self.doc.write_text(note.get())
self.doc.end_paragraph()
def write_parents(self, person, firstName):
family_handle = person.get_main_parents_family_handle()

View File

@ -298,24 +298,38 @@ class DetDescendantReport(Report):
if text and (date or place):
text += ". "
text += event.get_description()
text += "%s. " % self.endnotes(event)
self.doc.write_text(text)
if self.includeAttrs:
text = ""
for attr in event.get_attribute_list():
attr_list = event.get_attribute_list()
attr_list.extend(event_ref.get_attribute_list())
for attr in attr_list:
if text:
text += "; "
text += _("%(type)s: %(value)s%(endnotes)s") % {
'type' : attr.get_type(),
'value' : attr.get_value(),
'endnotes' : self.endnotes(attr) }
text = " " + text
self.doc.write_text(text)
self.doc.end_paragraph()
if self.includeNotes:
# if the event or event reference has a note attached to it,
# get the text and format it correctly
notelist = event.get_note_list()
notelist.extend(event_ref.get_note_list())
for notehandle in notelist:
note = self.database.get_note_from_handle(notehandle)
self.doc.start_paragraph('DDR-MoreDetails')
self.doc.write_text(note.get())
self.doc.end_paragraph()
def write_parents(self, person, firstName):
family_handle = person.get_main_parents_family_handle()
if family_handle: