Replace "get_note()" calls with "get_note_list()"

svn: r8747
This commit is contained in:
Brian Matherly
2007-07-20 12:03:35 +00:00
parent 8e315b4579
commit 50fe8cb60b
5 changed files with 45 additions and 13 deletions

View File

@@ -297,8 +297,10 @@ class FamilyGroup(Report):
self.doc.end_cell()
self.doc.end_row()
if self.incParNotes and (person.get_note() != ""):
self.dump_parent_line(_("Notes"),person.get_note())
if self.incParNotes:
for notehandle in person.get_note_list():
note = self.database.get_note_from_handle(notehandle)
self.dump_parent_line(_("Note"),note.get(False))
if self.incParNames:
for alt_name in person.get_alternate_names():

View File

@@ -282,9 +282,12 @@ class BasePage:
if self.footer:
obj = db.get_object_from_handle(self.footer)
if obj:
of.write('<div class="user_footer">\n')
of.write(obj.get_note(markup=True))
of.write('</div>\n')
notelist = obj.get_note_list()
if notelist:
note = db.get_note_from_handle(notelist[0])
of.write('<div class="user_footer">\n')
of.write(note.get(markup=True))
of.write('</div>\n')
of.write('</body>\n')
of.write('</html>\n')
@@ -317,9 +320,12 @@ class BasePage:
if self.header:
obj = db.get_object_from_handle(self.header)
if obj:
of.write(' <div class="user_header">\n')
of.write(obj.get_note(markup=True))
of.write(' </div>\n')
notelist = obj.get_note_list()
if notelist:
note = db.get_note_from_handle(notelist[0])
of.write(' <div class="user_header">\n')
of.write(note.get(markup=True))
of.write(' </div>\n')
of.write('<div id="navheader">\n')
value = unicode(time.strftime('%x',time.localtime(time.time())),

View File

@@ -290,7 +290,12 @@ class GeneWebWriter:
self.write_children( family, father)
self.write_notes( family, father, mother)
if not (self.restrict and self.exclnotes):
note = family.get_note()
notelist = family.get_note_list()
note = ""
for notehandle in notelist:
noteobj = self.db.get_note_from_handle(notehandle)
note += noteobj.get(False)
note += " "
if note and note != "":
note = note.replace('\n\r',' ')
note = note.replace('\r\n',' ')
@@ -378,7 +383,14 @@ class GeneWebWriter:
def write_note_of_person(self,person):
if self.persons_notes_done.count(person.get_handle()) == 0:
self.persons_notes_done.append(person.get_handle())
note = person.get_note()
notelist = person.get_note_list()
note = ""
for notehandle in notelist:
noteobj = self.db.get_note_from_handle(notehandle)
note += noteobj.get(False)
note += " "
if note and note != "":
self.writeln("")
self.writeln("notes %s" % self.get_ref_name(person))