diff --git a/ChangeLog b/ChangeLog index 00901d475..803cb75e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-02-12 Don Allingham + * src/plugins/NavWebPage.py: More enhancements + * src/Sort.py: sort places by title + 2005-02-09 Don Allingham * src/plugins/NavWebpage.py: Build template pages for unused pages, add Surname List and Individual List pages. diff --git a/src/Sort.py b/src/Sort.py index 33996e13c..fc935c98b 100644 --- a/src/Sort.py +++ b/src/Sort.py @@ -105,3 +105,11 @@ class Sort: a = self.database.get_event_from_handle(a_id) b = self.database.get_event_from_handle(b_id) return cmp(a.get_date_object(),b.get_date_object()) + + def by_place_title(self,a_id,b_id): + """Sort routine for comparing two events by their dates. """ + if not (a_id and b_id): + return 0 + a = self.database.get_place_from_handle(a_id) + b = self.database.get_place_from_handle(b_id) + return cmp(a.title,b.title) diff --git a/src/plugins/NavWebPage.py b/src/plugins/NavWebPage.py index 8bce05fe0..c9867c5d9 100644 --- a/src/plugins/NavWebPage.py +++ b/src/plugins/NavWebPage.py @@ -124,8 +124,8 @@ _css = [ class BasePage: - def __init__(self): - pass + def __init__(self,title): + self.title_str = title def lnkfmt(self,text): return text.replace(' ','%20') @@ -143,9 +143,8 @@ class BasePage: def display_header(self,ofile,title,author=""): ofile.write('\n') - ofile.write('\n') - ofile.write('\n') - ofile.write('My Family Tree\n') + ofile.write('\n\n') + ofile.write('%s\n' % self.title_str) ofile.write('\n') ofile.write('\n') ofile.write('