* src/plugins/WebPage.py: handle page titles
* src/docgen/HtmlDoc.py: handle page titles svn: r2236
This commit is contained in:
parent
a52c5a83b9
commit
07c2e959dd
@ -105,7 +105,7 @@ class HtmlDoc(BaseDoc.BaseDoc):
|
|||||||
self.top = source.top
|
self.top = source.top
|
||||||
self.bottom = source.bottom
|
self.bottom = source.bottom
|
||||||
self.base = source.base
|
self.base = source.base
|
||||||
self.file_header = source.file_header
|
self.fix_title(source.file_header)
|
||||||
self.style_declaration = source.style_declaration
|
self.style_declaration = source.style_declaration
|
||||||
self.table_styles = source.table_styles;
|
self.table_styles = source.table_styles;
|
||||||
self.cell_styles = source.cell_styles;
|
self.cell_styles = source.cell_styles;
|
||||||
@ -240,11 +240,20 @@ class HtmlDoc(BaseDoc.BaseDoc):
|
|||||||
self.f.write(self.style_declaration)
|
self.f.write(self.style_declaration)
|
||||||
|
|
||||||
def build_header(self):
|
def build_header(self):
|
||||||
top = string.join(self.top, "")
|
self.fix_title(string.join(self.top, ""))
|
||||||
match = t_header_line_re.match(top)
|
|
||||||
|
def fix_title(self,msg=None):
|
||||||
|
if msg == None:
|
||||||
|
match = t_header_line_re.match(self.file_header)
|
||||||
|
else:
|
||||||
|
match = t_header_line_re.match(msg)
|
||||||
if match:
|
if match:
|
||||||
m = match.groups()
|
m = match.groups()
|
||||||
self.file_header = '%s<TITLE>%s</TITLE>%s\n' % (m[0],m[1],m[2])
|
if self.title:
|
||||||
|
msg = self.title
|
||||||
|
else:
|
||||||
|
msg = m[1]
|
||||||
|
self.file_header = '%s<TITLE>%s</TITLE>%s\n' % (m[0],msg,m[2])
|
||||||
else:
|
else:
|
||||||
self.file_header = top
|
self.file_header = top
|
||||||
self.file_header = self.process_line(self.file_header)
|
self.file_header = self.process_line(self.file_header)
|
||||||
|
@ -127,7 +127,8 @@ class IndividualPage:
|
|||||||
|
|
||||||
name = person.getPrimaryName().getRegularName()
|
name = person.getPrimaryName().getRegularName()
|
||||||
self.doc.set_title(_("Summary of %s") % name)
|
self.doc.set_title(_("Summary of %s") % name)
|
||||||
|
self.doc.fix_title()
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user