Fixed a typing error from yesterday's open_file_with_default_application(). Completed work on default printer stylesheet also.
svn: r12702
This commit is contained in:
parent
d5ccd93043
commit
22ecedb061
@ -46,7 +46,8 @@ import gtk
|
||||
# gramps modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from gui.utils import open_file_with_default_applicationimport PageView
|
||||
from gui.utils import open_file_with_default_application
|
||||
import PageView
|
||||
import DisplayModels
|
||||
import ThumbNails
|
||||
import const
|
||||
|
@ -34,11 +34,6 @@ Color Palette
|
||||
White #FFF
|
||||
black #000
|
||||
|
||||
===== Ancestor Graph Color Scheme =====
|
||||
Males #E5F2FE
|
||||
Females #FFC0CB
|
||||
Unknown #000
|
||||
|
||||
===== Web Graphics =====
|
||||
Males Web_Gender_Male.png
|
||||
Females Web_Gender_Female.png
|
||||
@ -82,8 +77,6 @@ img {
|
||||
width:965px;
|
||||
margin:0 auto;
|
||||
padding-bottom:.5em;
|
||||
background-color:#FFF;
|
||||
color:#000;
|
||||
}
|
||||
.content div.snapshot {
|
||||
margin:0;
|
||||
@ -108,9 +101,6 @@ img {
|
||||
h1 {
|
||||
font:normal 2em/1.2em serif;
|
||||
}
|
||||
h2 {
|
||||
display:none;
|
||||
}
|
||||
h3 {
|
||||
font:normal 2em/1.2em serif;
|
||||
text-align:center;
|
||||
@ -120,7 +110,6 @@ h3 {
|
||||
}
|
||||
h4 {
|
||||
font:normal 1.2em/1.2em serif;
|
||||
color:#000;
|
||||
margin:0;
|
||||
padding:.2em 0 .2em 20px;
|
||||
border-bottom:solid 2px #000;
|
||||
@ -152,7 +141,10 @@ span.preposition {
|
||||
}
|
||||
.grampsid {
|
||||
font:normal .8em/1.2em monospace;
|
||||
}
|
||||
a {
|
||||
color:#000;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
/* Header
|
||||
@ -187,8 +179,6 @@ p#user_header {
|
||||
margin:0;
|
||||
padding:0;
|
||||
border-top:solid 2px #000;
|
||||
background-color:#FFF;
|
||||
color:#000;
|
||||
}
|
||||
#footer img {
|
||||
border:0;
|
||||
@ -240,11 +230,9 @@ table.infolist {
|
||||
width:100%;
|
||||
margin:0;
|
||||
padding:0;
|
||||
background-color:#FFF;
|
||||
}
|
||||
table.infolist thead tr th {
|
||||
font:normal 1.1em/1.2em serif;
|
||||
color:#000;
|
||||
margin:0;
|
||||
padding:.2em 10px;
|
||||
border-bottom:solid 1px #000;
|
||||
@ -255,7 +243,7 @@ table.infolist tr td {
|
||||
padding:.1em 10px;
|
||||
}
|
||||
table.infolist tr.BeginLetter td, table.infolist tr.BeginSurname td {
|
||||
border-top:solid 1px #453619;
|
||||
border-top:solid 1px #000;
|
||||
}
|
||||
table.infolist tr td.ColumnLetter {
|
||||
width:3%;
|
||||
@ -263,7 +251,6 @@ table.infolist tr td.ColumnLetter {
|
||||
}
|
||||
table.infolist tbody tr td.ColumnBirth {
|
||||
font-size:.9em;
|
||||
color:#000;
|
||||
width:10%;
|
||||
}
|
||||
table.infolist tbody tr td.ColumnDeath {
|
||||
@ -272,7 +259,6 @@ table.infolist tbody tr td.ColumnDeath {
|
||||
}
|
||||
table.infolist tbody tr td.ColumnRowLabel {
|
||||
width:2%;
|
||||
color:#000;
|
||||
padding-left:20px;
|
||||
}
|
||||
table.infolist tbody tr td.ColumnType {
|
||||
@ -309,28 +295,20 @@ table.surnamelist thead tr th a, table.surnamelist thead tr th a:visited {
|
||||
text-decoration:none;
|
||||
padding:.2em 10px;
|
||||
}
|
||||
table.surnamelist tr th:hover {
|
||||
background-color:#C1B398;
|
||||
}
|
||||
table.surnamelist thead tr th.ColumnLetter {
|
||||
padding-left:20px;
|
||||
padding-right:10px;
|
||||
}
|
||||
table#SortByName thead tr th.ColumnSurname, table#SortByCount thead tr th.ColumnQuantity {
|
||||
background-color:#C1B398;
|
||||
}
|
||||
table#SortByName thead tr th.ColumnSurname a:after, table#SortByCount thead tr th.ColumnQuantity a:after {
|
||||
content:" ↓";
|
||||
}
|
||||
table#SortByName tbody tr td.ColumnSurname {
|
||||
padding:0;
|
||||
background-color:#FFF;
|
||||
}
|
||||
table#SortByCount tbody tr td.ColumnQuantity {
|
||||
background-color:#FFF;
|
||||
}
|
||||
table.surnamelist tbody tr td.ColumnSurname:hover, table#SortByName tbody tr td.ColumnSurname:hover {
|
||||
background-color:#C1B398;
|
||||
|
||||
}
|
||||
table.surname {
|
||||
border-bottom:solid 1px #000;
|
||||
@ -373,8 +351,6 @@ table.individuallist tbody tr td.ColumnPartner {
|
||||
/* IndividualDetail
|
||||
------------------------------------------------------ */
|
||||
#IndividualDetail {
|
||||
background-color:#FFF;
|
||||
color:#000;
|
||||
}
|
||||
#IndividualDetail div table.infolist tr td {
|
||||
font:normal .9em/1.2em sans-serif;
|
||||
@ -417,16 +393,7 @@ table.individuallist tbody tr td.ColumnPartner {
|
||||
padding:0;
|
||||
}
|
||||
#GalleryNav {
|
||||
display:none'
|
||||
}
|
||||
#GalleryPages {
|
||||
margin:0 1em;
|
||||
}
|
||||
#GalleryCurrent {
|
||||
font:bold 1.2em/1em sans-serif;
|
||||
}
|
||||
#GalleryTotal {
|
||||
font-weight:normal;
|
||||
display:none;
|
||||
}
|
||||
#GalleryDisplay {
|
||||
margin:0 auto;
|
||||
@ -507,7 +474,6 @@ table.individuallist tbody tr td.ColumnPartner {
|
||||
padding-left:.5cm;
|
||||
padding-right:.5cm;
|
||||
height:390px;
|
||||
color:#000;
|
||||
}
|
||||
table.download {
|
||||
border:solid 2px #000;
|
||||
@ -548,7 +514,6 @@ table.download td.Filename {
|
||||
}
|
||||
table.download td.Modified {
|
||||
width:17%;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
/* Subsections
|
||||
@ -566,7 +531,6 @@ table.download td.Modified {
|
||||
}
|
||||
div.subsection{
|
||||
padding-bottom:.5em;
|
||||
background-color:#FFF;
|
||||
}
|
||||
div.subsection h4 {
|
||||
margin-bottom:.5em;
|
||||
@ -583,8 +547,6 @@ div.subsection table.infolist {
|
||||
----------------------------------------------------- */
|
||||
div#events {
|
||||
padding-bottom:0;
|
||||
height:2.5cm;
|
||||
overflow:auto;
|
||||
}
|
||||
div#events h4 {
|
||||
margin-bottom:0;
|
||||
@ -596,10 +558,8 @@ div#events h4 {
|
||||
line-height:12px;
|
||||
font-family:sans-serif;
|
||||
text-transform:uppercase;
|
||||
color:#000;
|
||||
padding-top:6px;
|
||||
padding-bottom:4px;
|
||||
background-color:#6AF364;
|
||||
}
|
||||
#IndividualDetail div#events table.eventtable {
|
||||
width:100%;
|
||||
@ -613,14 +573,13 @@ div#events h4 {
|
||||
padding-bottom:.8em;
|
||||
}
|
||||
#IndividualDetail div#events table.infolist tbody tr td.ColumnAttribute {
|
||||
border-bottom:solid 1px #453619;
|
||||
border-bottom:solid 1px #000;
|
||||
}
|
||||
#IndividualDetail div#events table.infolist tbody tr td.ColumnValue {
|
||||
border-bottom:solid 1px #453619;
|
||||
border-bottom:solid 1px #000;
|
||||
}
|
||||
table.infolist tbody tr td.ColumnValue p {
|
||||
font-family:sans-serif;
|
||||
color:#696969;
|
||||
margin:.2em 0 0 2em;
|
||||
}
|
||||
|
||||
@ -670,10 +629,10 @@ div#addresses table.infolist tbody tr td {
|
||||
}
|
||||
div#addresses table.infolist tbody tr td.ColumnAttribute {
|
||||
width:30%;
|
||||
border-bottom:solid 1px #453619;
|
||||
border-bottom:solid 1px #000;
|
||||
}
|
||||
div#addresses table.infolist tbody tr td.ColumnValue {
|
||||
border-bottom:solid 1px #453619;
|
||||
border-bottom:solid 1px #000;
|
||||
}
|
||||
|
||||
/* Subsections : Gallery
|
||||
@ -697,7 +656,7 @@ div#addresses table.infolist tbody tr td.ColumnValue {
|
||||
#indivgallery .thumbnail tr a img {
|
||||
margin:0;
|
||||
padding:0;
|
||||
border:solid 1px #453619;
|
||||
border:solid 1px #000;
|
||||
}
|
||||
#indivgallery div.thumbnail p {
|
||||
font:normal .7em/1.4em sans-serif;
|
||||
@ -725,8 +684,6 @@ div#narrative {
|
||||
/* Subsections : Source References
|
||||
----------------------------------------------------- */
|
||||
div#sourcerefs {
|
||||
height:2.5cm;
|
||||
overflow:auto;
|
||||
}
|
||||
div#sourcerefs ol {
|
||||
list-style-type:decimal;
|
||||
@ -743,7 +700,6 @@ div#summaryarea {
|
||||
div#summaryarea table.infolist {
|
||||
margin:0;
|
||||
padding:0;
|
||||
background:#FFF;
|
||||
border-bottom:solid .7em #FFF;
|
||||
}
|
||||
div#summaryarea table.infolist tr td, div#summaryarea table.infolist tr td p {
|
||||
@ -755,7 +711,6 @@ div#summaryarea table.infolist tr td a, div#summaryarea table.infolist tr td p a
|
||||
}
|
||||
div#summaryarea table.infolist tbody tr td.ColumnAttribute {
|
||||
width:14%;
|
||||
color:#696969;
|
||||
padding-left:20px;
|
||||
}
|
||||
|
||||
@ -793,7 +748,6 @@ div#pedigree {
|
||||
.spouse a {
|
||||
font-weight:normal;
|
||||
font-style:normal;
|
||||
color:#000;
|
||||
}
|
||||
.spouse:before {
|
||||
content: "+ ";
|
||||
@ -828,13 +782,11 @@ div#pedigree {
|
||||
font:normal .7em/1.4em sans-serif;
|
||||
text-align:center;
|
||||
text-decoration:none;
|
||||
color:#542;
|
||||
width:118px;
|
||||
padding:5px 20px 7px 20px;
|
||||
margin-top:-25px;
|
||||
margin-left:16px;
|
||||
background-color:#FFF;
|
||||
border:solid 1px #453619;
|
||||
border:solid 1px #000;
|
||||
}
|
||||
#treeContainer div.boxbg a.noThumb,
|
||||
#treeContainer div.AncCol3 a,
|
||||
@ -861,16 +813,14 @@ div#pedigree {
|
||||
}
|
||||
#treeContainer div.male a,
|
||||
#treeContainer div.male span.unlinked {
|
||||
background:url(../images/Web_Gender_Male.png) #BCEAF6 no-repeat top right;
|
||||
background:url(../images/Web_Gender_Male.png) #FFF no-repeat top right;
|
||||
}
|
||||
#treeContainer div.female a,
|
||||
#treeContainer div.female span.unlinked {
|
||||
background:url(../images/Web_Gender_Female.png) #FFC0CB no-repeat top right;
|
||||
background:url(../images/Web_Gender_Female.png) #FFF no-repeat top right;
|
||||
}
|
||||
#treeContainer div.unknown a,
|
||||
#treeContainer div.unknown span.unlinked {
|
||||
background-color:#000;
|
||||
color:#FAFAFA;
|
||||
}
|
||||
.shadow {
|
||||
display:none;
|
||||
@ -881,7 +831,7 @@ div#pedigree {
|
||||
height:1px;
|
||||
margin:0 0 0 16px;
|
||||
padding:0;
|
||||
background-color:#453619;
|
||||
background-color:#000;
|
||||
}
|
||||
#tree div div.bhline {
|
||||
position:absolute;
|
||||
@ -889,7 +839,7 @@ div#pedigree {
|
||||
width:1px;
|
||||
margin:0 0 0 16px;
|
||||
padding:0;
|
||||
background-color:#453619;
|
||||
background-color:#000;
|
||||
}
|
||||
.ghline, .gvline {
|
||||
display:none;
|
||||
@ -900,7 +850,6 @@ div#pedigree {
|
||||
/* Calendar : General */
|
||||
body#WebCal {
|
||||
padding:0 14px;
|
||||
background-color:#542;
|
||||
}
|
||||
.calendar {
|
||||
empty-cells:show;
|
||||
@ -926,28 +875,22 @@ body#WebCal {
|
||||
font-size:2em;
|
||||
line-height:100%;
|
||||
text-transform:none;
|
||||
color:#542;
|
||||
padding:.3em 0 .2em 0;
|
||||
background-color:#FFF;
|
||||
}
|
||||
#CreatorInfo {
|
||||
float:right;
|
||||
color:#FFF;
|
||||
margin:-24px 10px 0 0;
|
||||
}
|
||||
.calendar thead tr th.weekend,
|
||||
.calendar thead tr th.weekday {
|
||||
font-style:italic;
|
||||
color:#000;
|
||||
background-color:#6AF364;
|
||||
border:solid 2px #453619;
|
||||
border:solid 2px #000;
|
||||
}
|
||||
.calendar tfoot tr td {
|
||||
padding:.7em 5% 1em 5%;
|
||||
border-top:solid 2px #000;
|
||||
vertical-align:middle;
|
||||
color:#453619;
|
||||
background-color:#D8F3D6;
|
||||
}
|
||||
|
||||
/* Calendar : Date Numeral */
|
||||
@ -958,10 +901,8 @@ body#WebCal {
|
||||
font-size:1.2em;
|
||||
line-height:100%;
|
||||
text-align:center;
|
||||
color:#542;
|
||||
margin:0 0 0 .5em;
|
||||
padding:.2em 0;
|
||||
background-color:#D8F3D6;
|
||||
}
|
||||
|
||||
/* Calendar : Date Container */
|
||||
@ -971,22 +912,20 @@ body#WebCal {
|
||||
padding:0;
|
||||
border-width:1px 0 0 1px;
|
||||
border-style:solid;
|
||||
border-color:#453619;
|
||||
border-color:#000;
|
||||
}
|
||||
.calendar tbody tr td.weekday {
|
||||
background-color:#FFF;
|
||||
}
|
||||
.calendar tbody tr td.weekend {
|
||||
background-color:#D8F3D6;
|
||||
}
|
||||
.calendar tbody tr td.saturday {
|
||||
border-right:solid 1px #453619;
|
||||
border-right:solid 1px #000;
|
||||
}
|
||||
.calendar tbody tr td.sunday {
|
||||
border-left:solid 1px #453619;
|
||||
border-left:solid 1px #000;
|
||||
}
|
||||
.calendar tbody tr td:first-child {
|
||||
border-left:solid 1px #453619;
|
||||
border-left:solid 1px #000;
|
||||
}
|
||||
.calendar tbody tr:first-child td {
|
||||
border-top:none;
|
||||
@ -1005,7 +944,7 @@ body#WebCal {
|
||||
width:92%;
|
||||
margin:0 4%;
|
||||
padding:.2em 0 .3em 0;
|
||||
border-top:dashed 1px #453619;
|
||||
border-top:dashed 1px #000;
|
||||
}
|
||||
.calendar tbody tr td ul li:first-child {
|
||||
border:none;
|
||||
@ -1014,16 +953,12 @@ body#WebCal {
|
||||
/* Calendar : Birthday, Anniversary, Highlight */
|
||||
.calendar tbody tr td ul li em {
|
||||
font-style:normal;
|
||||
color:#0A65B5;
|
||||
}
|
||||
.calendar tbody tr td ul li span.yearsmarried em {
|
||||
color:#453619;
|
||||
}
|
||||
.calendar tbody tr td.highlight { }
|
||||
|
||||
.calendar tbody tr td.highlight div.date {
|
||||
color:#0A65B5;
|
||||
background-color:#C2E1FE;
|
||||
}
|
||||
|
||||
/* Calendar : Previous-Next Month */
|
||||
@ -1031,8 +966,6 @@ body#WebCal {
|
||||
.calendar tbody tr td.next,
|
||||
.calendar tbody tr td.previous div.date,
|
||||
.calendar tbody tr td.next div.date {
|
||||
color:#333;
|
||||
background-color:#D8F3D6;
|
||||
}
|
||||
|
||||
/* Calendar : Full Year */
|
||||
@ -1045,7 +978,7 @@ body#fullyearlinked table.calendar {
|
||||
float:left;
|
||||
width:320px;
|
||||
height:18em;
|
||||
border:solid 1px #453619;
|
||||
border:solid 1px #000;
|
||||
}
|
||||
body#fullyearlinked table.calendar thead tr th {
|
||||
height:2em;
|
||||
|
@ -331,80 +331,74 @@ class BasePage(object):
|
||||
name.set_display_as(name_format)
|
||||
return _nd.display_name(name)
|
||||
|
||||
def write_footer(self, counter, hyper=False):
|
||||
def write_footer(self):
|
||||
"""
|
||||
Will create and display the footer section of each page...
|
||||
"""
|
||||
db = self.report.database
|
||||
|
||||
footer = Html('div', id='footer')
|
||||
# begin footer division
|
||||
with Html('div', id='footer') as section:
|
||||
|
||||
# add top of page link
|
||||
if hyper and counter > 25:
|
||||
footer += Html('p', id='top', inline=True) + (
|
||||
Html('a', _('Top of Page'), id="top", href='#top'),
|
||||
Html('a', name='bottom', title=_('Bottom'))
|
||||
)
|
||||
footer_note = self.report.options['footernote']
|
||||
if footer_note:
|
||||
note = db.get_note_from_gramps_id(footer_note)
|
||||
note_text = note.get()
|
||||
if note_text:
|
||||
user_footer = Html('div', id='user_footer')
|
||||
section += user_footer
|
||||
|
||||
footer_note = self.report.options['footernote']
|
||||
if footer_note:
|
||||
note = db.get_note_from_gramps_id(footer_note)
|
||||
note_text = note.get()
|
||||
if note_text:
|
||||
user_footer = Html('div', id='user_footer')
|
||||
footer += user_footer
|
||||
|
||||
# styled notes
|
||||
htmlnotetext = self.styled_note(note.get_styledtext(),
|
||||
# styled notes
|
||||
htmlnotetext = self.styled_note(note.get_styledtext(),
|
||||
note.get_format())
|
||||
if htmlnotetext:
|
||||
text = htmlnotetext
|
||||
else:
|
||||
text = Html('p', note_text)
|
||||
user_footer += text
|
||||
if htmlnotetext:
|
||||
text = htmlnotetext
|
||||
else:
|
||||
text = Html('p', note_text)
|
||||
user_footer += text
|
||||
|
||||
value = _dd.display(date.Today())
|
||||
msg = _('Generated by <a href="%(homepage)s">'
|
||||
'GRAMPS</a> on %(date)s') % {
|
||||
'date': value, 'homepage' : const.URL_HOMEPAGE
|
||||
}
|
||||
value = _dd.display(date.Today())
|
||||
msg = _('Generated by <a href="%(homepage)s">'
|
||||
'GRAMPS</a> on %(date)s') % {
|
||||
'date': value, 'homepage' : const.URL_HOMEPAGE
|
||||
}
|
||||
|
||||
# optional "link-home" feature; see bug report #2736
|
||||
if self.report.options['linkhome']:
|
||||
home_person = db.get_default_person()
|
||||
if home_person:
|
||||
home_person_url = self.report.build_url_fname_html(home_person.handle, 'ppl', self.up)
|
||||
home_person_name = self.get_name(home_person)
|
||||
msg += _(' Created for <a href="%s">%s</a>') % (
|
||||
home_person_url, home_person_name)
|
||||
# optional "link-home" feature; see bug report #2736
|
||||
if self.report.options['linkhome']:
|
||||
home_person = db.get_default_person()
|
||||
if home_person:
|
||||
home_person_url = self.report.build_url_fname_html(home_person.handle, 'ppl', self.up)
|
||||
home_person_name = self.get_name(home_person)
|
||||
msg += _(' Created for <a href="%s">%s</a>') % (
|
||||
home_person_url, home_person_name)
|
||||
|
||||
# create date
|
||||
footer += Html('p', msg, id='createdate')
|
||||
# creation date
|
||||
section += Html('p', msg, id='createdate')
|
||||
|
||||
# get copyright license for all pages
|
||||
copy_nr = self.report.copyright
|
||||
# get copyright license for all pages
|
||||
copy_nr = self.report.copyright
|
||||
|
||||
text = ''
|
||||
if copy_nr == 0:
|
||||
if self.author:
|
||||
year = date.Today().get_year()
|
||||
text = '© %(year)d %(person)s' % {
|
||||
'person' : self.author,
|
||||
'year' : year}
|
||||
elif 0 < copy_nr <= len(_CC):
|
||||
# Note. This is a URL
|
||||
fname = '/'.join(["images", "somerights20.gif"])
|
||||
url = self.report.build_url_fname(fname, None, self.up)
|
||||
text = _CC[copy_nr] % {'gif_fname' : url}
|
||||
footer += Html('p', text, id='copyright')
|
||||
text = ''
|
||||
if copy_nr == 0:
|
||||
if self.author:
|
||||
year = date.Today().get_year()
|
||||
text = '© %(year)d %(person)s' % {
|
||||
'person' : self.author,
|
||||
'year' : year}
|
||||
elif 0 < copy_nr <= len(_CC):
|
||||
# Note. This is a URL
|
||||
fname = '/'.join(["images", "somerights20.gif"])
|
||||
url = self.report.build_url_fname(fname, None, self.up)
|
||||
text = _CC[copy_nr] % {'gif_fname' : url}
|
||||
section += Html('p', text, id='copyright')
|
||||
|
||||
# add clear line for proper styling
|
||||
footer += fullclear
|
||||
# add clear line for proper styling
|
||||
section += fullclear
|
||||
|
||||
# return footer to its caller
|
||||
return footer
|
||||
return section
|
||||
|
||||
def write_header(self, title, hyper=False):
|
||||
def write_header(self, title):
|
||||
"""
|
||||
Note. 'title' is used as currentsection in the navigation links and
|
||||
as part of the header title.
|
||||
@ -465,13 +459,6 @@ class BasePage(object):
|
||||
)
|
||||
body += headerdiv
|
||||
|
||||
# add bottom link
|
||||
if hyper:
|
||||
headerdiv += Html('p', id='bottom', inline=True) + (
|
||||
Html('a', id="bottom", href='#bottom', inline=True),
|
||||
Html('a', name='top')
|
||||
)
|
||||
|
||||
header_note = self.report.options['headernote']
|
||||
if header_note:
|
||||
note = db.get_note_from_gramps_id(header_note)
|
||||
@ -948,11 +935,8 @@ class IndividualListPage(BasePage):
|
||||
showpartner = report.options['showpartner']
|
||||
showparents = report.options['showparents']
|
||||
|
||||
# add top of page link
|
||||
counter = len(person_handle_list)
|
||||
|
||||
of = self.report.create_file("individuals")
|
||||
indlistpage, body = self.write_header(_('Individuals'), hyper=True)
|
||||
indlistpage, body = self.write_header(_('Individuals'))
|
||||
|
||||
# begin Individuals division
|
||||
with Html('div', class_='content', id='Individuals') as section:
|
||||
@ -979,9 +963,9 @@ class IndividualListPage(BasePage):
|
||||
thead += trow
|
||||
|
||||
# Table Header -- Surname and Given name columns
|
||||
trow += Html('th', _('Surname'), class_='ColumnSurname') + (
|
||||
Html('th', _('Name'), class_='ColumnName', inline=True)
|
||||
)
|
||||
tcell1 = Html('th', _('Surname'), class_='ColumnSurname', inline=True)
|
||||
tcell2 = Html('th', _('Name'), class_='ColumnName', inline=True)
|
||||
trow += (tcell1, tcell2)
|
||||
|
||||
# table header -- show birth column
|
||||
if showbirth:
|
||||
@ -1125,10 +1109,11 @@ class IndividualListPage(BasePage):
|
||||
|
||||
# create clear line for proper styling
|
||||
# create footer section
|
||||
footer = self.write_footer(counter, hyper=True)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(indlistpage, of)
|
||||
|
||||
class SurnamePage(BasePage):
|
||||
@ -1279,13 +1264,13 @@ class SurnamePage(BasePage):
|
||||
trow += tcell
|
||||
tbody += trow
|
||||
|
||||
# add surnames table
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(surnamepage, of)
|
||||
|
||||
class PlaceListPage(BasePage):
|
||||
@ -1295,11 +1280,8 @@ class PlaceListPage(BasePage):
|
||||
self.src_list = src_list # TODO verify that this is correct
|
||||
db = report.database
|
||||
|
||||
# add top of page link
|
||||
counter = len(place_handles)
|
||||
|
||||
of = self.report.create_file("places")
|
||||
placelistpage, body = self.write_header(_('Places'), hyper=True)
|
||||
placelistpage, body = self.write_header(_('Places'))
|
||||
|
||||
# begin places division
|
||||
with Html('div', class_='content', id='Places') as section:
|
||||
@ -1310,7 +1292,7 @@ class PlaceListPage(BasePage):
|
||||
"title will take you to that place’s page.")
|
||||
section += Html('p', msg, id='description')
|
||||
|
||||
# begin alphabetic navigation
|
||||
# begin alphabet navigation
|
||||
alpha_nav = alphabet_navigation(db, place_handles, _PLACE)
|
||||
if alpha_nav is not None:
|
||||
section += alpha_nav
|
||||
@ -1369,10 +1351,11 @@ class PlaceListPage(BasePage):
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
footer = self.write_footer(counter, hyper=True)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(placelistpage, of)
|
||||
|
||||
class PlacePage(BasePage):
|
||||
@ -1468,10 +1451,11 @@ class PlacePage(BasePage):
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(placepage, of)
|
||||
|
||||
class MediaPage(BasePage):
|
||||
@ -1746,10 +1730,11 @@ class MediaPage(BasePage):
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(mediapage, of)
|
||||
|
||||
def gallery_nav_link(self, handle, name, up=False):
|
||||
@ -1850,15 +1835,12 @@ class SurnameListPage(BasePage):
|
||||
BasePage.__init__(self, report, title)
|
||||
db = report.database
|
||||
|
||||
# amount of surnames to be created
|
||||
counter = len(person_handle_list)
|
||||
|
||||
if order_by == self.ORDER_BY_NAME:
|
||||
of = self.report.create_file(filename)
|
||||
surnamelist, body = self.write_header(_('Surnames'), hyper=True)
|
||||
surnamelist, body = self.write_header(_('Surnames'))
|
||||
else:
|
||||
of = self.report.create_file("surnames_count")
|
||||
surnamelist, body = self.write_header(_('Surnames by person count'), hyper=True)
|
||||
surnamelist, body = self.write_header(_('Surnames by person count'))
|
||||
|
||||
# begin surnames division
|
||||
with Html('div', class_='content', id='surnames') as section:
|
||||
@ -1942,7 +1924,7 @@ class SurnameListPage(BasePage):
|
||||
with Html('td', class_='ColumnLetter', inline=True) as tcell:
|
||||
trow += tcell
|
||||
tcell += Html('a', last_letter, name=last_letter)
|
||||
with Html('td', class_='ColumnSurname', inline=True) as tcell:
|
||||
with Html('td', class_='ColumnSurname') as tcell:
|
||||
trow += tcell
|
||||
tcell += self.surname_link(name_to_md5(surname), surname)
|
||||
elif surname != last_surname:
|
||||
@ -1950,7 +1932,7 @@ class SurnameListPage(BasePage):
|
||||
tbody += trow
|
||||
with Html('td', ' ', class_='ColumnLetter', inline=True) as tcell:
|
||||
trow += tcell
|
||||
with Html('td', class_='ColumnSurname', inline=True) as tcell:
|
||||
with Html('td', class_='ColumnSurname') as tcell:
|
||||
trow += tcell
|
||||
tcell += self.surname_link(name_to_md5(surname), surname)
|
||||
last_surname = surname
|
||||
@ -1959,11 +1941,11 @@ class SurnameListPage(BasePage):
|
||||
|
||||
# create footer section
|
||||
# add clearline for proper styling
|
||||
# bring all body pieces together
|
||||
footer = self.write_footer(counter, hyper=True)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(surnamelist, of)
|
||||
|
||||
def surname_link(self, fname, name, opt_val=None, up=False):
|
||||
@ -2013,10 +1995,11 @@ class IntroductionPage(BasePage):
|
||||
|
||||
# add clearline for proper styling
|
||||
# create footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(intropage, of)
|
||||
|
||||
class HomePage(BasePage):
|
||||
@ -2056,10 +2039,11 @@ class HomePage(BasePage):
|
||||
|
||||
# create clear line for proper styling
|
||||
# create footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(homepage, of)
|
||||
|
||||
class SourceListPage(BasePage):
|
||||
@ -2068,11 +2052,8 @@ class SourceListPage(BasePage):
|
||||
BasePage.__init__(self, report, title)
|
||||
db = report.database
|
||||
|
||||
# add bottom and top links
|
||||
counter = len(handle_set)
|
||||
|
||||
of = self.report.create_file("sources")
|
||||
sourcelistpage, body = self.write_header(_('Sources'), hyper=True)
|
||||
sourcelistpage, body = self.write_header(_('Sources'))
|
||||
|
||||
# begin source list division
|
||||
with Html('div', class_='content', id='sources') as section:
|
||||
@ -2121,10 +2102,11 @@ class SourceListPage(BasePage):
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
footer = self.write_footer(counter=0, hyper=True)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(sourcelistpage, of)
|
||||
|
||||
class SourcePage(BasePage):
|
||||
@ -2192,10 +2174,11 @@ class SourcePage(BasePage):
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(sourcepage, of)
|
||||
|
||||
class MediaListPage(BasePage):
|
||||
@ -2208,7 +2191,7 @@ class MediaListPage(BasePage):
|
||||
counter = len(self.report.photo_list)
|
||||
|
||||
of = self.report.create_file("gallery")
|
||||
medialistpage, body = self.write_header(_('Gallery'), hyper=True)
|
||||
medialistpage, body = self.write_header(_('Gallery'))
|
||||
|
||||
# begin gallery division
|
||||
with Html('div', class_='content', id='Gallery') as section:
|
||||
@ -2265,10 +2248,11 @@ class MediaListPage(BasePage):
|
||||
|
||||
# add footer section
|
||||
# add clearline for proper styling
|
||||
footer = self.write_footer(counter, hyper=True)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(medialistpage, of)
|
||||
|
||||
def media_ref_link(self, handle, name, up=False):
|
||||
@ -2422,10 +2406,11 @@ class DownloadPage(BasePage):
|
||||
|
||||
# clear line for proper styling
|
||||
# create footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(downloadpage, of)
|
||||
|
||||
class ContactPage(BasePage):
|
||||
@ -2493,10 +2478,11 @@ class ContactPage(BasePage):
|
||||
|
||||
# add clearline for proper styling
|
||||
# add footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for porcessing
|
||||
# and close the file
|
||||
self.mywriter(contactpage, of)
|
||||
|
||||
class IndividualPage(BasePage):
|
||||
@ -2606,14 +2592,16 @@ class IndividualPage(BasePage):
|
||||
# display ancestor tree
|
||||
if report.options['graph']:
|
||||
sect12 = self.display_tree()
|
||||
section += sect12
|
||||
if sect12 is not None:
|
||||
section += sect12
|
||||
|
||||
# add clearline for proper styling
|
||||
# create footer section
|
||||
footer = self.write_footer(counter=0)
|
||||
footer = self.write_footer()
|
||||
body += (fullclear, footer)
|
||||
|
||||
# send page out for processing
|
||||
# and close the file
|
||||
self.mywriter(indivdetpage, of)
|
||||
|
||||
def display_attr_list(self, attrlist=None):
|
||||
|
Loading…
Reference in New Issue
Block a user