From f52dc92ad0da033acea7ca6740b3673467451372 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Thu, 8 Apr 2010 00:33:30 +0000 Subject: [PATCH] Bug #3812: Fixed event notes being shown on individual pages. svn: r15058 --- src/plugins/webreport/NarrativeWeb.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index f213a99a3..3e9a38ad2 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -459,7 +459,7 @@ class BasePage(object): """ for more information: see get_event_data() """ - event_data = self.get_event_data(evt, evt_ref, True, False, subdirs) + event_data = self.get_event_data(evt, evt_ref, subdirs) trow.extend( Html("td", data or " ", class_ = "Column" + colclass, @@ -470,8 +470,10 @@ class BasePage(object): notelist = evt.get_note_list() notelist.extend( evt_ref.get_note_list() ) if notelist: - notelist = self.dump_notes( notelist ) or " " - trow += Html("td", notelist, class_ = "ColumnNotes") + notelist = self.dump_notes( notelist ) + else: + notelist = " " + trow += Html("td", notelist, class_ = "ColumnNotes") # get event source references srcrefs = self.get_citation_links( evt.get_source_references() ) or " " @@ -499,15 +501,14 @@ class BasePage(object): else: return eventtype - def get_event_data(self, evt, evt_ref, showplc, showdescr, up, gid = None): + def get_event_data(self, evt, evt_ref, up, gid = None): """ retrieve event data from event and evt_ref @param: evt = event from database @param: evt_ref = eent reference - @param: showplc = show the event place or not? - @param: showdescr = to show the event description or not? @param: up = either True or False; add subdirs or not? + @param: gid = gramps_id """ db = self.report.database @@ -526,16 +527,10 @@ class BasePage(object): # position 0 = translatable label, position 1 = column class # position 2 = data info = [ - [DHEAD, "Date", _dd.display(evt.get_date_object() )] + [DHEAD, "Date", _dd.display(evt.get_date_object() )], + [PHEAD, "Place", place_hyper] ] - if showplc: - info.append([PHEAD, "Place", place_hyper]) - - if showdescr: - descr = evt.get_description() - info.append([DESCRHEAD, "Description", descr]) - # return event data information to its callers return info @@ -2497,7 +2492,7 @@ class EventPage(BasePage): """ for more information: see get_event_data() """ - event_data = self.get_event_data(event, event_handle, True, True, subdirs, evt_gid) + event_data = self.get_event_data(event, event_handle, subdirs, evt_gid) for (label, colclass, data) in event_data: if data: