From d117110b4ca52f38c25f22ea5873e67b6eeb57f0 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 7 Sep 2005 01:43:03 +0000 Subject: [PATCH] * src/plugins/NavWebPage.py: suppress dates on list pages for restricted people svn: r5186 --- gramps2/ChangeLog | 2 ++ gramps2/doc/gramps-manual/C/getstart.xml | 2 +- gramps2/doc/gramps-manual/C/mainwin.xml | 4 +-- gramps2/doc/gramps-manual/C/usage.xml | 7 +++-- gramps2/src/plugins/NavWebPage.py | 39 +++++++++++++++--------- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 458fdc0cf..7188e8483 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2005-09-06 Don Allingham + * src/plugins/NavWebPage.py: suppress dates on list pages for restricted + people * doc/gramps-manual/C/getstart.xml: text and graphics improvements * doc/gramps-manual/C/mainwin.xml: text and graphics improvements * doc/gramps-manual/C/usage.xml: text and graphics improvements diff --git a/gramps2/doc/gramps-manual/C/getstart.xml b/gramps2/doc/gramps-manual/C/getstart.xml index 039f17a6e..6005d02fd 100644 --- a/gramps2/doc/gramps-manual/C/getstart.xml +++ b/gramps2/doc/gramps-manual/C/getstart.xml @@ -140,7 +140,7 @@ - + Shows Open Database Window. diff --git a/gramps2/doc/gramps-manual/C/mainwin.xml b/gramps2/doc/gramps-manual/C/mainwin.xml index 41c8b6330..83664d068 100644 --- a/gramps2/doc/gramps-manual/C/mainwin.xml +++ b/gramps2/doc/gramps-manual/C/mainwin.xml @@ -288,7 +288,7 @@ - + Shows column editor dialog. @@ -557,7 +557,7 @@ - + Shows Children Menu in Pedigree View. diff --git a/gramps2/doc/gramps-manual/C/usage.xml b/gramps2/doc/gramps-manual/C/usage.xml index 558c458a7..b7e010238 100644 --- a/gramps2/doc/gramps-manual/C/usage.xml +++ b/gramps2/doc/gramps-manual/C/usage.xml @@ -315,9 +315,10 @@
Missing Media dialog - + + - + Shows Missing Media dialog. @@ -544,7 +545,7 @@ - + Shows Missing Media dialog. diff --git a/gramps2/src/plugins/NavWebPage.py b/gramps2/src/plugins/NavWebPage.py index e9b7a4262..67a2eedb7 100644 --- a/gramps2/src/plugins/NavWebPage.py +++ b/gramps2/src/plugins/NavWebPage.py @@ -514,7 +514,7 @@ class BasePage: #------------------------------------------------------------------------ class IndividualListPage(BasePage): - def __init__(self, db, title, person_handle_list, + def __init__(self, db, title, person_handle_list, restrict_list, options, archive, media_list): BasePage.__init__(self, title, options, archive, media_list, "") @@ -551,10 +551,14 @@ class IndividualListPage(BasePage): self.person_link(of, self.build_name(path,person.handle), _nd.display_given(person), person.gramps_id,False) of.write('') - birth_handle = person.get_birth_handle() - if birth_handle: - birth = db.get_event_from_handle(birth_handle) - of.write(birth.get_date()) + + if person.handle in restrict_list: + of.write(_('restricted')) + else: + birth_handle = person.get_birth_handle() + if birth_handle: + birth = db.get_event_from_handle(birth_handle) + of.write(birth.get_date()) of.write('\n') first = False @@ -569,8 +573,9 @@ class IndividualListPage(BasePage): #------------------------------------------------------------------------ class SurnamePage(BasePage): - def __init__(self, db, title, person_handle_list, options, archive, - media_list): + def __init__(self, db, title, person_handle_list, restrict_list, + options, archive, media_list): + BasePage.__init__(self, title, options, archive, media_list, "") of = self.create_link_file(md5.new(title).hexdigest(),'srn') @@ -595,10 +600,13 @@ class SurnamePage(BasePage): person.get_primary_name().get_first_name(), person.gramps_id,False) of.write('') - birth_handle = person.get_birth_handle() - if birth_handle: - birth = db.get_event_from_handle(birth_handle) - of.write(birth.get_date()) + if person.handle in restrict_list: + of.write(_('restricted')) + else: + birth_handle = person.get_birth_handle() + if birth_handle: + birth = db.get_event_from_handle(birth_handle) + of.write(birth.get_date()) of.write('\n') of.write('\n\n') self.display_footer(of,db) @@ -894,6 +902,7 @@ class SurnameListPage(BasePage): ORDER_BY_COUNT = 1 def __init__(self, db, title, person_handle_list, options, archive, media_list, order_by=ORDER_BY_NAME,filename="surnames"): + BasePage.__init__(self, title, options, archive, media_list, "") if order_by == self.ORDER_BY_NAME: of = self.create_file(filename) @@ -1882,7 +1891,7 @@ class WebReport(Report.Report): self.base_pages(self.photo_list, archive) self.person_pages(ind_list, restrict_list, place_list, source_list, archive) - self.surname_pages(ind_list,archive) + self.surname_pages(ind_list, restrict_list, archive) self.place_pages(place_list, source_list, archive) self.source_pages(source_list, self.photo_list, archive) if self.inc_gallery: @@ -1954,7 +1963,7 @@ class WebReport(Report.Report): self.progress.set_pass(_('Creating individual pages'),len(ind_list)) IndividualListPage( - self.database, self.title, ind_list, + self.database, self.title, ind_list, restrict_list, self.options, archive, self.photo_list) for person_handle in ind_list: @@ -1968,7 +1977,7 @@ class WebReport(Report.Report): self.database, person, self.title, ind_list, restrict_list, place_list, source_list, self.options, archive, self.photo_list) - def surname_pages(self, ind_list, archive): + def surname_pages(self, ind_list, restrict_list, archive): """ Generates the surname related pages from list of individual people. @@ -1990,7 +1999,7 @@ class WebReport(Report.Report): self.photo_list, SurnameListPage.ORDER_BY_COUNT) for (surname,handle_list) in local_list: - SurnamePage(self.database, surname, handle_list, + SurnamePage(self.database, surname, handle_list, restrict_list, self.options, archive, self.photo_list) self.progress.step()