* src/plugins/NavWebPage.py: fix surnames/surnames_count problem,
fix intro/home page naming issue svn: r5358
This commit is contained in:
parent
7e4e08340f
commit
b541a4eb06
@ -1,5 +1,6 @@
|
|||||||
2005-11-02 Don Allingham <don@gramps-project.org>
|
2005-11-02 Don Allingham <don@gramps-project.org>
|
||||||
* src/plugins/NavWebPage.py: fix surnames/surnames_count problem
|
* src/plugins/NavWebPage.py: fix surnames/surnames_count problem,
|
||||||
|
fix intro/home page naming issue
|
||||||
|
|
||||||
2005-11-01 Don Allingham <don@gramps-project.org>
|
2005-11-01 Don Allingham <don@gramps-project.org>
|
||||||
* src/plugins/NavWebPage.py: fix private family records
|
* src/plugins/NavWebPage.py: fix private family records
|
||||||
@ -110,7 +111,6 @@
|
|||||||
* src/PedView.py: escape xml-specialchars because of use_markup
|
* src/PedView.py: escape xml-specialchars because of use_markup
|
||||||
* src/UrlEdit.py: escape xml-specialchars because of use_markup
|
* src/UrlEdit.py: escape xml-specialchars because of use_markup
|
||||||
|
|
||||||
|
|
||||||
2005-10-18 Don Allingham <don@gramps-project.org>
|
2005-10-18 Don Allingham <don@gramps-project.org>
|
||||||
* src/Report.py: bumped the maximum generations to 999 from 31
|
* src/Report.py: bumped the maximum generations to 999 from 31
|
||||||
|
|
||||||
|
@ -141,6 +141,7 @@ class BasePage:
|
|||||||
self.photo_list = photo_list
|
self.photo_list = photo_list
|
||||||
self.exclude_private = not options.handler.options_dict['NWEBincpriv']
|
self.exclude_private = not options.handler.options_dict['NWEBincpriv']
|
||||||
self.usegraph = options.handler.options_dict['NWEBgraph']
|
self.usegraph = options.handler.options_dict['NWEBgraph']
|
||||||
|
self.use_home = self.options.handler.options_dict['NWEBhomenote'] != ""
|
||||||
|
|
||||||
def store_file(self,archive,html_dir,from_path,to_path):
|
def store_file(self,archive,html_dir,from_path,to_path):
|
||||||
if archive:
|
if archive:
|
||||||
@ -290,15 +291,24 @@ class BasePage:
|
|||||||
of.write('<h1 class="navtitle">%s</h1>\n' % self.title_str)
|
of.write('<h1 class="navtitle">%s</h1>\n' % self.title_str)
|
||||||
of.write('<div class="nav">\n')
|
of.write('<div class="nav">\n')
|
||||||
|
|
||||||
use_home = self.options.handler.options_dict['NWEBhomenote'] != ""
|
if self.use_home:
|
||||||
if use_home:
|
index_page = "index"
|
||||||
self.show_link(of,'index',_('Home'),path)
|
surname_page = "surnames"
|
||||||
if self.use_intro:
|
intro_page = "introduction"
|
||||||
self.show_link(of,'introduction',_('Introduction'),path)
|
elif self.use_intro:
|
||||||
if not use_home and not self.use_intro:
|
index_page = ""
|
||||||
self.show_link(of,'index',_('Surnames'),path)
|
surname_page = "surnames"
|
||||||
|
intro_page = "index"
|
||||||
else:
|
else:
|
||||||
self.show_link(of,'surnames',_('Surnames'),path)
|
index_page = ""
|
||||||
|
surname_page = "index"
|
||||||
|
intro_page = ""
|
||||||
|
|
||||||
|
if self.use_home:
|
||||||
|
self.show_link(of,index_page,_('Home'),path)
|
||||||
|
if self.use_intro:
|
||||||
|
self.show_link(of,intro_page,_('Introduction'),path)
|
||||||
|
self.show_link(of,surname_page,_('Surnames'),path)
|
||||||
self.show_link(of,'individuals',_('Individuals'),path)
|
self.show_link(of,'individuals',_('Individuals'),path)
|
||||||
self.show_link(of,'sources',_('Sources'),path)
|
self.show_link(of,'sources',_('Sources'),path)
|
||||||
self.show_link(of,'places',_('Places'),path)
|
self.show_link(of,'places',_('Places'),path)
|
||||||
@ -936,8 +946,7 @@ class SurnameListPage(BasePage):
|
|||||||
of.write('<table class="infolist">\n<thead><tr>\n')
|
of.write('<table class="infolist">\n<thead><tr>\n')
|
||||||
of.write('<th>%s</th>\n' % _('Letter'))
|
of.write('<th>%s</th>\n' % _('Letter'))
|
||||||
|
|
||||||
use_home = self.options.handler.options_dict['NWEBhomenote'] != ""
|
if not self.use_home and not self.use_intro:
|
||||||
if not use_home and not self.use_intro:
|
|
||||||
of.write('<th><a href="%s.%s">%s</a></th>\n' % ("index", self.ext, _('Surname')))
|
of.write('<th><a href="%s.%s">%s</a></th>\n' % ("index", self.ext, _('Surname')))
|
||||||
else:
|
else:
|
||||||
of.write('<th><a href="%s.%s">%s</a></th>\n' % ("surnames", self.ext, _('Surname')))
|
of.write('<th><a href="%s.%s">%s</a></th>\n' % ("surnames", self.ext, _('Surname')))
|
||||||
@ -994,7 +1003,11 @@ class IntroductionPage(BasePage):
|
|||||||
BasePage.__init__(self, title, options, archive, media_list, "")
|
BasePage.__init__(self, title, options, archive, media_list, "")
|
||||||
note_id = options.handler.options_dict['NWEBintronote']
|
note_id = options.handler.options_dict['NWEBintronote']
|
||||||
|
|
||||||
|
if self.use_home:
|
||||||
of = self.create_file("introduction")
|
of = self.create_file("introduction")
|
||||||
|
else:
|
||||||
|
of = self.create_file("index")
|
||||||
|
|
||||||
author = get_researcher().get_name()
|
author = get_researcher().get_name()
|
||||||
self.display_header(of, db, _('Introduction'), author)
|
self.display_header(of, db, _('Introduction'), author)
|
||||||
|
|
||||||
@ -2166,10 +2179,11 @@ class WebReport(Report.Report):
|
|||||||
local_list = sort_people(self.database,ind_list)
|
local_list = sort_people(self.database,ind_list)
|
||||||
self.progress.set_pass(_("Creating surname pages"),len(local_list))
|
self.progress.set_pass(_("Creating surname pages"),len(local_list))
|
||||||
|
|
||||||
if self.use_home:
|
if self.use_home or self.use_intro:
|
||||||
defname="surnames"
|
defname="surnames"
|
||||||
else:
|
else:
|
||||||
defname="index"
|
defname="index"
|
||||||
|
|
||||||
SurnameListPage(
|
SurnameListPage(
|
||||||
self.database, self.title, ind_list, self.options, archive,
|
self.database, self.title, ind_list, self.options, archive,
|
||||||
self.photo_list, SurnameListPage.ORDER_BY_NAME,defname)
|
self.photo_list, SurnameListPage.ORDER_BY_NAME,defname)
|
||||||
@ -2245,6 +2259,19 @@ class WebReport(Report.Report):
|
|||||||
|
|
||||||
def base_pages(self, photo_list, archive):
|
def base_pages(self, photo_list, archive):
|
||||||
|
|
||||||
|
if self.use_home:
|
||||||
|
index_page = "index"
|
||||||
|
surname_page = "surnames"
|
||||||
|
intro_page = "introduction"
|
||||||
|
elif self.use_intro:
|
||||||
|
index_page = ""
|
||||||
|
surname_page = "surnames"
|
||||||
|
intro_page = "index"
|
||||||
|
else:
|
||||||
|
index_page = ""
|
||||||
|
surname_page = "index"
|
||||||
|
intro_page = ""
|
||||||
|
|
||||||
if self.use_home:
|
if self.use_home:
|
||||||
HomePage(self.database, self.title, self.options, archive, photo_list)
|
HomePage(self.database, self.title, self.options, archive, photo_list)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user