* src/AddSpouse.py: remove unnecessary commit via add_family

* src/NavWebPage.py: move more HTML commands to CSS
* src/data/main*.css: add support for HTML control from NavWebPage


svn: r5107
This commit is contained in:
Don Allingham
2005-08-18 22:07:31 +00:00
parent 6a4b19417d
commit 4f6f7eb94f
8 changed files with 1007 additions and 873 deletions

View File

@ -1,3 +1,10 @@
2005-08-18 Don Allingham <don@gramps-project.org>
* src/AddSpouse.py: remove unnecessary commit via add_family
2005-08-18 Mark Knoop <mark@markknoop.com>
* src/NavWebPage.py: move more HTML commands to CSS
* src/data/main*.css: add support for HTML control from NavWebPage
2005-08-18 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* doc/gramps-manual/C/custom.xml: Match against DTD
* doc/gramps-manual/C/usage.xml: Match against DTD

View File

@ -273,7 +273,9 @@ class AddSpouse:
if not self.active_family:
self.active_family = RelLib.Family()
self.db.add_family(self.active_family,trans)
gid = self.db.find_next_family_gramps_id()
self.active_family.set_gramps_id(gid)
self.active_family.set_handle(self.db.create_id())
self.person.add_family_handle(self.active_family.get_handle())
self.db.commit_person(self.person,trans)

View File

