* src/Utils.py: use intermediate variable
svn: r4980
This commit is contained in:
parent
b26b982274
commit
d45b36537e
@ -1,4 +1,5 @@
|
|||||||
2005-07-29 Don Allingham <don@gramps-project.org>
|
2005-07-29 Don Allingham <don@gramps-project.org>
|
||||||
|
* src/Utils.py: use intermediate variable
|
||||||
* src/MergePeople.py: Fix wording of the message.
|
* src/MergePeople.py: Fix wording of the message.
|
||||||
* src/Report.py: Don't force expansion of widgets
|
* src/Report.py: Don't force expansion of widgets
|
||||||
* src/ReportUtils.py: allow restriction of information
|
* src/ReportUtils.py: allow restriction of information
|
||||||
|
@ -469,7 +469,7 @@ def probably_alive(person,db,current_year=None):
|
|||||||
death = db.get_event_from_handle(person.death_handle)
|
death = db.get_event_from_handle(person.death_handle)
|
||||||
if death.get_date_object().get_start_date() != Date.EMPTY:
|
if death.get_date_object().get_start_date() != Date.EMPTY:
|
||||||
death_year = death.get_date_object().get_year()
|
death_year = death.get_date_object().get_year()
|
||||||
if death.get_date_object().get_year() < current_year:
|
if death_year < current_year:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Look for Cause Of Death, Burial or Cremation events.
|
# Look for Cause Of Death, Burial or Cremation events.
|
||||||
|
@ -185,6 +185,7 @@ class BasePage:
|
|||||||
def lnkfmt(self,text):
|
def lnkfmt(self,text):
|
||||||
return md5.new(text).hexdigest()
|
return md5.new(text).hexdigest()
|
||||||
|
|
||||||
|
|
||||||
def display_footer(self,of,db):
|
def display_footer(self,of,db):
|
||||||
|
|
||||||
of.write('</div>\n')
|
of.write('</div>\n')
|
||||||
@ -1704,11 +1705,13 @@ class WebReport(Report.Report):
|
|||||||
new_list.append(key)
|
new_list.append(key)
|
||||||
ind_list = new_list
|
ind_list = new_list
|
||||||
|
|
||||||
|
years = time.localtime(time.time())[0] - self.restrict_years
|
||||||
|
|
||||||
if self.restrict:
|
if self.restrict:
|
||||||
new_list = []
|
new_list = []
|
||||||
for key in ind_list:
|
for key in ind_list:
|
||||||
if not Utils.probably_alive(self.database.get_person_from_handle(key),
|
p = self.database.get_person_from_handle(key)
|
||||||
self.database):
|
if not Utils.probably_alive(p,self.database,years):
|
||||||
new_list.append(key)
|
new_list.append(key)
|
||||||
ind_list = new_list
|
ind_list = new_list
|
||||||
|
|
||||||
@ -1758,14 +1761,6 @@ class WebReport(Report.Report):
|
|||||||
if not self.exclude_private:
|
if not self.exclude_private:
|
||||||
person = ReportUtils.sanitize_person(self.database,person)
|
person = ReportUtils.sanitize_person(self.database,person)
|
||||||
|
|
||||||
if self.restrict:
|
|
||||||
years = time.localtime(time.time())[0] - self.restrict_years
|
|
||||||
else:
|
|
||||||
years = None
|
|
||||||
|
|
||||||
if self.restrict and Utils.probably_alive(person,self.database,years):
|
|
||||||
person = ReportUtils.restrict_no_names(self.database,person)
|
|
||||||
|
|
||||||
idoc = IndividualPage(self.database, person, self.title,
|
idoc = IndividualPage(self.database, person, self.title,
|
||||||
ind_list, place_list, source_list,
|
ind_list, place_list, source_list,
|
||||||
self.options, archive, photo_list, levels)
|
self.options, archive, photo_list, levels)
|
||||||
@ -2080,6 +2075,7 @@ class WebReportOptions(ReportOptions.ReportOptions):
|
|||||||
user selected choices for later use."""
|
user selected choices for later use."""
|
||||||
|
|
||||||
self.options_dict['NWEBrestrictinfo'] = int(self.restrict_living.get_active())
|
self.options_dict['NWEBrestrictinfo'] = int(self.restrict_living.get_active())
|
||||||
|
self.options_dict['NWEBrestrictyears'] = int(self.restrict_years.get_text())
|
||||||
self.options_dict['NWEBincpriv'] = int(not self.no_private.get_active())
|
self.options_dict['NWEBincpriv'] = int(not self.no_private.get_active())
|
||||||
self.options_dict['NWEBnoid'] = int(self.noid.get_active())
|
self.options_dict['NWEBnoid'] = int(self.noid.get_active())
|
||||||
self.options_dict['NWEBcontact'] = unicode(self.contact.get_handle())
|
self.options_dict['NWEBcontact'] = unicode(self.contact.get_handle())
|
||||||
@ -2219,7 +2215,7 @@ class WebReportDialog(Report.ReportDialog):
|
|||||||
def parse_format_frame(self):
|
def parse_format_frame(self):
|
||||||
"""The format frame is not used in this dialog."""
|
"""The format frame is not used in this dialog."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def make_report(self):
|
def make_report(self):
|
||||||
"""Create the object that will produce the web pages."""
|
"""Create the object that will produce the web pages."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user