- \n')
for key,sref in citation.get_ref_list():
tmp = []
@@ -863,7 +831,9 @@ class IndividualListPage(BasePage):
of.write('\t
%s
\n' % _('Individuals')) of.write('\t%s
\n' % msg) - of.write('\t%s | \n' % _('Surname')) of.write('\t\t\t%s | \n' % _('Name')) column_count = 2 @@ -879,7 +849,9 @@ class IndividualListPage(BasePage): if self.showparents: of.write('\t\t\t%s | \n' % _('Parents')) column_count += 1 - of.write('\t\t
---|---|---|
%s' % (self.lnkfmt(surname),surname)) + of.write('\t\t | ||
%s' % (self.lnkfmt(surname),surname)) else: - of.write('\t\t | ||
') + of.write('\t\t | ||
') of.write(' | \n') # firstname column @@ -976,7 +950,8 @@ class IndividualListPage(BasePage): of.write('\t\t
Surnames:
\n') of.write('\t%s
\n' % html_escape(title)) of.write('\t%s
\n' % msg) - of.write('\t%s | \n' % _('Name')) if self.showbirth: of.write('\t\t\t%s | \n' % _('Birth')) @@ -1011,13 +988,16 @@ class SurnamePage(BasePage): of.write('\t\t\t%s | \n' % _('Partner')) if self.showparents: of.write('\t\t\t%s | \n' % _('Parents')) - of.write('\t\t
---|---|---|---|
') + of.write('\t\t | |||
') path = self.build_path(person.handle,"ppl",True) self.person_link(of, self.build_name(path,person.handle), person.get_primary_name().get_first_name(), @@ -1096,7 +1076,8 @@ class SurnamePage(BasePage): # finished writing all columns of.write('\t\t |
%s
\n' % _('Places')) of.write('\t%s
\n' % msg ) - of.write('\t%s | \n' % _('Letter')) of.write('\t\t\t%s | \n' % _('Name')) - of.write('\t\t
---|---|
%s | \n' % last_letter) + of.write('\t\t|
%s | \n' % last_letter) of.write('\t\t\t') self.place_link(of,place.handle, n,place.gramps_id) - of.write(' | \n\t\t
\n') + of.write('\t\t | |
\n') of.write('\t\t\t | ') self.place_link(of,place.handle, n,place.gramps_id) - of.write(' | \n\t\t
%s | \n' % _('GRAMPS ID')) + of.write('\t\t\t|
%s | \n' % _('GRAMPS ID')) of.write('\t\t\t\t%s | \n' % place.gramps_id) of.write('\t\t\t
%s | \n' % val[0]) + of.write('\t\t\t|
%s | \n' % val[0]) of.write('\t\t\t\t%s | \n' % val[1]) of.write('\t\t\t
%s | \n' % _('Longitude')) + of.write('\t\t\t|
%s | \n' % _('Longitude')) of.write('\t\t\t\t%s | \n' % place.long) of.write('\t\t\t
%s | \n' % _('Latitude')) + of.write('\t\t\t|
%s | \n' % _('Latitude')) of.write('\t\t\t\t%s | \n' % place.lat) of.write('\t\t\t
%s | \n' % atType) - of.write('\t\t\t\t%s | \n\t\t\t
%s | \n' % atType) + of.write('\t\t\t\t%s | \n' % attr.get_value()) + of.write('\t\t\t
%s | \n' % _('Letter')) if not self.use_home and not self.use_intro: @@ -1461,7 +1463,9 @@ class SurnameListPage(BasePage): else: of.write('\t\t\t%s | \n' % ("surnames", self.ext, _('Surname'))) of.write('\t\t\t%s | \n' % ("surnames_count", self.ext, _('Number of people'))) - of.write('\t\t
---|---|---|
%s | \n' % last_letter) + of.write('\t\t||
%s | \n' % last_letter) of.write('\t\t\t') self.surname_link(of,surname) of.write(' | \n') elif surname != last_surname: - of.write('\t\t|
\n') + of.write('\t\t | ||
\n') of.write('\t\t\t | ') self.surname_link(of,surname) of.write(' | \n') last_surname = surname - of.write('\t\t\t%d | \n\t\t%d | \n' % len(data_list)) + of.write('\t\t\n') - of.write('\t\n\t
\n%s\n\t\n' % text) + of.write('\t
\n%s\n' % text) + of.write('\t\n') else: of.write('\t
') - of.write( u'
\n\t'.join(text.split("\n"))) + of.write(u'
\n\t'.join(text.split("\n"))) of.write('
\n') self.display_footer(of,db) @@ -1594,10 +1603,11 @@ class HomePage(BasePage): note_obj = db.get_note_from_gramps_id(note_id) text = note_obj.get(markup=True) if note_obj.get_format(): - of.write('\t\n%s\n\t\n' % text) + of.write('\t
\n%s\n' % text) + of.write('\t\n') else: of.write('\t
') - of.write( u'
\n\t'.join(text.split("\n"))) + of.write(u'
\n\t'.join(text.split("\n"))) of.write('
\n') self.display_footer(of,db) @@ -1632,23 +1642,31 @@ class SourcesPage(BasePage): "database, sorted by their title. Clicking on a source’s " "title will take you to that source’s page.") - of.write('\t%s
\n\t' % _('Sources')) + of.write('\t
%s
\n' % _('Sources')) + of.write('\t') of.write(msg) - of.write('
\n\t\n') of.write('\t\t\t | Name | \n') - of.write('\t\t
---|---|
%d. | \n' % index) + of.write('\t\t|
%d. | \n' % index) of.write('\t\t\t\n\t\t |
%s
\n\n\t' % _('Gallery')) + of.write('\t
%s
\n\n' % _('Gallery')) + of.write('\t') of.write(_("This page contains an index of all the media objects " "in the database, sorted by their title. Clicking on " "the title will take you to that media object’s page.")) - of.write('
\n\n\t\n') of.write('\t\t\t | Name | \n') of.write('\t\t\tDate | \n') - of.write('\t\t
---|
%s
\n' % _('Pedigree')) - of.write('\t\t- \n\t\t\t')
+ of.write('\t\t
- %s\n' % self.name)
- of.write('\t\t\t\t\t\t\t\t
- \n\t\t\t\t\t\t\t\t\t')
+ of.write('\t\t\t\t\t\t\t\t
- \n')
+ of.write('\t\t\t\t\t\t\t\t\t')
self.pedigree_family(of)
- of.write('\t\t\t\t\t\t\t\t
\n')
+ of.write('\t\t\t\t\t\t\t\t - %s\n' % self.name)
- of.write('\t\t\t\t
- \n\t\t\t\t\t\t')
+ of.write('\t\t\t\t
- \n')
+ of.write('\t\t\t\t\t\t')
self.pedigree_family(of)
- of.write('\t\t\t\t
\n')
+ of.write('\t\t\t\t
- \n')
+ of.write('\t\t\t')
+
if father and mother:
- self.pedigree_person(of,father)
- of.write('\n\t\t\t\t
- \n\t\t\t\t\t')
- self.pedigree_person(of,mother,True)
- of.write('\n')
- of.write('\t\t\t\t\t\t
- \n')
- else:
- if father:
- self.pedigree_person(of,father)
- of.write('\n')
- of.write('\t\t\t\t
- \n')
- if mother:
- self.pedigree_person(of,mother,True)
- of.write('\n')
- of.write('\t\t\t\t
- \n')
+ self.pedigree_person(of,father)
+ of.write('\n')
+ of.write('\t\t\t\t
- \n')
+ of.write('\t\t\t\t\t')
+ self.pedigree_person(of,mother,True)
+ of.write('\n')
+ of.write('\t\t\t\t\t\t
- \n')
+ elif father:
+ self.pedigree_person(of,father)
+ of.write('\n')
+ of.write('\t\t\t\t
- \n')
+ elif mother:
+ self.pedigree_person(of,mother,True)
+ of.write('\n')
+ of.write('\t\t\t\t
- \n')
if family:
for child_ref in family.get_child_ref_list():
child_handle = child_ref.ref
if child_handle == self.person.handle:
of.write('\t\t\t\t\t\t\t
- \n')
+ of.write('\t\t\t\t
- \n')
for child_ref in child_ref_list:
child_handle = child_ref.ref
sibling.add(child_handle) # remember that we've already "seen" this child
if child_handle != self.person.handle:
self.display_child_link(of,child_handle)
- of.write('\t\t\t\t\t
- \n')
+ of.write('\t\t\t\t
- \n')
for child_handle in other_siblings:
self.display_child_link(of, child_handle)
- of.write('\t\t\t\t\t
- \n')
+ of.write('\t\t\t\t
- \n')
for child_ref in childlist:
self.display_child_link(of,child_ref.ref)
- of.write('\t\t\t\t\t
') + of.write('\t\t\t\t
') if format: - of.write( u"
%s" % text ) + of.write(u"
%s" % text ) else: - of.write( u"\n\t\t\t\t\t
".join(text.split("\n"))) - of.write('
\n\t\t\t\t".join(text.split("\n"))) + of.write('
\n') + of.write('\t\t\t\t\n') + of.write('\t\t\t\n') + + def pedigree_person(self, of, person, is_spouse=False): if is_spouse: of.write('- \n')
+ of.write('\n')
+ of.write('\t\t\t\t\t\t\t\t\t\t
- \n')
for child_ref in childlist:
of.write('\t\t\t\t\t\t\t\t\t\t\t')
child = self.db.get_person_from_handle(child_ref.ref)
@@ -2641,37 +2711,21 @@ class NavWebReport(Report):
self.write_css(archive,self.target_path,self.css)
# Copy Mainz Style Images
- from_path = os.path.join(const.IMAGE_DIR,"NWeb_Mainz_Bkgd.png")
- to_path = os.path.join("images","NWeb_Mainz_Bkgd.png")
- self.store_file(archive,self.target_path,from_path,to_path)
-
- from_path = os.path.join(const.IMAGE_DIR,"NWeb_Mainz_Header.png")
- to_path = os.path.join("images","NWeb_Mainz_Header.png")
- self.store_file(archive,self.target_path,from_path,to_path)
-
- from_path = os.path.join(const.IMAGE_DIR,"NWeb_Mainz_Mid.png")
- to_path = os.path.join("images","NWeb_Mainz_Mid.png")
- self.store_file(archive,self.target_path,from_path,to_path)
-
- from_path = os.path.join(const.IMAGE_DIR,"NWeb_Mainz_MidLight.png")
- to_path = os.path.join("images","NWeb_Mainz_MidLight.png")
- self.store_file(archive,self.target_path,from_path,to_path)
-
+ imgs = ["NWeb_Mainz_Bkgd.png",
+ "NWeb_Mainz_Header.png",
+ "NWeb_Mainz_Mid.png",
+ "NWeb_Mainz_MidLight.png",
+ "document.png",
+ "favicon.ico"]
# Copy the Creative Commons icon if the a Creative Commons
# license is requested
if 0 < self.copyright < 7:
- from_path = os.path.join(const.IMAGE_DIR,"somerights20.gif")
- to_path = os.path.join("images","somerights20.gif")
- self.store_file(archive,self.target_path,from_path,to_path)
+ imgs += ["somerights20.gif"]
- from_path = os.path.join(const.IMAGE_DIR,"document.png")
- to_path = os.path.join("images","document.png")
- self.store_file(archive,self.target_path,from_path,to_path)
-
- # Copy GRAMPS favicon.ico to images directory
- from_path = os.path.join(const.IMAGE_DIR,"favicon.ico")
- to_path = os.path.join("images","favicon.ico")
- self.store_file(archive,self.target_path,from_path,to_path)
+ for f in imgs:
+ from_path = os.path.join(const.IMAGE_DIR, f)
+ to_path = os.path.join("images", f)
+ self.store_file(archive, self.target_path, from_path, to_path)
place_list = {}
source_list = {}