Places sorted, fixed several problems in Web Site generation
svn: r391
This commit is contained in:
parent
fac8d365e9
commit
fda19ba093
@ -296,6 +296,7 @@ class HtmlDoc(TextDoc):
|
|||||||
self.f.write('<td valign="top"')
|
self.f.write('<td valign="top"')
|
||||||
if span > 1:
|
if span > 1:
|
||||||
self.f.write(' colspan="' + str(span) + '"')
|
self.f.write(' colspan="' + str(span) + '"')
|
||||||
|
self.col = self.col + 1
|
||||||
else:
|
else:
|
||||||
self.f.write(' width="')
|
self.f.write(' width="')
|
||||||
self.f.write(str(self.tbl.get_column_width(self.col)))
|
self.f.write(str(self.tbl.get_column_width(self.col)))
|
||||||
|
@ -1892,6 +1892,10 @@ def load_places():
|
|||||||
index = 0
|
index = 0
|
||||||
places = database.getPlaceMap().values()
|
places = database.getPlaceMap().values()
|
||||||
|
|
||||||
|
nlist = map(lambda x: (string.upper(x.get_title()),x),places)
|
||||||
|
nlist.sort()
|
||||||
|
places = map(lambda(key,x): x, nlist)
|
||||||
|
|
||||||
for src in places:
|
for src in places:
|
||||||
title = src.get_title()
|
title = src.get_title()
|
||||||
id = src.getId()
|
id = src.getId()
|
||||||
|
@ -96,7 +96,7 @@ class IndividualPage:
|
|||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.list = list
|
self.list = list
|
||||||
self.private = private
|
self.private = private
|
||||||
self.alive = probably_alive(person) or restrict
|
self.alive = probably_alive(person) and restrict
|
||||||
self.photos = (photos == 2) or (photos == 1 and not self.alive)
|
self.photos = (photos == 2) or (photos == 1 and not self.alive)
|
||||||
self.usecomments = not uc
|
self.usecomments = not uc
|
||||||
self.dir = dir_name
|
self.dir = dir_name
|
||||||
@ -292,6 +292,8 @@ class IndividualPage:
|
|||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
def write_facts(self):
|
def write_facts(self):
|
||||||
|
|
||||||
|
if self.alive:
|
||||||
|
return
|
||||||
self.doc.start_paragraph("EventsTitle")
|
self.doc.start_paragraph("EventsTitle")
|
||||||
self.doc.write_text(_("Facts and Events"))
|
self.doc.write_text(_("Facts and Events"))
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
@ -333,7 +335,7 @@ class IndividualPage:
|
|||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
def write_notes(self):
|
def write_notes(self):
|
||||||
|
|
||||||
if self.person.getNote() == "":
|
if self.person.getNote() == "" or self.alive:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.doc.start_paragraph("NotesTitle")
|
self.doc.start_paragraph("NotesTitle")
|
||||||
@ -394,8 +396,10 @@ class IndividualPage:
|
|||||||
self.doc.start_cell("NormalCell",2)
|
self.doc.start_cell("NormalCell",2)
|
||||||
self.doc.start_paragraph("Spouse")
|
self.doc.start_paragraph("Spouse")
|
||||||
if spouse:
|
if spouse:
|
||||||
|
if spouse in self.list:
|
||||||
self.doc.start_link("%s.html" % spouse.getId())
|
self.doc.start_link("%s.html" % spouse.getId())
|
||||||
self.doc.write_text(spouse.getPrimaryName().getRegularName())
|
self.doc.write_text(spouse.getPrimaryName().getRegularName())
|
||||||
|
if spouse in self.list:
|
||||||
self.doc.end_link()
|
self.doc.end_link()
|
||||||
else:
|
else:
|
||||||
self.doc.write_text(_("unknown"))
|
self.doc.write_text(_("unknown"))
|
||||||
@ -403,6 +407,7 @@ class IndividualPage:
|
|||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
self.doc.end_row()
|
self.doc.end_row()
|
||||||
|
|
||||||
|
if not self.alive:
|
||||||
for event in family.getEventList():
|
for event in family.getEventList():
|
||||||
if event.getPrivacy() == 0:
|
if event.getPrivacy() == 0:
|
||||||
self.write_fam_fact(event)
|
self.write_fam_fact(event)
|
||||||
@ -410,6 +415,7 @@ class IndividualPage:
|
|||||||
child_list = family.getChildList()
|
child_list = family.getChildList()
|
||||||
if len(child_list) > 0:
|
if len(child_list) > 0:
|
||||||
|
|
||||||
|
self.doc.start_row()
|
||||||
self.doc.start_cell("NormalCell")
|
self.doc.start_cell("NormalCell")
|
||||||
self.doc.start_paragraph("Label")
|
self.doc.start_paragraph("Label")
|
||||||
self.doc.write_text(_("Children"))
|
self.doc.write_text(_("Children"))
|
||||||
@ -425,8 +431,10 @@ class IndividualPage:
|
|||||||
first = 0
|
first = 0
|
||||||
else:
|
else:
|
||||||
self.doc.write_text('\n')
|
self.doc.write_text('\n')
|
||||||
|
if child in self.list:
|
||||||
self.doc.start_link("%s.html" % child.getId())
|
self.doc.start_link("%s.html" % child.getId())
|
||||||
self.doc.write_text(child.getPrimaryName().getRegularName())
|
self.doc.write_text(child.getPrimaryName().getRegularName())
|
||||||
|
if child in self.list:
|
||||||
self.doc.end_link()
|
self.doc.end_link()
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
self.doc.end_cell()
|
self.doc.end_cell()
|
||||||
|
Loading…
Reference in New Issue
Block a user