diff --git a/ChangeLog b/ChangeLog index a7c281e50..8afd470c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ 2007-01-17 Brian Matherly * src/ReportBase/_ReportDialog.py: 0000832: Please enable cm/inch toggle in custom size for relationship graph + * src/plugins/NarrativeWeb.py: Add addresses to individual page. 2007-01-17 Richard Taylor * src/NameDisplay.py (_format_str_base): enable new implementation diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index ac5dde242..76bb61430 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -1386,6 +1386,7 @@ class IndividualPage(BasePage): self.display_attr_list(of, self.person.get_attribute_list()) self.display_ind_parents(of) self.display_ind_relationships(of) + self.display_addresses(of) if not self.restrict: media_list = [] @@ -1711,6 +1712,32 @@ class IndividualPage(BasePage): of.write('\n') of.write('\n') of.write('\n') + + def display_addresses(self,of): + if self.restrict: + return + + alist = self.person.get_address_list() + + if len(alist) == 0: + return + + of.write('
\n') + of.write('

%s

\n' % _('Addresses')) + of.write('\n') + + for addr in alist: + location = ", ".join([addr.get_street(),addr.get_city(), + addr.get_state(),addr.get_country()]) + location += self.get_citation_links( addr.get_source_references() ) + date = _dd.display(addr.get_date_object()) + + of.write('\n' % date) + of.write('\n' % location) + of.write('\n') + + of.write('
%s%s
\n') + of.write('
\n') def display_child_link(self, of, child_handle): use_link = child_handle in self.ind_list @@ -1936,22 +1963,7 @@ class IndividualPage(BasePage): of.write('\n') def format_event(self,event): - gid_list = [] lnk = (self.cur_name, self.page_title, self.gid) - - for sref in event.get_source_references(): - if self.exclude_private and sref.private: - continue - handle = sref.get_reference_handle() - gid_list.append(sref) - - if self.src_list.has_key(handle): - if lnk not in self.src_list[handle]: - self.src_list[handle].append(lnk) - else: - self.src_list[handle] = [lnk] - self.src_refs.append(sref) - descr = event.get_description() place_handle = event.get_place_handle() if place_handle: @@ -1984,12 +1996,34 @@ class IndividualPage(BasePage): text = place else: text = '\n' + text += self.get_citation_links( event.get_source_references() ) + return text + + def get_citation_links(self, source_ref_list): + gid_list = [] + lnk = (self.cur_name, self.page_title, self.gid) + text = "" + + for sref in source_ref_list: + if self.exclude_private and sref.private: + continue + handle = sref.get_reference_handle() + gid_list.append(sref) + + if self.src_list.has_key(handle): + if lnk not in self.src_list[handle]: + self.src_list[handle].append(lnk) + else: + self.src_list[handle] = [lnk] + self.src_refs.append(sref) + if len(gid_list) > 0: text = text + " " for ref in gid_list: index = self.src_refs.index(ref)+1 text = text + ' %d' % (index,index) text = text + "" + return text #------------------------------------------------------------------------