From 40afabedec4ad624db7fb62cdbfaf46c15522ef8 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Mon, 18 Jul 2005 18:34:44 +0000 Subject: [PATCH] * src/plugins/NavWebPage.py: Optimize separation of multiple families; Print out attributes; Print out family note svn: r4952 --- gramps2/ChangeLog | 4 +++ gramps2/src/plugins/NavWebPage.py | 45 +++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 6b54690b8..8010beb20 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2005-07-18 Martin Hawlisch + * src/plugins/NavWebPage.py: Optimize separation of multiple families; + Print out attributes; Print out family note + 2005-07-17 Don Allingham * src/ReportUtils.py: fix private name generation * src/plugins/NavWebPage.py: Add family photos to the gallery, diff --git a/gramps2/src/plugins/NavWebPage.py b/gramps2/src/plugins/NavWebPage.py index bb554a301..975a78e4a 100644 --- a/gramps2/src/plugins/NavWebPage.py +++ b/gramps2/src/plugins/NavWebPage.py @@ -270,11 +270,26 @@ class BasePage: uri = url.get_path() descr = url.get_description() of.write('%d.' % index) - of.write('%s' % (uri,descr)) + of.write('%s' % (uri,descr)) of.write('\n') index = index + 1 of.write('\n') + def display_attr_list(self,of,attrlist=None): + if not attrlist: + return + of.write('

%s

\n' % _('Attributes')) + of.write('
\n') + of.write('\n') + + for attr in attrlist: + type = attr.get_type() + value = attr.get_value() + of.write('' % _(type)) + of.write('\n' % value) + of.write('
%s%s
\n') + def display_references(self,of,db,handlelist): if not handlelist: return @@ -525,6 +540,7 @@ class MediaPage(BasePage): of.write('\n') self.display_note_object(of, photo.get_note_object()) + self.display_attr_list(of, photo.get_attribute_list()) self.display_footer(of) self.close_file(of) @@ -919,6 +935,7 @@ class IndividualPage(BasePage): get_researcher().get_name()) self.display_ind_general(of) self.display_ind_events(of) + self.display_attr_list(of, self.person.get_attribute_list()) self.display_ind_parents(of) self.display_ind_relationships(of) @@ -1183,8 +1200,6 @@ class IndividualPage(BasePage): first = True for family_handle in family_list: family = self.db.get_family_from_handle(family_handle) - rtype = const.family_relations[family.get_relationship()][0] - of.write('%s\n' % rtype) self.display_spouse(of,family,first) first = False childlist = family.get_child_handle_list() @@ -1218,8 +1233,9 @@ class IndividualPage(BasePage): else: name = _("unknown") if not first: - of.write(' \n') - of.write(' ') + of.write(' \n') + rtype = const.family_relations[family.get_relationship()][0] + of.write('%s\n' % rtype) of.write('%s\n' % relstr) of.write('') if spouse_id: @@ -1243,6 +1259,25 @@ class IndividualPage(BasePage): of.write('\n') of.write(self.format_event(event)) of.write('\n\n') + for attr in family.get_attribute_list(): + type = attr.get_type() + value = attr.get_value() + of.write(' \n') + of.write('%s' % _(type)) + of.write('%s\n\n' % value) + nobj = family.get_note_object() + if nobj: + of.write(' \n') + of.write('%s\n' % _('Narrative')) + of.write('\n') + format = nobj.get_format() + text = nobj.get() + if format: + of.write( u"
" + u"
".join(text.split("\n"))+u"
") + else: + of.write( u"

".join(text.split("\n"))) + of.write('\n\n') + def pedigree_person(self,of,person,bullet='|'): person_link = person.handle in self.ind_list