From 0228cad5286e416428d196668cb9769776a221d8 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sun, 1 Jul 2001 22:30:45 +0000 Subject: [PATCH] Option to include link back to index page svn: r216 --- gramps/src/plugins/WebPage.py | 14 ++++++++++++-- gramps/src/plugins/webpage.glade | 27 +++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/gramps/src/plugins/WebPage.py b/gramps/src/plugins/WebPage.py index 5f4e56982..8fee10a0a 100644 --- a/gramps/src/plugins/WebPage.py +++ b/gramps/src/plugins/WebPage.py @@ -81,13 +81,14 @@ class IndividualPage: # # #-------------------------------------------------------------------- - def __init__(self,person,photos,restrict,list,dir_name,doc): + def __init__(self,person,photos,restrict,link,list,dir_name,doc): self.person = person self.doc = doc self.list = list self.alive = probably_alive(person) or restrict self.photos = (photos == 2) or (photos == 1 and not self.alive) self.dir = dir_name + self.link = link tbl = TableStyle() tbl.set_width(100) @@ -201,6 +202,13 @@ class IndividualPage: self.write_facts() self.write_families() + if self.link: + self.doc.start_paragraph("Normal") + self.doc.start_link("index.html") + self.doc.write_text(_("Return to the index of people")) + self.doc.end_link() + self.doc.end_paragraph() + #-------------------------------------------------------------------- # # @@ -586,6 +594,7 @@ def on_ok_clicked(obj): restrict = topDialog.get_widget("restrict").get_active() restrict_photos = topDialog.get_widget("restrict_photos").get_active() no_photos = topDialog.get_widget("nophotos").get_active() + include_link = topDialog.get_widget("include_link").get_active() if dir_name == None: dir_name = os.getcwd() @@ -622,7 +631,8 @@ def on_ok_clicked(obj): for person in ind_list: doc = HtmlLinkDoc(styles,templ_name) - idoc = IndividualPage(person,photos,restrict,ind_list,dir_name,doc) + idoc = IndividualPage(person,photos,restrict,include_link, \ + ind_list,dir_name,doc) idoc.create_page() idoc.close() diff --git a/gramps/src/plugins/webpage.glade b/gramps/src/plugins/webpage.glade index 6de1cf135..2c4444e43 100644 --- a/gramps/src/plugins/webpage.glade +++ b/gramps/src/plugins/webpage.glade @@ -379,6 +379,30 @@ + + GtkFrame + frame3 + 10 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkCheckButton + include_link + 3 + True + + False + True + + + GtkFrame options @@ -401,6 +425,7 @@ GtkCheckButton restrict + 3 True True @@ -415,6 +440,7 @@ GtkCheckButton nophotos + 3 True toggled @@ -434,6 +460,7 @@ GtkCheckButton restrict_photos + 3 True False