@ -4,81 +4,13 @@
/* Standard Tags {{{1
*/
BODY {
font-family: "Arial", "Helvetica", sans-serif;
font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;
background-color: #ffffff;
}
P,BLOCKQUOTE {
font-size: 14px;
}
DIV {
margin: 2px;
padding: 2px;
}
TD {
vertical-align: top;
}
H1 {
font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;
font-weight: bolder;
font-size: 160%;
margin: 2px;
}
H2 {
font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;
font-weight: bolder;
font-style: italic;
font-size: 150%;
}
H3 {
font-weight: bold;
margin: 0;
padding-top: 10px;
padding-bottom: 10px;
}
H4 {
margin-top: 1em;
margin-bottom: 0.3em;
padding-left: 4px;
}
H5 {
margin-bottom: 0.5em;
}
H6 {
font-weight: normal;
font-style: italic;
font-size: 100%;
margin-left: 1em;
margin-top: 1.3em;
margin-bottom: 0.8em;
}
HR {
height: 1px;
width: 100%;
margin: 0;
margin-top: 1px;
margin-bottom: 0;
padding: 0;
border-top: 0; /* Hack: Mozilla work-around to eliminate "groove" */
border-color: #000;
}
A:link {
color: #000;
text-decoration: underline;
}
A:visited {
color: #333;
text-decoration: underline;
}
A:hover {
background-color: #eee;
color: #000;
@ -89,150 +21,217 @@ A:active {
color: #000;
text-decoration: none;
}
A:visited {
color: #333;
text-decoration: underline;
}
DIV {
margin: 2px;
padding: 2px;
}
P {
font-size: 14px;
}
H1 {
/*font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;*/
font-weight: bolder;
font-size: 160%;
margin: 2px;
}
H2 {
/*font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;*/
font-weight: bolder;
font-style: italic;
font-size: 150%;
}
H3 {
font-weight: bold;
margin: 0;
padding: 10px 0px 10px 0px;
}
H4 {
margin: 1em 0em 0.3em 0em;
padding-left: 4px;
border-bottom: 1px solid #999;
}
H5 {
margin-bottom: 0.5em;
}
H6 {
font: italic normal 100%;
margin: 1.3em 0em 1em 0.8em;
}
IMG {
border: none;
}
SUP {
line-height: 0;
}
TABLE {
border: none;
border-collapse: collapse;
}
TH {
padding: 1px 3em 1px 1px;
font-weight: bold;
text-align: left;
}
TD {
vertical-align: top;
padding: 0;
}
/* Custom {{{1
*/
.navheader {
/* main data table */
TABLE.infolist {
border: 0;
/*width: 100%;*/
font-size: 14px;
margin: 0em 2em 0em 2em;
}
TABLE.infolist TH {
border-bottom: 1px solid #999;
}
TABLE.infolist TH A {
text-decoration: none;
}
TABLE.infolist TR > TD:first-child {
min-width: 6em;
}
TD.category {
padding: 1px 3em 1px 1px; /* Defines spacing between rows */
/*width: 10%;*/
font-weight: bold;
}
TD.data {
padding: 1px 3em 1px 1px; /* Defines spacing between rows */
font-weight: bold;
}
TD.field {
padding: 1px 3em 1px 1px; /* Defines spacing between rows */
/*width: 15%;*/
}
/* float left and right */
.leftwrap {
float: left;
margin: 2px 10px 2px 2px;
}
.rightwrap {
float: right;
margin: 2px 2px 10px 2px;
}
.centered {
text-align: center;
}
/* navigation links */
#navheader {
padding: 2px;
margin: 2px;
border-bottom: 1px solid #999;
}
.navtitle {
font-size: 130%;
color: #999;
margin: 3px;
}
.navbyline {
float: right;
font-size: 14px;
margin: 2px;
padding: 2px;
padding-right: 10px;
padding: 2px 10px 2px 2px;
}
.nav {
margin: 0;
margin-bottom: 4px;
margin: 0px 0px 4px 0px;
padding: 1px;
font-size: 12px;
font-weight: bold;
word-spacing: 0.5em;
}
.summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
/* image display */
.img_navbar {
margin: 0px 0px 4px 0px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
.portrait {
justify: center;
margin: 5px;
margin-right: 20px;
text-align: center;
margin: 5px 20px 5px 5px;
padding: 3px;
border-color: #000;
border-width: 1px;
}
.snapshot {
float: right;
margin: 5px;
margin-right: 20px;
margin: 5px 20px 5px 5px;
padding: 3px;
}
.thumbnail {
height: 100px;
border-color: #000;
border-width: 1px;
margin: 0em 2em 0em 2em;
}
.leftwrap {
float: left;
margin: 2px;
margin-right: 10px;
}
.rightwrap {
float: right;
margin: 2px;
margin-left: 10px;
}
TABLE.infolist {
border: 0;
/*width: 100%;*/
font-size: 14px;
}
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
TD.category {
padding: 1px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 10%;*/
font-weight: bold;
}
TD.field {
padding: 1px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 15%;*/
}
TD.data {
padding: 1px; /* Defines spacing between rows */
padding-right: 3em;
font-weight: bold;
}
.pedigree {
.thumbnail p {
margin: 0;
margin-left: 2em;
padding: 0;
font-size: smaller;
}
/* pedigree display */
#pedigree { }
.pedigreebox {
margin: 0.5em 0em 0em 2em;
padding: 0;
background-color: #eeeeee;
border: 1px;
}
.pedigreeind {
.pedigreegen {
font-size: 14px;
margin: 0;
padding: 2em;
padding-top: 0.25em;
padding-bottom: 0.5em;
padding: 0.25em 2em 0.5em 2em;
}
.footer {
margin: 1em;
.spouse {
font-style: italic;
}
.spouse:before {
content: "+ ";
}
.thisperson {
font-weight: bold;
}
/* other section ids */
#content { }
#summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
}
#footer {
border-top: 1px solid #999;
border-bottom: 1px solid #999;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
.fullclear {
clear: both;
}
#copyright {
margin: 0.5em 1em 0 0;
font-size: 12px;
float: right;
}
#attributes { }
#events { }
#families { }
#gallery { }
#narrative { }
#parents { }
#references { }
#researcher { }
#sourcerefs { }
#weblinks { }
/* 1}}}
vim:foldmethod=marker
/*
*/

View File

@ -4,81 +4,14 @@
/* Standard Tags {{{1
*/
BODY {
font-family: "Arial", "Helvetica", sans-serif;
font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;
background-color: #fafaff;
color: #003;
}
P,BLOCKQUOTE {
font-size: 14px;
}
DIV {
margin: 2px;
padding: 2px;
}
TD {
vertical-align: top;
}
H1 {
font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;
font-weight: bolder;
font-size: 160%;
margin: 2px;
}
H2 {
font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;
font-weight: bolder;
font-style: italic;
font-size: 150%;
}
H3 {
font-weight: bold;
margin: 0;
padding-top: 10px;
padding-bottom: 10px;
color: #336;
}
H4 {
margin-top: 1em;
margin-bottom: 0.3em;
padding-left: 4px;
background-color: #667;
color: #fff;
}
H5 {
margin-bottom: 0.5em;
}
H6 {
font-weight: normal;
font-style: italic;
font-size: 100%;
margin-left: 1em;
margin-top: 1.3em;
margin-bottom: 0.8em;
}
HR {
height: 0;
width: 0;
margin: 0;
margin-top: 1px;
margin-bottom: 1px;
padding: 0;
border-top: 0; /* Hack: Mozilla work-around to eliminate "groove" */
border-color: #e0e0e9;
}
A:link {
color: #006;
text-decoration: underline;
}
A:visited {
color: #669;
text-decoration: underline;
}
A:hover {
background-color: #eef;
color: #000;
@ -89,14 +22,113 @@ A:active {
color: #000;
text-decoration: none;
}
A:visited {
color: #669;
text-decoration: underline;
}
DIV {
margin: 2px;
padding: 2px;
}
P {
font-size: 14px;
}
H1 {
/*font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;*/
font-weight: bolder;
font-size: 160%;
margin: 2px;
}
H2 {
/*font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;*/
font-weight: bolder;
font-style: italic;
font-size: 150%;
}
H3 {
font-weight: bold;
margin: 0;
padding: 10px 0px 10px 0px;
color: #336;
}
H4 {
margin: 1em 0em 0.3em 0em;
padding-left: 4px;
background-color: #667;
color: #fff;
}
H5 {
margin-bottom: 0.5em;
}
H6 {
font: italic normal 100%;
margin: 1.3em 0em 0.8em 1em;
}
IMG {
border: none;
}
SUP {
line-height: 0;
}
TABLE {
border: none;
border-collapse: collapse;
}
TH {
padding: 1px 3em 1px 1px;
font-weight: bold;
text-align: left;
}
TD {
vertical-align: top;
padding: 0;
}
/* Custom {{{1
*/
.navheader {
/* main data table */
TABLE.infolist {
border: 0;
/*width: 100%;*/
font-size: 14px;
margin: 0em 2em 0em 2em;
}
TABLE.infolist TH {
border-bottom: 1px solid #669;
}
TABLE.infolist TH A {
text-decoration: none;
}
TABLE.infolist TR > TD:first-child {
min-width: 6em;
}
TD.category {
padding: 3px 3em 3px 3px; /* Defines spacing between rows */
/*width: 10%;*/
font-weight: bold;
}
TD.data {
padding: 3px 3em 3px 3px; /* Defines spacing between rows */
font-weight: bold;
}
TD.field {
padding: 3px 3em 3px 3px; /* Defines spacing between rows */
/*width: 15%;*/
}
/* float left and right */
.leftwrap {
float: left;
margin: 2px 10px 2px 2px;
}
.rightwrap {
float: right;
margin: 2px 2px 10px 2px;
}
.centered {
text-align: center;
}
/* navigation links */
#navheader {
padding: 4px;
background-color: #e0e0e9;
margin: 2px;
@ -114,109 +146,94 @@ SUP {
padding: 4px;
}
.nav {
margin: 0;
margin-bottom: 4px;
margin: 0 0 4px 0;
padding: 0;
font-size: 14px;
font-weight: bold;
word-spacing: 0.5em;
}
.summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
/* image display */
.img_navbar {
margin: 0 0 4px 0;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
.portrait {
justify: center;
margin: 5px;
margin-right: 20px;
text-align: center;
margin: 5px 20px 5px 5px;
padding: 3px;
border-color: #336;
border-width: 1px;
}
.snapshot {
float: right;
margin: 5px;
margin-right: 20px;
margin: 5px 20px 5px 5px;
padding: 3px;
}
.thumbnail {
height: 100px;
border-color: #336;
border-width: 1px;
margin: 0em 2em 0em 2em;
}
.leftwrap {
float: left;
margin: 2px;
margin-right: 10px;
}
.rightwrap {
float: right;
margin: 2px;
margin-left: 10px;
}
TABLE.infolist {
border: 0;
/*width: 100%;*/
font-size: 14px;
}
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
TD.category {
padding: 3px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 10%;*/
font-weight: bold;
}
TD.field {
padding: 3px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 15%;*/
}
TD.data {
padding: 3px; /* Defines spacing between rows */
padding-right: 3em;
font-weight: bold;
}
.pedigree {
.thumbnail p {
margin: 0;
margin-left: 2em;
padding: 0;
font-size: smaller;
}
/* pedigree display */
#pedigree { }
.pedigreebox {
margin: 0.5em 2em 0 2em;
padding: 0;
background-color: #e0e0e9;
border: 1px;
}
.pedigreeind {
.pedigreegen {
font-size: 14px;
margin: 0;
padding: 2em;
padding-top: 0.25em;
padding-bottom: 0.5em;
padding: 0.5em 0em 0.5em 2em;
}
.footer {
margin: 1em;
.spouse {
font-style: italic;
}
.spouse:before {
content: "+ ";
}
.thisperson {
font-weight: bold;
}
/* other section ids */
#content { }
#summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
}
#footer {
background-color: #e0e0e9;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
.fullclear {
clear: both;
}
#copyright {
margin: 0.5em 1em 0 0;
font-size: 12px;
float: right;
}
#attributes { }
#events { }
#families { }
#gallery { }
#narrative { }
#parents { }
#references { }
#researcher { }
#sourcerefs { }
#weblinks { }
/* 1}}}
vim:foldmethod=marker
/*
*/

View File

@ -8,20 +8,31 @@ BODY {
background-color: #fffffd;
}
P,BLOCKQUOTE {
font-size: 14px;
A:link {
color: #110;
text-decoration: underline;
}
A:hover {
background-color: #eed;
color: #110;
text-decoration: underline;
}
A:active {
background-color: #eee;
color: #110;
text-decoration: none;
}
A:visited {
color: #665;
text-decoration: underline;
}
DIV {
margin: 2px;
padding: 2px;
}
TD {
vertical-align: top;
P {
font-size: 14px;
}
H1 {
font-weight: bolder;
font-size: 160%;
@ -37,14 +48,11 @@ H3 {
margin: 0;
padding-left: 2em;
padding-bottom: 10px;
}
H4 {
margin-top: 1em;
margin-bottom: 0.3em;
padding-left: 2em;
}
H5 {
margin-bottom: 0.5em;
@ -57,46 +65,79 @@ H6 {
margin-top: 1.3em;
margin-bottom: 0.8em;
}
HR {
height: 0;
width: 0;
margin: 0;
margin-top: 1px;
margin-bottom: 1px;
padding: 0;
border-top: 1; /* Hack: Mozilla work-around to eliminate "groove" */
border-color: #ccf;
IMG {
border: none;
}
A:link {
color: #110;
text-decoration: underline;
}
A:visited {
color: #665;
text-decoration: underline;
}
A:hover {
background-color: #eed;
color: #110;
text-decoration: underline;
}
A:active {
background-color: #eee;
color: #110;
text-decoration: none;
}
SUP {
line-height: 0;
}
TABLE {
border: none;
border-collapse: collapse;
}
TH {
padding: 1px;
padding-right: 3em;
font-weight: bold;
text-align: left;
}
TD {
vertical-align: top;
padding: 0;
}
/* Custom {{{1
*/
.navheader {
/* main data table */
TABLE.infolist {
border: 0;
/*width: 100%;*/
font-size: 14px;
margin: 0em 2em 0em 2em;
}
TABLE.infolist TH {
background-color: #f6f6f0;
}
TABLE.infolist TH A {
text-decoration: none;
}
TABLE.infolist TR > TD:first-child {
min-width: 6em;
}
TD.category {
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 10%;*/
font-weight: bold;
}
TD.data {
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
font-weight: bold;
}
TD.field {
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 20%;*/
background-color: #f6f6f0;
}
/* float left and right */
.leftwrap {
float: left;
margin: 2px;
margin-right: 10px;
}
.rightwrap {
float: right;
margin: 2px;
margin-left: 10px;
}
.centered {
text-align: center;
}
/* navigation links */
#navheader {
padding: 4px;
margin: 2px;
}
.navtitle {
@ -120,17 +161,19 @@ SUP {
text-align: center;
padding: 4px;
background-color: #ddddcc;
word-spacing: 0.5em;
}
.summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
/* image display */
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
.portrait {
justify: center;
text-align: center;
margin: 5px;
margin-right: 20px;
padding: 3px;
@ -144,78 +187,69 @@ SUP {
padding: 3px;
}
.thumbnail {
height: 100px;
border-color: #110;
border-width: 1px;
margin: 0em 2em 0em 2em;
}
.leftwrap {
float: left;
margin: 2px;
margin-right: 10px;
}
.rightwrap {
float: right;
margin: 2px;
margin-left: 10px;
}
TABLE.infolist {
border: 0;
/*width: 100%;*/
font-size: 14px;
}
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
TD.category {
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 10%;*/
font-weight: bold;
}
TD.field {
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 20%;*/
background-color: #f6f6f0;
}
TD.data {
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
font-weight: bold;
}
.pedigree {
.thumbnail p {
margin: 0;
margin-left: 2em;
padding: 0;
font-size: smaller;
}
/* pedigree display */
#pedigree { }
.pedigreebox {
margin: 0.5em 2em 0 2em;
padding: 0;
background-color: #f6f6f0;
border: 1px;
}
.pedigreeind {
.pedigreegen {
font-size: 14px;
margin: 0;
padding: 2em;
padding-top: 0.25em;
padding-bottom: 0.5em;
}
.footer {
margin: 1em;
margin-left: 2em;
font-size: 12px;
/*float: right;*/
.spouse {
font-style: italic;
}
.spouse:before {
content: "+ ";
}
.thisperson {
font-weight: bold;
}
/* other section ids */
#content { }
#summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
}
#footer {
background-color: #ddddcc;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
.fullclear {
clear: both;
}
#copyright {
margin: 0.5em 1em 0 0;
font-size: 12px;
float: right;
}
#attributes { }
#events { }
#families { }
#gallery { }
#narrative { }
#parents { }
#references { }
#researcher { }
#sourcerefs { }
#weblinks { }
/* 1}}}
vim:foldmethod=marker
/*
*/

View File

@ -4,80 +4,11 @@
/* Standard Tags {{{1
*/
BODY {
font-family: "Times New Roman", "Times", serif;
font-family: "Georgia", "Bitstream Vera Serif", "Times New Roman", "Times", serif;
background-color: #fff;
color: #320;
font-size: 16px;
font-size: 14px;
}
P,BLOCKQUOTE {
}
DIV {
margin: 2px;
padding: 2px;
}
TD {
vertical-align: top;
}
H1 {
font-family: "Georgia", "Bistream Vera Serif", "Times New Roman", "Times", serif;
font-weight: bolder;
font-size: 160%;
margin: 2px;
}
H2 {
font-family: "Georgia", "Bistream Vera Serif", "Times New Roman", "Times", serif;
font-weight: bolder;
font-style: italic;
font-size: 150%;
}
H3 {
font-weight: bold;
font-size: 130%;
margin: 0;
margin-top: 8px;
/*padding-left: 2em;*/
padding-bottom: 10px;
}
H4 {
margin-top: 1em;
margin-bottom: 0;
padding: 0;
/*padding-left: 2em;*/
font-size: 110%;
}
H5 {
margin-bottom: 0.5em;
}
H6 {
font-weight: normal;
font-style: italic;
font-size: 100%;
margin-left: 1em;
margin-top: 1.3em;
margin-bottom: 0.8em;
}
HR {
height: 6px;
width: 100%;
margin: 0;
color: #a97;
padding: 2px;
/*border-top: 0; |+ Hack: Mozilla work-around to eliminate "groove" +|*/
border-color: #a97;
background-color: #a97;
}
A:link {
color: #430;
text-decoration: underline;
@ -96,18 +27,126 @@ A:active {
color: #210;
text-decoration: none;
}
DIV {
margin: 2px;
padding: 2px;
}
P {
}
H1 {
/*font-family: "Georgia", "Bitstream Vera Serif", "Times New Roman", "Times", serif;*/
font-weight: bolder;
font-size: 160%;
margin: 2px;
}
H2 {
/*font-family: "Georgia", "Bitstream Vera Serif", "Times New Roman", "Times", serif;*/
font-weight: bolder;
font-style: italic;
font-size: 150%;
}
H3 {
font-weight: bold;
font-size: 130%;
margin: 0;
margin-top: 8px;
/*padding-left: 2em;*/
padding-bottom: 10px;
}
H4 {
margin-top: 1em;
margin-bottom: 0.5em;
padding: 0;
/*padding-left: 2em;*/
font-size: 110%;
border-bottom: 6px solid #a97;
}
H5 {
margin-bottom: 0.5em;
}
H6 {
font-weight: normal;
font-style: italic;
font-size: 100%;
margin-left: 1em;
margin-top: 1.3em;
margin-bottom: 0.8em;
}
IMG {
border: none;
}
SUP {
line-height: 0;
}
TABLE {
border: none;
border-collapse: collapse;
}
TH {
padding: 1px 3em 1px 0.5em;
font-weight: bold;
text-align: left;
}
TD {
vertical-align: top;
padding: 0;
}
/* Custom {{{1
*/
.navheader {
padding: 4px;
/* main data table */
TABLE.infolist {
margin: 8px 2em 0em 2em;
}
TABLE.infolist TH {
background-color: #f0ece6;
}
TABLE.infolist TH A {
text-decoration: none;
}
TABLE.infolist TR > TD:first-child {
min-width: 6em;
}
TD.category {
margin: 0;
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 10%;*/
font-weight: bold;
}
TD.data {
margin: 0;
padding: 4px; /* Defines spacing between rows */
padding-left: 10px;
padding-right: 3em;
font-weight: bold;
background-color: #f0ece6;
}
TD.field {
margin: 0;
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 20%;*/
}
/* float left and right */
.leftwrap {
float: left;
margin: 2px;
margin-right: 10px;
}
.rightwrap {
float: right;
margin: 2px;
margin-left: 10px;
}
.centered {
text-align: center;
}
/* navigation links */
#navheader {
padding: 4px;
margin: 0;
}
.navtitle {
font-size: 160%;
@ -116,14 +155,18 @@ SUP {
padding: 4px;
padding-left: 10px;
background-color: #542;
border-bottom: 6px solid #a97;
}
.navbyline {
float: right;
margin: 2px;
padding: 4px;
padding-right: 10px;
color: #fff;
font-size: 12px;
}
.navbyline A {
color: #fff;
}
.nav {
margin: 0;
@ -131,20 +174,19 @@ SUP {
padding: 1px;
font-size: 14px;
font-weight: bold;
word-spacing: 0.5em;
}
.summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
/* image display */
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
.portrait {
justify: center;
text-align: center;
margin: 5px;
margin-right: 20px;
padding: 3px;
@ -158,84 +200,68 @@ SUP {
padding: 3px;
}
.thumbnail {
height: 100px;
border-color: #986;
border-width: 3px;
margin: 0em 2em 0em 2em;
}
.leftwrap {
float: left;
margin: 2px;
margin-right: 10px;
}
.rightwrap {
float: right;
margin: 2px;
margin-left: 10px;
}
TABLE.infolist {
border: 0;
padding; 0;
.thumbnail p {
margin: 0;
margin-left: 2em;
margin-top: 8px;
padding: 0;
font-size: smaller;
}
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
TD.category {
margin: 0;
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 10%;*/
font-weight: bold;
}
TD.field {
margin: 0;
padding: 4px; /* Defines spacing between rows */
padding-right: 3em;
/*width: 20%;*/
}
TD.data {
margin: 0;
padding: 4px; /* Defines spacing between rows */
padding-left: 10px;
padding-right: 3em;
font-weight: bold;
background-color: #f0ece6;
}
.pedigree {
margin: 0;
margin-left: 2em;
/* pedigree display */
#pedigree { }
.pedigreebox {
margin: 0.5em 2em 0 2em;
padding: 0;
background-color: #f0ece6;
border: 1px;
}
.pedigreeind {
.pedigreegen {
margin: 0;
padding: 2em;
padding-top: 0.25em;
padding-bottom: 0.5em;
}
.footer {
margin: 1em;
.spouse {
font-style: italic;
}
.spouse:before {
content: "+ ";
}
.thisperson {
font-weight: bold;
}
/* other section ids */
#content { }
#summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
}
#footer {
background-color: #a97;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
.fullclear {
clear: both;
}
#copyright {
margin: 0.5em 1em 0 0;
font-size: 12px;
float: right;
}
#attributes { }
#events { }
#families { }
#gallery { }
#narrative { }
#parents { }
#references { }
#researcher { }
#sourcerefs { }
#weblinks { }
/* 1}}}
vim:foldmethod=marker
/*
*/

View File

@ -4,35 +4,46 @@
/* Standard Tags {{{1
*/
BODY {
font-family: "Bistream Vera Sans", "Arial", "Arial", "Helvetica", sans-serif;
font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;
text-align: justify;
background-color: #fff;
color: #010;
}
P,BLOCKQUOTE {
font-size: 14px;
margin-left: 7em;
margin-right: 7em;
A:link {
color: #252;
text-decoration: underline;
}
A:hover {
background-color: #eaf0ea;
color: #000;
text-decoration: underline;
}
A:active {
background-color: #eaf0ea;
color: #000;
text-decoration: none;
}
A:visited {
color: #565;
text-decoration: underline;
}
DIV {
margin: 2px;
padding: 2px;
}
TD {
vertical-align: top;
P {
font-size: 14px;
margin-left: 7em;
margin-right: 7em;
}
H1 {
font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;
font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;
font-weight: bolder;
font-size: 160%;
margin: 2px;
}
H2 {
font-family: "Verdana", "Bistream Vera Sans", "Arial", "Helvetica", sans-serif;
font-family: "Verdana", "Bitstream Vera Sans", "Arial", "Helvetica", sans-serif;
font-weight: bolder;
font-style: italic;
font-size: 150%;
@ -65,134 +76,44 @@ H6 {
margin-top: 1.3em;
margin-bottom: 0.8em;
}
HR {
height: 0;
width: 0;
margin: 0;
margin-top: 1px;
margin-bottom: 1px;
padding: 0;
border-top: 0; /* Hack: Mozilla work-around to eliminate "groove" */
border-color: #e0e6e0;
IMG {
border: none;
}
A:link {
color: #252;
text-decoration: underline;
}
A:visited {
color: #565;
text-decoration: underline;
}
A:hover {
background-color: #eaf0ea;
color: #000;
text-decoration: underline;
}
A:active {
background-color: #eaf0ea;
color: #000;
text-decoration: none;
}
SUP {
line-height: 0;
}
TABLE {
border: none;
border-collapse: collapse;
}
TH {
padding: 1px;
padding-right: 3em;
font-weight: bold;
text-align: left;
}
TD {
vertical-align: top;
padding: 0;
}
/* Custom {{{1
*/
.navheader {
padding: 4px;
background-color: #e0e6e0;
margin: 2px;
}
.navtitle {
font-size: 160%;
color: #e0e6e0;
margin: 2px;
background-color: #454;
padding: 4px;
padding-left: 3.5em;
}
.navbyline {
float: right;
font-size: 14px;
margin: 2px;
padding: 0;
padding-top: 1em;
padding-right: 7em;
color: #e0e6e0;
}
.nav {
margin: 0;
margin-bottom: 4px;
padding: 0;
padding-left: 6.5em;
font-size: 14px;
font-weight: bold;
}
.summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
}
.portrait {
justify: center;
margin: 5px;
margin-right: 20px;
padding: 3px;
border-color: #363;
border-width: 1px;
}
.snapshot {
float: right;
margin: 5px;
padding: 3px;
padding-right: 6em;
}
.thumbnail {
height: 100px;
border-color: #363;
border-width: 1px;
}
.leftwrap {
float: left;
margin: 5px;
margin-right: 1em;
margin-left: 6em;
}
.rightwrap {
float: right;
margin: 5px;
margin-left: 1em;
margin-right: 6em;
}
/* main data table */
TABLE.infolist {
border: 0;
/*width: 100%;*/
font-size: 14px;
margin-left: 7em;
margin-right: 7em;
margin: 0em 4em 0em 8em;
}
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
TABLE.infolist TH {
border-bottom: 1px solid #454;
}
TABLE.infolist TH A {
text-decoration: none;
}
TABLE.infolist TR > TD:first-child {
min-width: 6em;
}
TD.category {
padding: 3px; /* Defines spacing between rows */
@ -211,32 +132,142 @@ TD.data {
padding-right: 3em;
font-weight: bold;
}
.pedigree {
/* float left and right */
.leftwrap {
float: left;
margin: 5px;
margin-right: 1em;
margin-left: 6em;
}
.rightwrap {
float: right;
margin: 5px;
margin-left: 1em;
margin-right: 6em;
}
.centered {
text-align: center;
}
/* navigation links */
#navheader {
padding: 4px;
background-color: #e0e6e0;
margin: 2px;
}
.navtitle {
font-size: 160%;
color: #e0e6e0;
margin: 2px;
background-color: #454;
padding: 4px;
padding-left: 3.5em;
}
.navbyline {
float: right;
font-size: 14px;
margin: 2px;
padding: 0;
padding-top: 1em;
padding-right: 7em;
color: #e0e6e0;
}
.navbyline A {
color: #e0e6e0;
}
.nav {
margin: 0 0 4px 0;
padding: 0 0 0 2em;
font-size: 14px;
font-weight: bold;
word-spacing: 0.5em;
}
/* image display */
.img_navbar {
margin: 0;
margin-bottom: 4px;
padding: 10px;
font-size: 14px;
font-weight: bold;
text-align: center;
}
.portrait {
text-align: center;
margin: 5px;
margin-right: 20px;
padding: 3px;
border-color: #363;
border-width: 1px;
}
.snapshot {
float: right;
margin: 5px;
padding: 3px;
padding-right: 4em;
}
.thumbnail {
margin: 0em 0em 0em 7em;
}
.thumbnail p {
margin: 0;
margin-left: 7em;
padding: 0;
font-size: smaller;
}
/* pedigree display */
#pedigree { }
.pedigreebox {
margin: 0.5em 2em 0em 7em;
padding: 0;
background-color: #e0e6e0;
border: 1px;
}
.pedigreeind {
.pedigreegen {
font-size: 14px;
margin: 0;
padding: 2em;
padding-top: 0.25em;
padding-bottom: 0.5em;
}
.footer {
margin: 1em;
font-size: 12px;
text-align: center;
.spouse {
font-style: italic;
}
.spouse:before {
content: "+ ";
}
.thisperson {
font-weight: bold;
}
/* other section ids */
#content { }
#summaryarea {
min-height: 100px;
/* Hack: IE Dynamic Expression to set the width */
height: expression(document.body.clientHeight < 1 ? "100px" : "100px" );
}
#footer {
background-color: #454;
padding: 0;
margin: 1em 0 0 0;
clear: both;
}
.fullclear {
clear: both;
}
#copyright {
margin: 0.5em 1em 0 0;
font-size: 12px;
float: right;
}
#attributes { }
#events { }
#families { }
#gallery { }
#narrative { }
#parents { }
#references { }
#researcher { }
#sourcerefs { }
#weblinks { }
/* 1}}}
vim:foldmethod=marker
/*
*/

View File

@ -103,12 +103,12 @@ _character_sets = [
]
_cc = [
'<a rel="license" href="http://creativecommons.org/licenses/by/2.5/"><img alt="Creative Commons License" border="0" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nd/2.5/"><img alt="Creative Commons License" border="0" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc/2.5/"><img alt="Creative Commons License" border="0" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.5/"><img alt="Creative Commons License" border="0" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/"><img alt="Creative Commons License" border="0" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by/2.5/"><img alt="Creative Commons License" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nd/2.5/"><img alt="Creative Commons License" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc/2.5/"><img alt="Creative Commons License" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.5/"><img alt="Creative Commons License" src="#PATH#images/somerights20.gif" /></a>',
'<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/2.5/"><img alt="Creative Commons License" src="#PATH#images/somerights20.gif" /></a>',
]
@ -204,7 +204,7 @@ class BasePage:
def display_footer(self,of,db):
of.write('</div>\n')
of.write('<div class="footer">\n')
of.write('<div id="footer">\n')
if self.copyright == 0:
if self.author:
self.author = self.author.replace(',,,','')
@ -212,9 +212,9 @@ class BasePage:
cright = _('&copy; %(year)d %(person)s') % {
'person' : self.author,
'year' : year }
of.write('<br>%s\n' % cright)
of.write('<br />%s\n' % cright)
elif self.copyright <=6:
of.write('<div align="center">')
of.write('<div id="copyright">')
text = _cc[self.copyright-1]
if self.up:
if self.levels == 1:
@ -224,14 +224,15 @@ class BasePage:
else:
text = text.replace('#PATH#','')
of.write(text)
of.write('</div>')
of.write('</div><br><br><br><hr>\n')
of.write('</div>\n')
of.write('<div class="fullclear"></div>\n')
of.write('</div>\n')
if self.footer:
obj = db.get_object_from_handle(self.footer)
if obj:
of.write('<div class="user_footer">\n')
of.write(obj.get_note())
of.write(' </div>\n')
of.write('</div>\n')
of.write('</body>\n')
of.write('</html>\n')
@ -246,19 +247,52 @@ class BasePage:
path = ""
self.author = author
of.write('<!DOCTYPE HTML PUBLIC ')
of.write('"-//W3C//DTD HTML 4.01 Transitional//EN">\n')
of.write('<html>\n<head>\n')
of.write('<!DOCTYPE html PUBLIC ')
of.write('"-//W3C//DTD XHTML 1.0 Strict//EN" ')
of.write('"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n')
of.write('<html xmlns="http://www.w3.org/1999/xhtml" ')
of.write('xml:lang="en" lang="en">\n<head>\n')
of.write('<title>%s - %s</title>\n' % (self.title_str, title))
of.write('<meta http-equiv="Content-Type" content="text/html; ')
of.write('charset=%s">\n' % self.encoding)
of.write('charset=%s" />\n' % self.encoding)
if path:
of.write('<link href="%s/%s" ' % (path,_NARRATIVE))
else:
of.write('<link href="%s" ' % _NARRATIVE)
of.write('rel="stylesheet" type="text/css">\n')
of.write('<link href="favicon.png" rel="Shortcut Icon">\n')
of.write('<!-- %sId%s -->' % ('$','$'))
of.write('rel="stylesheet" type="text/css" />\n')
# if path:
# of.write('<link href="%s/main1.css" ' % path)
# else:
# of.write('<link href="main1.css" ')
# of.write('rel="stylesheet" title="Modern" type="text/css" />\n')
#
# if path:
# of.write('<link href="%s/main2.css" ' % path)
# else:
# of.write('<link href="main2.css" ')
# of.write('rel="alternate stylesheet" title="Business" type="text/css" />\n')
#
# if path:
# of.write('<link href="%s/main3.css" ' % path)
# else:
# of.write('<link href="main3.css" ')
# of.write('rel="alternate stylesheet" title="Certificate" type="text/css" />\n')
#
# if path:
# of.write('<link href="%s/main4.css" ' % path)
# else:
# of.write('<link href="main4.css" ')
# of.write('rel="alternate stylesheet" title="Antique" type="text/css" />\n')
#
# if path:
# of.write('<link href="%s/main5.css" ' % path)
# else:
# of.write('<link href="main5.css" ')
# of.write('rel="alternate stylesheet" title="Tranquil" type="text/css" />\n')
of.write('<link href="/favicon.ico" rel="Shortcut Icon" />\n')
of.write('<!-- %sId%s -->\n' % ('$','$'))
of.write('</head>\n')
of.write('<body>\n')
if self.header:
@ -267,7 +301,7 @@ class BasePage:
of.write(' <div class="user_header">\n')
of.write(obj.get_note())
of.write(' </div>\n')
of.write('<div class="navheader">\n')
of.write('<div id="navheader">\n')
format = locale.nl_langinfo(locale.D_FMT)
value = time.strftime(format,time.localtime(time.time()))
@ -277,7 +311,6 @@ class BasePage:
of.write('<div class="navbyline">%s</div>\n' % msg)
of.write('<h1 class="navtitle">%s</h1>\n' % self.title_str)
of.write('<hr>\n')
of.write('<div class="nav">\n')
self.show_link(of,'index',_('Home'),path)
if self.use_intro:
@ -292,13 +325,13 @@ class BasePage:
if self.use_contact:
self.show_link(of,'contact',_('Contact'),path)
of.write('</div>\n</div>\n')
of.write(' <div class="content">\n')
of.write('<div id="content">\n')
def show_link(self,of,lpath,title,path):
if path:
of.write('<a href="%s/%s.%s">%s</a> &nbsp;' % (path,lpath,self.ext,title))
of.write(' <a href="%s/%s.%s">%s</a>\n' % (path,lpath,self.ext,title))
else:
of.write('<a href="%s.%s">%s</a> &nbsp;' % (lpath,self.ext,title))
of.write(' <a href="%s.%s">%s</a>\n' % (lpath,self.ext,title))
def display_first_image_as_thumbnail( self, of, db, photolist=None):
if not photolist:
@ -321,9 +354,8 @@ class BasePage:
if not photolist and len(photolist) == 0:
return
of.write('<div id="gallery">\n')
of.write('<h4>%s</h4>\n' % _('Gallery'))
of.write('<hr>\n')
of.write('<blockquote>')
for mediaref in photolist:
photo_handle = mediaref.get_reference_handle()
photo = db.get_object_from_handle(photo_handle)
@ -335,7 +367,7 @@ class BasePage:
photo.get_description(),up=True)
except (IOError,OSError),msg:
WarningDialog(_("Could not add photo to page"),str(msg))
of.write('</blockquote>')
of.write('</div>\n')
def display_note_object(self,of,noteobj=None):
if not noteobj:
@ -343,21 +375,21 @@ class BasePage:
format = noteobj.get_format()
text = noteobj.get()
if text:
of.write('<div id="narrative">\n')
of.write('<h4>%s</h4>\n' % _('Narrative'))
of.write('<hr>\n')
if format:
text = u"<pre>" + u"<br>".join(text.split("\n"))+u"</pre>"
text = u"<pre>" + u"<br />".join(text.split("\n"))+u"</pre>"
else:
text = u"</p><p>".join(text.split("\n"))
of.write('<p>%s</p>\n' % text)
of.write('</div>\n')
def display_url_list(self,of,urllist=None):
if not urllist:
return
of.write('<div id="weblinks">\n')
of.write('<h4>%s</h4>\n' % _('Weblinks'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
of.write('<table class="infolist">\n')
index = 1
for url in urllist:
@ -368,27 +400,27 @@ class BasePage:
of.write('</td></tr>\n')
index = index + 1
of.write('</table>\n')
of.write('</div>\n')
def display_attr_list(self,of,attrlist=None):
if not attrlist:
return
of.write('<div id="attributes">\n')
of.write('<h4>%s</h4>\n' % _('Attributes'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
of.write('<table class="infolist">\n')
for attr in attrlist:
of.write('<tr><td class="field">%s</td>' % _(attr.get_type()))
of.write('<td class="data">%s</td></tr>\n' % attr.get_value())
of.write('</table>\n')
of.write('</div>\n')
def display_references(self,of,db,handlelist):
if not handlelist:
return
of.write('<div id="references">\n')
of.write('<h4>%s</h4>\n' % _('References'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
of.write('<table class="infolist">\n')
index = 1
for (path,name,gid) in handlelist:
@ -397,6 +429,7 @@ class BasePage:
of.write('</td></tr>\n')
index = index + 1
of.write('</table>\n')
of.write('</div>\n')
def build_path(self,handle,dirroot,up):
if up:
@ -446,17 +479,19 @@ class BasePage:
def media_link(self,of,handle,path,name,up,usedescr=True):
dirpath = self.build_path(handle,'img',up)
of.write('<a href="%s/%s.%s">' % (
of.write('<div class="thumbnail">\n')
of.write('<p><a href="%s/%s.%s">' % (
dirpath,handle,self.ext))
of.write('<img class="thumbnail" border="0" ')
of.write('<img ')
if self.levels == 1:
of.write('src="../../%s" ' % path)
else:
of.write('src="../../../%s" ' % path)
of.write('height="%d", alt="%s"></a>' % (const.thumbScale,name))
of.write('height="%d" alt="%s" /></a>' % (const.thumbScale,name))
of.write('</p>\n')
if usedescr:
of.write('<div class="thumbname">%s</div>' % name)
of.write('</a>')
of.write('<p>%s</p>\n' % name)
of.write('</div>\n')
def source_link(self,of,handle,name,gid="",up=False):
dirpath = self.build_path(handle,'src',up)
@ -503,13 +538,11 @@ class IndividualListPage(BasePage):
of.write('<h3>%s</h3>\n' % _('Individuals'))
of.write('<p>%s</p>\n' % msg)
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('cellpadding="0" border="0">\n')
of.write('<tr><td class="field"><u><b>%s</b></u></td>\n' % _('Surname'))
of.write('<td class="field"><u><b>%s</b></u></td>\n' % _('Name'))
of.write('<td class="field"><u><b>%s</b></u></td>\n' % _('Birth date'))
of.write('</tr>\n')
of.write('<table class="infolist">\n<thead><tr>\n')
of.write('<th>%s</th>\n' % _('Surname'))
of.write('<th>%s</th>\n' % _('Name'))
of.write('<th>%s</th>\n' % _('Birth date'))
of.write('</tr></thead>\n<tbody>\n')
person_handle_list = sort_people(db,person_handle_list)
@ -536,7 +569,7 @@ class IndividualListPage(BasePage):
of.write('</td></tr>\n')
first = False
of.write('</table>\n</blockquote>\n')
of.write('</tbody>\n</table>\n')
self.display_footer(of,db)
self.close_file(of)
@ -560,12 +593,10 @@ class SurnamePage(BasePage):
of.write('<h3>%s</h3>\n' % title)
of.write('<p>%s</p>\n' % msg)
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('cellpadding="0" border="0">\n')
of.write('<tr><td class="field"><u><b>%s</b></u></td>\n' % _('Name'))
of.write('<td class="field"><u><b>%s</b></u></td>\n' % _('Birth date'))
of.write('</tr>\n')
of.write('<table class="infolist">\n<thead><tr>\n')
of.write('<th>%s</b></th>\n' % _('Name'))
of.write('<th>%s</b></th>\n' % _('Birth date'))
of.write('</tr></thead>\n<tbody>\n')
for person_handle in person_handle_list:
person = db.get_person_from_handle(person_handle)
@ -580,7 +611,7 @@ class SurnamePage(BasePage):
birth = db.get_event_from_handle(birth_handle)
of.write(birth.get_date())
of.write('</td></tr>\n')
of.write('</table>\n</blockquote>\n')
of.write('<tbody>\n</table>\n')
self.display_footer(of,db)
self.close_file(of)
@ -605,14 +636,10 @@ class PlaceListPage(BasePage):
of.write('<h3>%s</h3>\n' % _('Places'))
of.write('<p>%s</p>\n' % msg )
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('cellpadding="0" border="0">\n')
of.write('<tr><td class="field"><u>')
of.write('<b>%s</b></u></td>\n' % _('Letter'))
of.write('<td class="field"><u>')
of.write('<b>%s</b></u></td>\n' % _('Place'))
of.write('</tr>\n')
of.write('<table class="infolist">\n<thead><tr>\n')
of.write('<th>%s</th>\n' % _('Letter'))
of.write('<th>%s</th>\n' % _('Place'))
of.write('</tr></thead>\n<tbody>\n')
self.sort = Sort.Sort(db)
handle_list = place_handles.keys()
@ -641,7 +668,7 @@ class PlaceListPage(BasePage):
of.write('</td></tr>')
last_surname = n
of.write('</table>\n</blockquote>\n')
of.write('</tbody>\n</table>\n')
self.display_footer(of,db)
self.close_file(of)
@ -664,10 +691,9 @@ class PlacePage(BasePage):
self.display_first_image_as_thumbnail(of, db, place.get_media_list())
of.write('<div class="summaryarea">\n')
of.write('<div id="summaryarea">\n')
of.write('<h3>%s</h3>\n' % self.page_title)
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('border="0">\n')
of.write('<table class="infolist">\n')
if not self.noid:
of.write('<tr><td class="field">%s</td>\n' % _('GRAMPS ID'))
@ -745,7 +771,7 @@ class MediaPage(BasePage):
self.display_header(of,db, "%s - %s" % (_('Gallery'), title),
get_researcher().get_name(),up=True)
of.write('<div class="summaryarea">\n')
of.write('<div id="summaryarea">\n')
of.write('<h3>%s</h3>\n' % self.page_title)
# gallery navigation
@ -758,20 +784,19 @@ class MediaPage(BasePage):
if next:
self.media_ref_link(of,next,_('Next'),True)
of.write('</div><br>\n')
of.write('</div>\n')
mime_type = photo.get_mime_type()
if mime_type and mime_type.startswith("image"):
try:
of.write('<div align="center">\n')
of.write('<img border="0" ')
of.write('src="../../%s" alt="%s"/>' % (newpath, self.page_title))
of.write('<div class="centered">\n')
of.write('<img ')
of.write('src="../../%s" alt="%s" />\n' % (newpath, self.page_title))
of.write('</div>\n')
except (IOError,OSError),msg:
WarningDialog(_("Could not add photo to page"),str(msg))
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('border="0">\n')
of.write('<table class="infolist">\n')
if not self.noid:
of.write('<tr><td class="field">%s</td>\n' % _('GRAMPS ID'))
@ -816,16 +841,11 @@ class SurnameListPage(BasePage):
'will lead to a list of individuals in the '
'database with this same surname.'))
of.write('<blockquote>\n')
of.write('<table class="infolist" cellspacing="0" ')
of.write('cellpadding="0" border="0">\n')
of.write('<tr><td class="field"><u>')
of.write('<b>%s</b></u></td>\n' % _('Letter'))
of.write('<td class="field"><u>')
of.write('<b><a href="%s.%s">%s</a></b></u></td>\n' % ("surnames", self.ext, _('Surname')))
of.write('<td class="field"><u>')
of.write('<b><a href="%s.%s">%s</a></b></u></td>\n' % ("surnames_count", self.ext, _('Number of people')))
of.write('</tr>\n')
of.write('<table class="infolist">\n<thead><tr>\n')
of.write('<th>%s</th>\n' % _('Letter'))
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_count", self.ext, _('Number of people')))
of.write('</tr></thead>\n<tbody>\n')
person_handle_list = sort_people(db,person_handle_list)
if order_by == self.ORDER_BY_COUNT:
@ -859,7 +879,7 @@ class SurnameListPage(BasePage):
last_surname = surname
of.write('<td class="field">%d</td></tr>' % len(data_list))
of.write('</table>\n</blockquote>\n')
of.write('</tbody>\n</table>\n')
self.display_footer(of,db)
self.close_file(of)
return
@ -890,8 +910,8 @@ class IntroductionPage(BasePage):
(newpath,thumb_path) = self.copy_media(obj,False)
self.store_file(archive,self.html_dir,obj.get_path(),
newpath)
of.write('<div align="center">\n')
of.write('<img border="0" ')
of.write('<div class="centered">\n')
of.write('<img ')
of.write('src="%s" ' % newpath)
of.write('alt="%s" />' % obj.get_description())
of.write('</div>\n')
@ -937,8 +957,8 @@ class HomePage(BasePage):
(newpath,thumb_path) = self.copy_media(obj,False)
self.store_file(archive,self.html_dir,obj.get_path(),
newpath)
of.write('<div align="center">\n')
of.write('<img border="0" ')
of.write('<div class="centered">\n')
of.write('<img ')
of.write('src="%s" ' % newpath)
of.write('alt="%s" />' % obj.get_description())
of.write('</div>\n')
@ -981,7 +1001,7 @@ class SourcesPage(BasePage):
of.write('<h3>%s</h3>\n<p>' % _('Sources'))
of.write(msg)
of.write('</p>\n<blockquote>\n<table class="infolist">\n')
of.write('</p>\n<table class="infolist">\n')
index = 1
for handle in handle_list:
@ -992,7 +1012,7 @@ class SourcesPage(BasePage):
of.write('</td></tr>\n')
index += 1
of.write('</table>\n</blockquote>\n')
of.write('</table>\n')
self.display_footer(of,db)
self.close_file(of)
@ -1016,10 +1036,9 @@ class SourcePage(BasePage):
self.display_first_image_as_thumbnail(of, db, source.get_media_list())
of.write('<div class="summaryarea">\n')
of.write('<div id="summaryarea">\n')
of.write('<h3>%s</h3>\n' % self.page_title)
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('border="0">\n')
of.write('<table class="infolist">\n')
for (label,val) in [(_('GRAMPS ID'),source.gramps_id),
(_('Author'),source.author),
@ -1057,8 +1076,8 @@ class GalleryPage(BasePage):
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('</p>\n<blockquote>\n<table class="infolist">\n')
"the title will take you to that media object's page."))
of.write('</p>\n<table class="infolist">\n')
self.db = db
@ -1073,7 +1092,7 @@ class GalleryPage(BasePage):
of.write('</td></tr>\n')
index += 1
of.write('</table>\n</blockquote>\n')
of.write('</table>\n')
self.display_footer(of,db)
self.close_file(of)
@ -1120,7 +1139,7 @@ class ContactPage(BasePage):
self.display_header(of,db,_('Contact'),
get_researcher().get_name())
of.write('<div class="summaryarea">\n')
of.write('<div id="summaryarea">\n')
of.write('<h3>%s</h3>\n' % _('Contact'))
note_id = options.handler.options_dict['NWEBcontact']
@ -1135,10 +1154,9 @@ class ContactPage(BasePage):
self.store_file(archive,self.html_dir,obj.get_path(),
newpath)
of.write('<div class="rightwrap">\n')
of.write('<table cellspacing="0" cellpadding="0" ')
of.write('border="0"><tr>')
of.write('<table><tr>')
of.write('<td height="205">')
of.write('<img border="0" height="200" ')
of.write('<img height="200" ')
of.write('src="%s.%s" ' % (note_id,self.ext))
of.write('alt="%s" />' % obj.get_description())
of.write('</td></tr></table>\n')
@ -1148,13 +1166,14 @@ class ContactPage(BasePage):
r = get_researcher()
of.write('<blockquote>\n')
of.write('%s<br>\n' % r.name)
of.write('%s<br>\n' % r.addr)
of.write('%s, %s, %s<br>\n' % (r.city,r.state,r.postal))
of.write('%s<br>\n' % r.country)
of.write('%s<br>\n' % r.email)
of.write('</blockquote>\n')
of.write('<div id="researcher">\n')
of.write('%s<br />\n' % r.name)
of.write('%s<br />\n' % r.addr)
of.write('%s, %s, %s<br />\n' % (r.city,r.state,r.postal))
of.write('%s<br />\n' % r.country)
of.write('%s<br />\n' % r.email)
of.write('</div>\n')
of.write('<div class="fullclear"></div>\n')
if obj:
nobj = obj.get_note_object()
@ -1163,14 +1182,11 @@ class ContactPage(BasePage):
text = nobj.get()
if format:
text = u"<pre>" + u"<br>".join(text.split("\n"))+u"</pre>"
text = u"<pre>" + u"<br />".join(text.split("\n"))+u"</pre>"
else:
text = u"</p><p>".join(text.split("\n"))
of.write('<p>%s</p>\n' % text)
else:
of.write('<br><br><br><br>\n')
else:
of.write('<br><br><br><br>\n')
of.write('</div>\n')
self.display_footer(of,db)
@ -1231,10 +1247,9 @@ class IndividualPage(BasePage):
sreflist = self.src_refs + self.person.get_source_references()
if not sreflist:
return
of.write('<div id="sourcerefs">\n')
of.write('<h4>%s</h4>\n' % _('Source References'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
of.write('<table class="infolist">\n')
index = 1
for sref in sreflist:
@ -1252,7 +1267,6 @@ class IndividualPage(BasePage):
of.write('<a name="sref%d">%d.</a></td>' % (index,index))
of.write('<td class="field">')
self.source_link(of,source.handle,title,source.gramps_id,True)
of.write('</a>')
tmp = []
for (label,data) in [(_('Page'),sref.page),
(_('Confidence'),const.confidence[sref.confidence]),
@ -1260,10 +1274,11 @@ class IndividualPage(BasePage):
if data:
tmp.append("%s: %s" % (label,data))
if len(tmp) > 0:
of.write('<br>' + '<br>'.join(tmp))
of.write('<br />' + '<br />'.join(tmp))
of.write('</td></tr>\n')
index += 1
of.write('</table>\n')
of.write('</div>\n')
def display_ind_pedigree(self,of):
@ -1280,44 +1295,42 @@ class IndividualPage(BasePage):
father = None
mother = None
of.write('<div id="pedigree">\n')
of.write('<h4>%s</h4>\n' % _('Pedigree'))
of.write('<hr>\n<br>\n')
of.write('<table class="pedigree">\n')
of.write('<tr><td>\n')
of.write('<div class="pedigreebox">\n')
if father or mother:
of.write('<blockquote class="pedigreeind">\n')
of.write('<div class="pedigreegen">\n')
if father:
self.pedigree_person(of,father)
if mother:
self.pedigree_person(of,mother)
of.write('<blockquote class="pedigreeind">\n')
self.pedigree_person(of,mother,True)
of.write('<div class="pedigreegen">\n')
if family:
for child_handle in family.get_child_handle_list():
if child_handle == self.person.handle:
of.write('| <strong>%s</strong><br>\n' % self.name)
of.write('<span class="thisperson">%s</span><br />\n' % self.name)
self.pedigree_family(of)
else:
child = self.db.get_person_from_handle(child_handle)
self.pedigree_person(of,child)
else:
of.write('| <strong>%s</strong><br>\n' % self.name)
of.write('<span class="thisperson">%s</span><br />\n' % self.name)
self.pedigree_family(of)
of.write('</blockquote>\n')
of.write('</div>\n')
if father or mother:
of.write('</blockquote>\n')
of.write('</td>\n</tr>\n</table>\n')
of.write('</div>\n')
of.write('</div>\n</div>\n')
def display_ind_general(self,of):
self.page_title = self.sort_name
self.display_first_image_as_thumbnail(of, self.db,
self.person.get_media_list())
of.write('<div class="summaryarea">\n')
of.write('<div id="summaryarea">\n')
of.write('<h3>%s</h3>\n' % self.sort_name)
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('border="0">\n')
of.write('<table class="infolist">\n')
# GRAMPS ID
if not self.noid:
@ -1363,10 +1376,9 @@ class IndividualPage(BasePage):
if not all_events:
return
of.write('<div id="events">\n')
of.write('<h4>%s</h4>\n' % _('Events'))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" cellspacing="0" ')
of.write('border="0">\n')
of.write('<table class="infolist">\n')
# Birth
handle = self.person.get_birth_handle()
@ -1393,6 +1405,7 @@ class IndividualPage(BasePage):
of.write('</td>\n')
of.write('</tr>\n')
of.write('</table>\n')
of.write('</div>\n')
def display_child_link(self, of, child_handle):
use_link = child_handle in self.ind_list
@ -1405,7 +1418,7 @@ class IndividualPage(BasePage):
child_name, gid)
else:
of.write(nameof(child,self.exclude_private))
of.write(u"<br>\n")
of.write(u"<br />\n")
def display_parent(self, of, handle, title, rel):
use_link = handle in self.ind_list
@ -1430,10 +1443,9 @@ class IndividualPage(BasePage):
if not parent_list:
return
of.write('<div id="parents">\n')
of.write('<h4>%s</h4>\n' % _("Parents"))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
of.write('<table class="infolist">\n')
first = True
if parent_list:
@ -1447,12 +1459,14 @@ class IndividualPage(BasePage):
father_handle = family.get_father_handle()
if father_handle:
of.write('<tr>\n')
self.display_parent(of,father_handle,_('Father'),frel)
of.write('<tr>\n')
of.write('</tr>\n')
mother_handle = family.get_mother_handle()
if mother_handle:
of.write('<tr>\n')
self.display_parent(of,mother_handle,_('Mother'),mrel)
of.write('</tr>\n')
of.write('</tr>\n')
first = False
childlist = family.get_child_handle_list()
if len(childlist) > 1:
@ -1465,16 +1479,16 @@ class IndividualPage(BasePage):
of.write('</td>\n</tr>\n')
of.write('<tr><td colspan="3">&nbsp;</td></tr>\n')
of.write('</table>\n')
of.write('</div>\n')
def display_ind_relationships(self,of):
family_list = self.person.get_family_handle_list()
if not family_list:
return
of.write('<div id="families">\n')
of.write('<h4>%s</h4>\n' % _("Families"))
of.write('<hr>\n')
of.write('<table class="infolist" cellpadding="0" ')
of.write('cellspacing="0" border="0">\n')
of.write('<table class="infolist">\n')
first = True
for family_handle in family_list:
@ -1490,6 +1504,7 @@ class IndividualPage(BasePage):
self.display_child_link(of,child_handle)
of.write('</td>\n</tr>\n')
of.write('</table>\n')
of.write('</div>\n')
def display_spouse(self,of,family,first=True):
gender = self.person.get_gender()
@ -1549,15 +1564,16 @@ class IndividualPage(BasePage):
format = nobj.get_format()
text = nobj.get()
if format:
of.write( u"<pre>" + u"<br>".join(text.split("\n"))+u"</pre>")
of.write( u"<pre>" + u"<br />".join(text.split("\n"))+u"</pre>")
else:
of.write( u"</p><p>".join(text.split("\n")))
of.write('</td>\n</tr>\n')
def pedigree_person(self,of,person,bullet='|'):
def pedigree_person(self,of,person,is_spouse=False):
person_link = person.handle in self.ind_list
of.write('%s ' % bullet)
if is_spouse:
of.write('<span class="spouse">')
if person_link:
person_name = nameof(person,self.exclude_private)
path = self.build_path(person.handle,"ppl",False)
@ -1565,7 +1581,9 @@ class IndividualPage(BasePage):
self.person_link(of, fname, person_name)
else:
of.write(nameof(person,self.exclude_private))
of.write('<br>\n')
if is_spouse:
of.write('</span>')
of.write('<br />\n')
def pedigree_family(self,of):
for family_handle in self.person.get_family_handle_list():
@ -1573,14 +1591,14 @@ class IndividualPage(BasePage):
spouse_handle = ReportUtils.find_spouse(self.person,rel_family)
if spouse_handle:
spouse = self.db.get_person_from_handle(spouse_handle)
self.pedigree_person(of,spouse,'&bull;')
self.pedigree_person(of,spouse,True)
childlist = rel_family.get_child_handle_list()
if childlist:
of.write('<blockquote class="pedigreeind">\n')
of.write('<div class="pedigreegen">\n')
for child_handle in childlist:
child = self.db.get_person_from_handle(child_handle)
self.pedigree_person(of,child)
of.write('</blockquote>\n')
of.write('</div>\n')
def format_event(self,event):
gid_list = []