| %s | \n' % _('Gender'))
gender = self.gender_map[self.person.gender]
@@ -782,6 +817,9 @@ class IndividualPage(BasePage):
of.write(u'\n')
def display_ind_events(self,of):
+ if len(self.person.get_event_list()) == 0:
+ return
+
of.write(u'%s
\n' % _('Events'))
of.write(u'
\n')
of.write(u'\n')
of.write(u'\n')
-
of.write(u'
\n')
def display_ind_narrative(self,of):
- of.write(u'%s
\n' % _('Narrative'))
- of.write(u'
\n')
-
noteobj = self.person.get_note_object()
if noteobj:
+ of.write(u'%s
\n' % _('Narrative'))
+ of.write(u'
\n')
format = noteobj.get_format()
text = noteobj.get()
@@ -821,7 +857,7 @@ class IndividualPage(BasePage):
of.write(u'')
val = person.gramps_id
if use_link:
- of.write('' % (val,self.ext))
+ of.write('' % (person.handle,self.ext))
of.write(_nd.display(person))
if not self.noid:
of.write(u' [%s]' % (val))
@@ -875,7 +911,7 @@ class IndividualPage(BasePage):
child = self.db.get_person_from_handle(child_handle)
gid = child.get_gramps_id()
if use_link:
- of.write(u'' % (gid,self.ext))
+ of.write(u'' % (child.handle,self.ext))
of.write(_nd.display(child))
if not self.noid:
of.write(u' [%s]' % gid)
@@ -914,7 +950,7 @@ class IndividualPage(BasePage):
use_link = spouse_id in self.ind_list
gid = spouse.get_gramps_id()
if use_link:
- of.write(u'' % (gid,self.ext))
+ of.write(u'' % (spouse.handle,self.ext))
of.write(name)
if not self.noid:
of.write(u' [%s]' % (gid))
@@ -936,7 +972,7 @@ class IndividualPage(BasePage):
person_link = person.handle in self.ind_list
of.write(u'%s ' % bullet)
if person_link:
- of.write(u'' % (person.gramps_id,self.ext))
+ of.write(u'' % (person.handle,self.ext))
of.write(_nd.display(person))
if person_link:
of.write(u'')
@@ -964,7 +1000,7 @@ class IndividualPage(BasePage):
place_handle = event.get_place_handle()
if place_handle:
self.place_list.add(place_handle)
- place = ReportUtils.place_name(self.db,place_handle)
+ place = '%s' % (place_handle,self.ext,ReportUtils.place_name(self.db,place_handle))
date = _dd.display(event.get_date_object())
tmap = {'description' : descr, 'date' : date, 'place' : place}
@@ -1055,7 +1091,8 @@ class WebReport(Report.Report):
self.inc_contact = options_class.handler.options_dict['NWEBcontact']
self.inc_download = options_class.handler.options_dict['NWEBdownload']
self.use_archive = options_class.handler.options_dict['NWEBarchive']
-
+ self.use_intro = options_class.handler.options_dict['NWEBintronote'] != u""
+
def get_progressbar_data(self):
return (_("Generate HTML reports - GRAMPS"),
'%s' %
@@ -1122,7 +1159,8 @@ class WebReport(Report.Report):
if self.inc_download:
DownloadPage(self.database, self.title, self.options_class, archive)
- IntroductionPage(self.database, self.title, self.options_class, archive)
+ if self.use_intro:
+ IntroductionPage(self.database, self.title, self.options_class, archive)
place_list = sets.Set()
source_list = sets.Set()
@@ -1365,6 +1403,17 @@ class WebReportOptions(ReportOptions.ReportOptions):
store.append(row=data)
self.home_note = GrampsNoteComboBox(store,home_node)
+ intro_node = None
+ intro_note = self.options_dict['NWEBintronote']
+
+ store = gtk.ListStore(str,str)
+ for data in media_list:
+ if data[1] == intro_note:
+ intro_node = store.append(row=data)
+ else:
+ store.append(row=data)
+ self.intro_note = GrampsNoteComboBox(store,intro_node)
+
dialog.add_frame_option(title,_('Home Media/Note ID'),
self.home_note)
dialog.add_frame_option(title,_('Introduction Media/Note ID'),
@@ -1392,7 +1441,7 @@ class WebReportOptions(ReportOptions.ReportOptions):
self.options_dict['NWEBdownload'] = int(self.inc_download.get_active())
self.options_dict['NWEBimagedir'] = unicode(self.imgdir.get_text())
self.options_dict['NWEBtitle'] = unicode(self.title.get_text())
- self.options_dict['NWEBintronote'] = unicode(self.intro_note.get_text())
+ self.options_dict['NWEBintronote'] = unicode(self.intro_note.get_handle())
self.options_dict['NWEBhomenote'] = unicode(self.home_note.get_handle())
index = self.ext.get_active()
@@ -1653,7 +1702,7 @@ class GrampsNoteComboBox(gtk.ComboBox):
@rtype: str
"""
active = self.get_active_iter()
- handle = None
+ handle = u""
if active:
handle = self.local_store.get_value(active,1)
return handle
|