Fix my html source layout problems. Cleanup and making stylesheet consistent.
svn: r13506
This commit is contained in:
parent
9c335c802b
commit
faae542526
@ -32,7 +32,7 @@ see <http://www.gnu.org/licenses/>.
|
|||||||
--------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------
|
||||||
Color Palette
|
Color Palette
|
||||||
--------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------
|
||||||
brown dark #542
|
brown dark #453619, #542
|
||||||
brown light #C1B398
|
brown light #C1B398
|
||||||
gray #696969
|
gray #696969
|
||||||
green dark #228A22
|
green dark #228A22
|
||||||
@ -57,12 +57,6 @@ body {
|
|||||||
color: #000;
|
color: #000;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
body#NarrativeWeb_Horizontal {
|
|
||||||
padding: 158px 0px 0px 0px;
|
|
||||||
}
|
|
||||||
body#NarrativeWeb_Vertical {
|
|
||||||
padding: 128px 0px 0px 44px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* General Elements
|
/* General Elements
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
@ -132,15 +126,17 @@ h3 {
|
|||||||
text-align:center;
|
text-align:center;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:.5em 20px .2em 20px;
|
padding:.5em 20px .2em 20px;
|
||||||
border-bottom:double 4px #000;
|
border-bottom:double 4px #228A22;
|
||||||
}
|
}
|
||||||
h4 {
|
h4 {
|
||||||
font:normal 1.2em/1.2em serif;
|
font:normal 1.2em/1.2em serif;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
margin-top: .3cm;
|
margin-top: .3cm;
|
||||||
padding:.2em 0 .2em 20px;
|
padding:.2em 0 .2em 20px;
|
||||||
background-color: #228A22;
|
background-color: #453619;
|
||||||
border-bottom:solid 4px #A97;
|
border-width: 4px 0px 4px 0px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #5D835F;
|
||||||
}
|
}
|
||||||
h5, h6 {
|
h5, h6 {
|
||||||
font:normal 1em/1.2em serif;
|
font:normal 1em/1.2em serif;
|
||||||
@ -174,7 +170,7 @@ ol li a {
|
|||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
ol li a:hover {
|
ol li a:hover {
|
||||||
text-decoration:underline;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
color: #542;
|
color: #542;
|
||||||
@ -185,7 +181,7 @@ a:visited {
|
|||||||
a:hover {
|
a:hover {
|
||||||
color: #000;
|
color: #000;
|
||||||
background-color: #C1B398;
|
background-color: #C1B398;
|
||||||
text-decoration:underline;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
span.preposition {
|
span.preposition {
|
||||||
padding-left:1em;
|
padding-left:1em;
|
||||||
@ -238,7 +234,7 @@ div#footer a, div#footer a:visited {
|
|||||||
}
|
}
|
||||||
div#footer a:hover {
|
div#footer a:hover {
|
||||||
color: #000;
|
color: #000;
|
||||||
text-decoration:underline;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
div#footer img {
|
div#footer img {
|
||||||
border:0;
|
border:0;
|
||||||
@ -300,7 +296,6 @@ div#navigation ul li a, div#subnavigation ul li a {
|
|||||||
}
|
}
|
||||||
div#navigation ul li a:hover, div#subnavigation ul li a:hover {
|
div#navigation ul li a:hover, div#subnavigation ul li a:hover {
|
||||||
background-color: #C1B398;
|
background-color: #C1B398;
|
||||||
color: #000;
|
|
||||||
}
|
}
|
||||||
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
|
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
@ -314,7 +309,7 @@ div#navigation ul li.CurrentSection a:hover {
|
|||||||
}
|
}
|
||||||
div#subnavigation ul li.CurrentSection a {
|
div#subnavigation ul li.CurrentSection a {
|
||||||
border-width: 0px 0px 2px 0px;
|
border-width: 0px 0px 2px 0px;
|
||||||
border-color: #FFF;
|
border-color: #6AF364;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Alphabet Navigation
|
/* Alphabet Navigation
|
||||||
@ -419,8 +414,6 @@ table.infolist tbody tr td.ColumnPartner a {
|
|||||||
padding:.6em 10px;
|
padding:.6em 10px;
|
||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
}
|
}
|
||||||
table.infolist tbody tr td.ColumnPartner a:hover { }
|
|
||||||
|
|
||||||
table.infolist tbody tr td.ColumnParents {
|
table.infolist tbody tr td.ColumnParents {
|
||||||
font-size:.9em;
|
font-size:.9em;
|
||||||
}
|
}
|
||||||
@ -434,8 +427,10 @@ table.infolist tbody tr td.ColumnParents span.mother:before {
|
|||||||
|
|
||||||
/* Surnames
|
/* Surnames
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
#Surnames { }
|
#Surnames {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
#SurnameDetail p#description {
|
#SurnameDetail p#description {
|
||||||
padding-top:0;
|
padding-top:0;
|
||||||
}
|
}
|
||||||
@ -452,11 +447,8 @@ table.surnamelist thead tr th a, table.surnamelist thead tr th a:visited {
|
|||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
padding:.2em 10px;
|
padding:.2em 10px;
|
||||||
}
|
}
|
||||||
table.surnamelist tr th:hover { }
|
|
||||||
|
|
||||||
table.surnamelist thead tr th.ColumnLetter {
|
table.surnamelist thead tr th.ColumnLetter {
|
||||||
padding-left:20px;
|
padding: 0px 10px 0px 20px;
|
||||||
padding-right:10px;
|
|
||||||
}
|
}
|
||||||
table.surnamelist tbody tr td {
|
table.surnamelist tbody tr td {
|
||||||
background-color: #D8F3D6;
|
background-color: #D8F3D6;
|
||||||
@ -482,14 +474,12 @@ table#SortByName tbody tr td.ColumnSurname a {
|
|||||||
display:block;
|
display:block;
|
||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
table#SortByCount tbody tr td.ColumnQuantity { }
|
|
||||||
|
|
||||||
table.surnamelist tbody tr td.ColumnSurname:hover,
|
table.surnamelist tbody tr td.ColumnSurname:hover,
|
||||||
table#SortByName tbody tr td.ColumnSurname:hover {
|
table#SortByName tbody tr td.ColumnSurname:hover {
|
||||||
background-color: #C1B398;
|
background-color: #C1B398;
|
||||||
}
|
}
|
||||||
table.surname {
|
table.surname {
|
||||||
border-bottom:solid 1px #000;
|
border-bottom:solid 1px #5D835F;
|
||||||
}
|
}
|
||||||
table.surname thead tr th.ColumnName {
|
table.surname thead tr th.ColumnName {
|
||||||
width:20%;
|
width:20%;
|
||||||
@ -508,8 +498,9 @@ table.surname tbody tr td.ColumnName a {
|
|||||||
display:block;
|
display:block;
|
||||||
padding:.6em 10px .6em 20px;
|
padding:.6em 10px .6em 20px;
|
||||||
}
|
}
|
||||||
table.surname tbody tr td.ColumnName a span.grampsid { }
|
table.surname tbody tr td.ColumnName a span.grampsid {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
table.surname tbody tr td.ColumnName:hover {
|
table.surname tbody tr td.ColumnName:hover {
|
||||||
background-color: #C1B398;
|
background-color: #C1B398;
|
||||||
}
|
}
|
||||||
@ -527,8 +518,10 @@ table.surname tbody tr td.ColumnParents {
|
|||||||
|
|
||||||
/* Individuals
|
/* Individuals
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
div#Individuals { }
|
div#Individuals {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
div#Individuals table.individuallist {
|
div#Individuals table.individuallist {
|
||||||
border-bottom: solid 1px #5D835F;
|
border-bottom: solid 1px #5D835F;
|
||||||
}
|
}
|
||||||
@ -562,9 +555,10 @@ div#Individuals div table.infolist tr td p {
|
|||||||
div#Individuals div table.infolist tr td p a {
|
div#Individuals div table.infolist tr td p a {
|
||||||
display:inline;
|
display:inline;
|
||||||
}
|
}
|
||||||
|
div#IndividualDetail {
|
||||||
div#IndividualDetail { }
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
#IndividualDetail div table.infolist tr td {
|
#IndividualDetail div table.infolist tr td {
|
||||||
font:normal .9em/1.2em sans-serif;
|
font:normal .9em/1.2em sans-serif;
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
@ -573,7 +567,7 @@ div#IndividualDetail div table.infolist tr td a {
|
|||||||
display:inline;
|
display:inline;
|
||||||
}
|
}
|
||||||
div#IndividualDetail table.infolist tr td a:hover {
|
div#IndividualDetail table.infolist tr td a:hover {
|
||||||
text-decoration:underline;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
div#IndividualDetail table.infolist tbody tr td.ColumnAttribute {
|
div#IndividualDetail table.infolist tbody tr td.ColumnAttribute {
|
||||||
width:10%;
|
width:10%;
|
||||||
@ -584,13 +578,14 @@ div#IndividualDetail div.subsection table tr td:first-child {
|
|||||||
|
|
||||||
/* Places
|
/* Places
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
#Places { }
|
#Places {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnLetter {
|
#Places table.infolist tbody tr td.ColumnLetter {
|
||||||
background-color: #D8F3D6;
|
background-color: #D8F3D6;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName {
|
#Places table.infolist tbody tr td.ColumnName {
|
||||||
padding:0;
|
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
}
|
}
|
||||||
#Places table.infolist tbody tr td.ColumnName a {
|
#Places table.infolist tbody tr td.ColumnName a {
|
||||||
@ -599,8 +594,10 @@ div#IndividualDetail div.subsection table tr td:first-child {
|
|||||||
|
|
||||||
/* EventList and EventDetail
|
/* EventList and EventDetail
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
div#EventList, div#EventDetail { }
|
div#EventList, div#EventDetail {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
div#events table.eventlist {
|
div#events table.eventlist {
|
||||||
margin-top: .3cm;
|
margin-top: .3cm;
|
||||||
}
|
}
|
||||||
@ -612,7 +609,7 @@ div#events table.eventlist tbody tr td.ColumnPlace a {
|
|||||||
}
|
}
|
||||||
table.eventlist tbody tr td {
|
table.eventlist tbody tr td {
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
border-bottom: dashed 1px #000;
|
border-bottom: dashed 1px #5D835F;
|
||||||
}
|
}
|
||||||
table.eventlist tbody tr td.ColumnEvent {
|
table.eventlist tbody tr td.ColumnEvent {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
@ -639,12 +636,8 @@ table.eventlist tbody tr td.ColumnPerson {
|
|||||||
table.eventlist tbody tr td.ColumnPartner {
|
table.eventlist tbody tr td.ColumnPartner {
|
||||||
width: 35%;
|
width: 35%;
|
||||||
}
|
}
|
||||||
div#families table.eventlist {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
div#EventList table.eventlist tbody tr.BeginName {
|
div#EventList table.eventlist tbody tr.BeginName {
|
||||||
border-top: solid 1px #000;
|
border-top: solid 1px #5D835F;
|
||||||
}
|
}
|
||||||
div#EventList table.eventlist tbody tr td {
|
div#EventList table.eventlist tbody tr td {
|
||||||
padding: 4px 0px 4px 0px;
|
padding: 4px 0px 4px 0px;
|
||||||
@ -678,8 +671,10 @@ div#EventDetail table.eventlist tbody tr td.ColumnEvent {
|
|||||||
|
|
||||||
/* Gallery
|
/* Gallery
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
#Gallery { }
|
#Gallery {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
#Gallery table.infolist tbody tr td.ColumnRowLabel,
|
#Gallery table.infolist tbody tr td.ColumnRowLabel,
|
||||||
#Gallery table.infolist tbody tr td.ColumnDate {
|
#Gallery table.infolist tbody tr td.ColumnDate {
|
||||||
background-color: #D8F3D6;
|
background-color: #D8F3D6;
|
||||||
@ -693,7 +688,7 @@ div#EventDetail table.eventlist tbody tr td.ColumnEvent {
|
|||||||
padding:.1em 10px .3em 10px;
|
padding:.1em 10px .3em 10px;
|
||||||
}
|
}
|
||||||
#Gallery table.gallerylist tbody tr td {
|
#Gallery table.gallerylist tbody tr td {
|
||||||
border-bottom: dashed 1px #000;
|
border-bottom: dashed 1px #5D835F;
|
||||||
}
|
}
|
||||||
#GalleryNav {
|
#GalleryNav {
|
||||||
font:normal 1em/1em sans-serif;
|
font:normal 1em/1em sans-serif;
|
||||||
@ -704,10 +699,8 @@ div#EventDetail table.eventlist tbody tr td.ColumnEvent {
|
|||||||
#GalleryNav a {
|
#GalleryNav a {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
border:solid 1px #228A22;
|
border:solid 1px #5D835F;
|
||||||
}
|
}
|
||||||
#GalleryNav a:hover { }
|
|
||||||
|
|
||||||
#GalleryNav a#Previous {
|
#GalleryNav a#Previous {
|
||||||
padding:.5em .7em .3em .7em;
|
padding:.5em .7em .3em .7em;
|
||||||
}
|
}
|
||||||
@ -747,29 +740,28 @@ div#EventDetail table.eventlist tbody tr td.ColumnEvent {
|
|||||||
}
|
}
|
||||||
#GalleryDetail div#summaryarea table.gallery {
|
#GalleryDetail div#summaryarea table.gallery {
|
||||||
padding-bottom:0;
|
padding-bottom:0;
|
||||||
margin-top:1.5em;
|
margin: 1.5em 0 0 0;
|
||||||
margin-bottom:0;
|
|
||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-width:2px 0 1px 0;
|
border-width:2px 0 1px 0;
|
||||||
border-color: #000;
|
border-color: #5D835F;
|
||||||
}
|
}
|
||||||
table.exifdata tr td.ColumnAttribute {
|
table.exifdata tr td.ColumnAttribute {
|
||||||
border-top:solid 1px #000;
|
border-top:solid 1px #5D835F;
|
||||||
width:60%;
|
width:60%;
|
||||||
}
|
}
|
||||||
table.exiflist tr td.ColumnValue {
|
table.exiflist tr td.ColumnValue {
|
||||||
border-top:solid 1px #000;
|
border-top:solid 1px #5D835F;
|
||||||
width:45%;
|
width:45%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Contact
|
/* Contact
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
#Contact #summaryarea {
|
#Contact #summaryarea {
|
||||||
background-color: #D8F3D7;
|
background-color: #D8F3D6;
|
||||||
width:500px;
|
width:500px;
|
||||||
margin:0 auto;
|
margin:0 auto;
|
||||||
padding:3em;
|
padding:3em;
|
||||||
border:double 4px #000;
|
border:double 4px #5D835F;
|
||||||
}
|
}
|
||||||
#Contact #summaryarea img {
|
#Contact #summaryarea img {
|
||||||
float:right;
|
float:right;
|
||||||
@ -805,9 +797,6 @@ table.exiflist tr td.ColumnValue {
|
|||||||
#email a {
|
#email a {
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
#email a:hover {
|
|
||||||
text-decoration:underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Download
|
/* Download
|
||||||
----------------------------------------------------- */
|
----------------------------------------------------- */
|
||||||
|
@ -128,6 +128,7 @@ COUNTY = _("County")
|
|||||||
COUNTRY = _("Country")
|
COUNTRY = _("Country")
|
||||||
DHEAD = _("Date")
|
DHEAD = _("Date")
|
||||||
DESCRHEAD = _("Description")
|
DESCRHEAD = _("Description")
|
||||||
|
GRAMPSID = _("GRAMPS ID")
|
||||||
LATITUDE = _("Latitude")
|
LATITUDE = _("Latitude")
|
||||||
LOCATIONS = _("Alternate Locations")
|
LOCATIONS = _("Alternate Locations")
|
||||||
LONGITUDE = _("Longitude")
|
LONGITUDE = _("Longitude")
|
||||||
@ -303,6 +304,7 @@ class BasePage(object):
|
|||||||
self.linkhome = report.options['linkhome']
|
self.linkhome = report.options['linkhome']
|
||||||
self.create_media = report.options['gallery']
|
self.create_media = report.options['gallery']
|
||||||
self.inc_events = report.options['inc_events']
|
self.inc_events = report.options['inc_events']
|
||||||
|
self.exiftagsopt = report.options['exiftagsopt']
|
||||||
|
|
||||||
def get_birth_date(self, db, person):
|
def get_birth_date(self, db, person):
|
||||||
""" Will return a date object for a person's birthdate """
|
""" Will return a date object for a person's birthdate """
|
||||||
@ -500,9 +502,7 @@ class BasePage(object):
|
|||||||
else:
|
else:
|
||||||
self.place_list[place_handle] = [lnk]
|
self.place_list[place_handle] = [lnk]
|
||||||
|
|
||||||
place = self.place_link(place_handle,
|
place = self.place_link(place_handle, ReportUtils.place_name(db, place_handle), up = True)
|
||||||
ReportUtils.place_name(db,
|
|
||||||
place_handle), up = True)
|
|
||||||
else:
|
else:
|
||||||
place = ''
|
place = ''
|
||||||
|
|
||||||
@ -576,8 +576,7 @@ class BasePage(object):
|
|||||||
place_hyper = None
|
place_hyper = None
|
||||||
if place:
|
if place:
|
||||||
place_name = ReportUtils.place_name(db, place_handle)
|
place_name = ReportUtils.place_name(db, place_handle)
|
||||||
place_hyper = self.place_link(place_handle, place_name,
|
place_hyper = self.place_link(place_handle, place_name, up = subdirs)
|
||||||
place.gramps_id, subdirs)
|
|
||||||
|
|
||||||
# wrap it all up and return to its callers
|
# wrap it all up and return to its callers
|
||||||
# position 0 = translatable label, position 1 = column class
|
# position 0 = translatable label, position 1 = column class
|
||||||
@ -1959,10 +1958,10 @@ class PlacePage(BasePage):
|
|||||||
summaryarea += table
|
summaryarea += table
|
||||||
|
|
||||||
if not self.noid:
|
if not self.noid:
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", _("GRAMPS ID"), class_ = "ColumnAttribute", inline = True),
|
Html("td", GRAMPSID, class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", place.gramps_id, class_ = "ColumnValue", inline = True)
|
Html("td", place.gramps_id, class_ = "ColumnValue", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
if place.main_loc:
|
if place.main_loc:
|
||||||
@ -1980,10 +1979,10 @@ class PlacePage(BasePage):
|
|||||||
(LOCATIONS, place.get_alternate_locations() ) ]:
|
(LOCATIONS, place.get_alternate_locations() ) ]:
|
||||||
|
|
||||||
if val[1]:
|
if val[1]:
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", val[0], class_ = "ColumnAttribute", inline = True),
|
Html("td", val[0], class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", val[1], class_ = "ColumnValue", inline = True)
|
Html("td", val[1], class_ = "ColumnValue", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# place gallery
|
# place gallery
|
||||||
@ -2003,14 +2002,14 @@ class PlacePage(BasePage):
|
|||||||
placedetail += urllinks
|
placedetail += urllinks
|
||||||
|
|
||||||
# source references
|
# source references
|
||||||
# sourcerefs = self.get_citation_links(place.get_source_references() )
|
sourcerefs = self.get_citation_links(place.get_source_references() )
|
||||||
# if sourcerefs is not None:
|
if sourcerefs is not None:
|
||||||
# placedetail += sourcerefs
|
placedetail += sourcerefs
|
||||||
|
|
||||||
# place references
|
# place references
|
||||||
referenceslist = self.display_references(place_list[place.handle])
|
reflist = self.display_references(place_list[place.handle])
|
||||||
if referenceslist is not None:
|
if reflist is not None:
|
||||||
placedetail += referenceslist
|
placedetail += reflist
|
||||||
|
|
||||||
# add clearline for proper styling
|
# add clearline for proper styling
|
||||||
# add footer section
|
# add footer section
|
||||||
@ -2193,29 +2192,29 @@ class EventPage(BasePage):
|
|||||||
samerow = True if (data == " " or (colclass == "Date" or "Event")) \
|
samerow = True if (data == " " or (colclass == "Date" or "Event")) \
|
||||||
else False
|
else False
|
||||||
|
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
Html("td", label, class_ = "ColumnAttribute", inline = True),
|
||||||
Html('td', data, class_ = "Column%s" % colclass, inline = samerow)
|
Html('td', data, class_ = "Column%s" % colclass, inline = samerow)
|
||||||
]
|
)
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
# get person hyperlink
|
# get person hyperlink
|
||||||
url = self.report.build_url_fname_html(person.handle, "ppl", self.up)
|
url = self.report.build_url_fname_html(person.handle, "ppl", self.up)
|
||||||
person_hyper = self.person_link(url, person, True, gid = person.gramps_id)
|
person_hyper = self.person_link(url, person, True, gid = person.gramps_id)
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", _('Person'), class_ = "ColumnAttribute", inline = True),
|
Html("td", _("Person"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", person_hyper, class_ = "ColumnPerson")
|
Html("td", person_hyper, class_ = "ColumnPerson")
|
||||||
]
|
)
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
# display partner if type is either Marriage or Divorce
|
# display partner if type is either Marriage or Divorce
|
||||||
if partner is not None:
|
if partner is not None:
|
||||||
url = self.report.build_url_fname_html(partner.handle, "ppl", self.up)
|
url = self.report.build_url_fname_html(partner.handle, "ppl", self.up)
|
||||||
partner_hyper = self.person_link(url, partner, True, gid = partner.gramps_id)
|
partner_hyper = self.person_link(url, partner, True, gid = partner.gramps_id)
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", _('Partner'), class_ = "ColumnAttribute", inline = True),
|
Html("td", _("Partner"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", partner_hyper, class_ = "ColumnPartner")
|
Html("td", partner_hyper, class_ = "ColumnPartner")
|
||||||
]
|
)
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
# Narrative subsection
|
# Narrative subsection
|
||||||
@ -2244,9 +2243,9 @@ class MediaPage(BasePage):
|
|||||||
(prev, next, page_number, total_pages) = info
|
(prev, next, page_number, total_pages) = info
|
||||||
db = report.database
|
db = report.database
|
||||||
|
|
||||||
photo = db.get_object_from_handle(handle)
|
media = db.get_object_from_handle(handle)
|
||||||
# TODO. How do we pass my_media_list down for use in BasePage?
|
# TODO. How do we pass my_media_list down for use in BasePage?
|
||||||
BasePage.__init__(self, report, title, photo.gramps_id)
|
BasePage.__init__(self, report, title, media.gramps_id)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
*************************************
|
*************************************
|
||||||
@ -2316,49 +2315,48 @@ class MediaPage(BasePage):
|
|||||||
self.bibli = Bibliography()
|
self.bibli = Bibliography()
|
||||||
|
|
||||||
# get media type to be used primarily with "img" tags
|
# get media type to be used primarily with "img" tags
|
||||||
mime_type = photo.get_mime_type()
|
mime_type = media.get_mime_type()
|
||||||
mtype = Mime.get_description(mime_type)
|
mtype = Mime.get_description(mime_type)
|
||||||
|
|
||||||
if mime_type:
|
if mime_type:
|
||||||
note_only = False
|
note_only = False
|
||||||
newpath = self.copy_source_file(handle, photo)
|
newpath = self.copy_source_file(handle, media)
|
||||||
target_exists = newpath is not None
|
target_exists = newpath is not None
|
||||||
else:
|
else:
|
||||||
note_only = True
|
note_only = True
|
||||||
target_exists = False
|
target_exists = False
|
||||||
|
|
||||||
self.copy_thumbnail(handle, photo)
|
self.copy_thumbnail(handle, media)
|
||||||
self.page_title = photo.get_description()
|
self.page_title = media.get_description()
|
||||||
mediapage, body = self.write_header("%s - %s" % (_("Media"), self.page_title))
|
mediapage, body = self.write_header("%s - %s" % (_("Media"), self.page_title))
|
||||||
|
|
||||||
# begin GalleryDetail division
|
# begin MediaDetail division
|
||||||
mediadetail = Html("div", class_ = "content", id = "GalleryDetail")
|
with Html("div", class_ = "content", id = "GalleryDetail") as mediadetail:
|
||||||
body += mediadetail
|
body += mediadetail
|
||||||
|
|
||||||
# gallery navigation
|
# media navigation
|
||||||
gallerynav = Html("div", id = 'GalleryNav')
|
with Html("div", id = "GalleryNav") as medianav:
|
||||||
mediadetail += gallerynav
|
mediadetail += medianav
|
||||||
if prev:
|
if prev:
|
||||||
gallerynav += self.gallery_nav_link(prev, _('Previous'), True)
|
medianav += self.media_nav_link(prev, _("Previous"), True)
|
||||||
data = _('<strong id = "GalleryCurrent">%(page_number)d</strong> of '
|
data = _('<strong id = "GalleryCurrent">%(page_number)d</strong> of '
|
||||||
'<strong id = "GalleryTotal">%(total_pages)d</strong>' ) % {
|
'<strong id = "GalleryTotal">%(total_pages)d</strong>' ) % {
|
||||||
'page_number' : page_number, 'total_pages' : total_pages }
|
'page_number' : page_number, 'total_pages' : total_pages }
|
||||||
gallerynav += Html("span", data, id = 'GalleryPages')
|
medianav += Html("span", data, id = "GalleryPages")
|
||||||
if next:
|
if next:
|
||||||
gallerynav += self.gallery_nav_link(next, _('Next'), True)
|
medianav += self.media_nav_link(next, _("Next"), True)
|
||||||
|
|
||||||
# missing media error msg
|
# missing media error msg
|
||||||
errormsg = _('The file has been moved or deleted.')
|
errormsg = _("The file has been moved or deleted.")
|
||||||
missingimage = Html("span", errormsg, class_ = "MissingImage")
|
missingimage = Html("span", errormsg, class_ = "MissingImage")
|
||||||
|
|
||||||
# begin summaryarea division
|
# begin summaryarea division
|
||||||
summaryarea = Html("div", id = 'summaryarea')
|
with Html("div", id = "summaryarea") as summaryarea:
|
||||||
mediadetail += summaryarea
|
mediadetail += summaryarea
|
||||||
if mime_type:
|
if mime_type:
|
||||||
if mime_type.startswith("image/"):
|
if mime_type.startswith("image/"):
|
||||||
if not target_exists:
|
if not target_exists:
|
||||||
mediadisplay = Html("div", id = 'GalleryDisplay') + \
|
with Html("div", missingimage, id = "MediaDisplay") as mediadisplay:
|
||||||
missingimage
|
|
||||||
summaryarea += mediadisplay
|
summaryarea += mediadisplay
|
||||||
else:
|
else:
|
||||||
# Check how big the image is relative to the requested 'initial'
|
# Check how big the image is relative to the requested 'initial'
|
||||||
@ -2366,7 +2364,7 @@ class MediaPage(BasePage):
|
|||||||
# improve the site's responsiveness. We don't want the user to
|
# improve the site's responsiveness. We don't want the user to
|
||||||
# have to await a large download unnecessarily. Either way, set
|
# have to await a large download unnecessarily. Either way, set
|
||||||
# the display image size as requested.
|
# the display image size as requested.
|
||||||
orig_image_path = Utils.media_path_full(db, photo.get_path())
|
orig_image_path = Utils.media_path_full(db, media.get_path())
|
||||||
(width, height) = ImgManip.image_size(orig_image_path)
|
(width, height) = ImgManip.image_size(orig_image_path)
|
||||||
max_width = self.report.options['maxinitialimagewidth']
|
max_width = self.report.options['maxinitialimagewidth']
|
||||||
max_height = self.report.options['maxinitialimageheight']
|
max_height = self.report.options['maxinitialimageheight']
|
||||||
@ -2398,9 +2396,9 @@ class MediaPage(BasePage):
|
|||||||
# TODO. Convert disk path to URL.
|
# TODO. Convert disk path to URL.
|
||||||
url = self.report.build_url_fname(initial_image_path, None, self.up)
|
url = self.report.build_url_fname(initial_image_path, None, self.up)
|
||||||
if initial_image_path != newpath:
|
if initial_image_path != newpath:
|
||||||
scalemsg = Html("p", '(%d x %d).' % (width, height), inline = True)
|
scalemsg = Html("p", "(%d x %d)" % (width, height), inline = True)
|
||||||
summaryarea += scalemsg
|
summaryarea += scalemsg
|
||||||
mediadisplay = Html("div", style='width:%dpx; height:%dpx;' % (new_width, new_height))
|
with Html("div", style = 'width: %dpx; height: %dpx' % (new_width, new_height)) as mediadisplay:
|
||||||
summaryarea += mediadisplay
|
summaryarea += mediadisplay
|
||||||
|
|
||||||
# Feature #2634; display the mouse-selectable regions.
|
# Feature #2634; display the mouse-selectable regions.
|
||||||
@ -2411,7 +2409,7 @@ class MediaPage(BasePage):
|
|||||||
mediadisplay += ordered
|
mediadisplay += ordered
|
||||||
while len(_region_items) > 0:
|
while len(_region_items) > 0:
|
||||||
(name, x, y, w, h, linkurl) = _region_items.pop()
|
(name, x, y, w, h, linkurl) = _region_items.pop()
|
||||||
ordered += Html("li", style='left:%d%%; top:%d%%; width:%d%%; height:%d%%;'
|
ordered += Html("li", style = "left:%d%%; top:%d%%; width:%d%%; height:%d%%;"
|
||||||
% (x, y, w, h)) +(
|
% (x, y, w, h)) +(
|
||||||
Html("a", name, href = linkurl)
|
Html("a", name, href = linkurl)
|
||||||
)
|
)
|
||||||
@ -2419,7 +2417,7 @@ class MediaPage(BasePage):
|
|||||||
# display the image
|
# display the image
|
||||||
if initial_image_path != newpath:
|
if initial_image_path != newpath:
|
||||||
url = self.report.build_url_fname(newpath, None, self.up)
|
url = self.report.build_url_fname(newpath, None, self.up)
|
||||||
mediadisplay += (Html("a", href = url) +
|
mediadisplay += Html("a", href = url) + (
|
||||||
Html("img", width = new_width, height = new_height, src = url,
|
Html("img", width = new_width, height = new_height, src = url,
|
||||||
alt = html_escape(self.page_title))
|
alt = html_escape(self.page_title))
|
||||||
)
|
)
|
||||||
@ -2427,22 +2425,21 @@ class MediaPage(BasePage):
|
|||||||
dirname = tempfile.mkdtemp()
|
dirname = tempfile.mkdtemp()
|
||||||
thmb_path = os.path.join(dirname, "temp.png")
|
thmb_path = os.path.join(dirname, "temp.png")
|
||||||
if ThumbNails.run_thumbnailer(mime_type,
|
if ThumbNails.run_thumbnailer(mime_type,
|
||||||
Utils.media_path_full(db,
|
Utils.media_path_full(db, media.get_path()),
|
||||||
photo.get_path()),
|
|
||||||
thmb_path, 320):
|
thmb_path, 320):
|
||||||
try:
|
try:
|
||||||
path = self.report.build_path('preview', photo.handle)
|
path = self.report.build_path("preview", media.handle)
|
||||||
npath = os.path.join(path, photo.handle) + '.png'
|
npath = os.path.join(path, media.handle) + ".png"
|
||||||
self.report.copy_file(thmb_path, npath)
|
self.report.copy_file(thmb_path, npath)
|
||||||
path = npath
|
path = npath
|
||||||
os.unlink(thmb_path)
|
os.unlink(thmb_path)
|
||||||
except IOError:
|
except IOError:
|
||||||
path = os.path.join('images', 'document.png')
|
path = os.path.join("images", "document.png")
|
||||||
else:
|
else:
|
||||||
path = os.path.join('images', 'document.png')
|
path = os.path.join("images", "document.png")
|
||||||
os.rmdir(dirname)
|
os.rmdir(dirname)
|
||||||
|
|
||||||
mediadisplay = Html("div", id = 'GalleryDisplay')
|
with Html("div", id = "GalleryDisplay") as mediadisplay:
|
||||||
summaryarea += mediadisplay
|
summaryarea += mediadisplay
|
||||||
if target_exists:
|
if target_exists:
|
||||||
# TODO. Convert disk path to URL
|
# TODO. Convert disk path to URL
|
||||||
@ -2460,9 +2457,9 @@ class MediaPage(BasePage):
|
|||||||
else:
|
else:
|
||||||
mediadisplay += missingimage
|
mediadisplay += missingimage
|
||||||
else:
|
else:
|
||||||
mediadisplay = Html("div", id = 'GalleryDisplay')
|
with Html("div", id = "GalleryDisplay") as mediadisplay:
|
||||||
summaryarea += mediadisplay
|
summaryarea += mediadisplay
|
||||||
url = self.report.build_url_image('document.png', 'images', self.up)
|
url = self.report.build_url_image("document.png", "images", self.up)
|
||||||
mediadisplay += Html("img", src = url, alt = html_escape(self.page_title))
|
mediadisplay += Html("img", src = url, alt = html_escape(self.page_title))
|
||||||
|
|
||||||
# media title
|
# media title
|
||||||
@ -2474,10 +2471,10 @@ class MediaPage(BasePage):
|
|||||||
summaryarea += table
|
summaryarea += table
|
||||||
|
|
||||||
# GRAMPS ID
|
# GRAMPS ID
|
||||||
media_gid = photo.gramps_id
|
media_gid = media.gramps_id
|
||||||
if not self.noid and media_gid:
|
if not self.noid and media_gid:
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", _('GRAMPS ID'), class_ = "ColumnAttribute", inline = True),
|
Html("td", GRAMPSID, class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", media_gid, class_ = "ColumnValue", inline = True)
|
Html("td", media_gid, class_ = "ColumnValue", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
@ -2491,30 +2488,27 @@ class MediaPage(BasePage):
|
|||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# media date
|
# media date
|
||||||
date = format_date(photo.get_date_object() )
|
date = media.get_date_object()
|
||||||
if date:
|
if date:
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", DHEAD, class_ = "ColumnAttribute", inline = True),
|
Html("td", DHEAD, class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", date, class_ = "ColumnValue", inline = True)
|
Html("td", format(date), class_ = "ColumnValue", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# display image Exif tags/ keys if any?
|
# display image Exif tags/ keys if any?
|
||||||
if (pyexiftaglib and mime_type.startswith('image/')):
|
if ((pyexiftaglib and self.exiftagsopt) and mime_type.startswith("image/")):
|
||||||
"""
|
"""
|
||||||
# Determine if the python exif lib is installed on the system?
|
# Determine if the python exif lib is installed on the system?
|
||||||
# yes, then use it and determine if the photo has anything written inside of it?
|
# yes, then use it and determine if the photo has anything written inside of it?
|
||||||
"""
|
"""
|
||||||
|
|
||||||
image = pyexiv2.Image("%s" % Utils.media_path_full(db, photo.get_path()))
|
image = pyexiv2.Image("%s" % Utils.media_path_full(db, media.get_path()) )
|
||||||
image.readMetadata()
|
image.readMetadata()
|
||||||
|
|
||||||
# exif data does exists
|
# exif data does exists
|
||||||
if len(image.exifKeys() ):
|
if len(image.exifKeys() ):
|
||||||
|
|
||||||
# add clearline for better page layout
|
|
||||||
mediadetail += fullclear
|
|
||||||
|
|
||||||
# add exif title header
|
# add exif title header
|
||||||
mediadetail += Html("h4", _("Image Exif Tags"), inline = True)
|
mediadetail += Html("h4", _("Image Exif Tags"), inline = True)
|
||||||
|
|
||||||
@ -2523,26 +2517,26 @@ class MediaPage(BasePage):
|
|||||||
mediadetail += table
|
mediadetail += table
|
||||||
|
|
||||||
for keytag in image.exifKeys():
|
for keytag in image.exifKeys():
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", keytag, class_ = "ColumnAttribute", inline = True),
|
Html("td", keytag, class_ = "ColumnAttribute"),
|
||||||
Html("td", image[keytag], class_ = "ColumnValue", inline = True)
|
Html("td", image[keytag], class_ = "ColumnValue")
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
#################################################
|
##################### End of Exif Tags #####################################################
|
||||||
|
|
||||||
# get media notes
|
# get media notes
|
||||||
notelist = self.display_note_list(photo.get_note_list() )
|
notelist = self.display_note_list(media.get_note_list() )
|
||||||
if notelist is not None:
|
if notelist is not None:
|
||||||
mediadetail += notelist
|
mediadetail += notelist
|
||||||
|
|
||||||
# get attribute list
|
# get attribute list
|
||||||
attrlist = self.display_attr_list(photo.get_attribute_list(), False)
|
attrlist = self.display_attr_list(media.get_attribute_list(), False)
|
||||||
if attrlist is not None:
|
if attrlist is not None:
|
||||||
mediadetail += attrlist
|
mediadetail += attrlist
|
||||||
|
|
||||||
# get media sources
|
# get media sources
|
||||||
srclist = self.display_media_sources(photo)
|
srclist = self.display_media_sources(media)
|
||||||
if srclist is not None:
|
if srclist is not None:
|
||||||
mediadetail += srclist
|
mediadetail += srclist
|
||||||
|
|
||||||
@ -2560,11 +2554,11 @@ class MediaPage(BasePage):
|
|||||||
# and close the file
|
# and close the file
|
||||||
self.XHTMLWriter(mediapage, of)
|
self.XHTMLWriter(mediapage, of)
|
||||||
|
|
||||||
def gallery_nav_link(self, handle, name, up = False):
|
def media_nav_link(self, handle, name, up = False):
|
||||||
|
|
||||||
url = self.report.build_url_fname_html(handle, "img", up)
|
url = self.report.build_url_fname_html(handle, "img", up)
|
||||||
name = html_escape(name)
|
img_name = html_escape(name)
|
||||||
hyper = Html("a", name, id = name, href = url, title = name, inline = True)
|
hyper = Html("a", img_name, name = img_name, id = img_name, href = url, title = img_name, inline = True)
|
||||||
|
|
||||||
# return hyperlink to its callers
|
# return hyperlink to its callers
|
||||||
return hyper
|
return hyper
|
||||||
@ -2925,15 +2919,15 @@ class SourcePage(BasePage):
|
|||||||
if not self.noid:
|
if not self.noid:
|
||||||
grampsid = source.gramps_id
|
grampsid = source.gramps_id
|
||||||
|
|
||||||
for (label, val) in [(_('GRAMPS ID'), grampsid),
|
for (label, val) in [(GRAMPSID, grampsid),
|
||||||
(_('Author'), source.author),
|
(_("Author"), source.author),
|
||||||
(_('Publication information'), source.pubinfo),
|
(_("Publication information"), source.pubinfo),
|
||||||
(_('Abbreviation'), source.abbrev)]:
|
(_("Abbreviation"), source.abbrev)]:
|
||||||
if val:
|
if val:
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", label, class_ = "ColumnAttribute"),
|
Html("td", label, class_ = "ColumnAttribute"),
|
||||||
Html("td", val, class_ = "ColumnValue")
|
Html("td", val, class_ = "ColumnValue")
|
||||||
]
|
)
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
# additional media
|
# additional media
|
||||||
@ -3011,11 +3005,11 @@ class MediaListPage(BasePage):
|
|||||||
if not title:
|
if not title:
|
||||||
title = "[untitled]"
|
title = "[untitled]"
|
||||||
|
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", index, class_ = "ColumnRowLabel", inline = True),
|
Html("td", index, class_ = "ColumnRowLabel", inline = True),
|
||||||
Html("td", self.media_ref_link(handle, title), class_ = "ColumnName"),
|
Html("td", self.media_ref_link(handle, title), class_ = "ColumnName"),
|
||||||
Html("td", date, class_ = "ColumnDate", inline = True)
|
Html("td", date, class_ = "ColumnDate", inline = True)
|
||||||
]
|
)
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
|
||||||
# increment counter
|
# increment counter
|
||||||
@ -3664,11 +3658,11 @@ class IndividualPage(BasePage):
|
|||||||
pname = pname[2:]
|
pname = pname[2:]
|
||||||
|
|
||||||
type_ = str( name.get_type() )
|
type_ = str( name.get_type() )
|
||||||
trow = ( Html("tr") +
|
trow = Html("tr") + (
|
||||||
Html("td", type_, class_ = "ColumnAttribute", inline = True)
|
Html("td", type_, class_ = "ColumnAttribute", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
tcell = Html("td", pname, class_ = "ColumnValue", inline = True)
|
tcell = Html("td", pname, class_ = "ColumnValue")
|
||||||
trow += tcell
|
trow += tcell
|
||||||
|
|
||||||
# display any notes associated with this name
|
# display any notes associated with this name
|
||||||
@ -3685,44 +3679,43 @@ class IndividualPage(BasePage):
|
|||||||
# attach note
|
# attach note
|
||||||
unordered += note_text
|
unordered += note_text
|
||||||
|
|
||||||
# display call names
|
# display call name
|
||||||
first_name = primary_name.get_first_name()
|
first_name = primary_name.get_first_name()
|
||||||
for name in all_names:
|
for name in all_names:
|
||||||
call_name = name.get_call_name()
|
call_name = name.get_call_name()
|
||||||
if call_name and call_name != first_name:
|
if call_name and call_name != first_name:
|
||||||
call_name += self.get_citation_links(
|
call_name += self.get_citation_links(name.get_source_references() )
|
||||||
name.get_source_references() )
|
trow = Html("tr") + (
|
||||||
trow = [ Html("tr"),
|
Html("td", _("Call Name"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", _('Call Name'), class_ = "ColumnAttribute", inline = True),
|
|
||||||
Html("td", call_name, class_ = "ColumnValue", inline = True)
|
Html("td", call_name, class_ = "ColumnValue", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# display the nickname attribute
|
# display the nickname attribute
|
||||||
nick_name = self.person.get_nick_name()
|
nick_name = self.person.get_nick_name()
|
||||||
if nick_name and nick_name != first_name:
|
if nick_name and nick_name != first_name:
|
||||||
nick_name += self.get_citation_links(
|
nick_name += self.get_citation_links(self.person.get_source_references() )
|
||||||
self.person.get_source_references() )
|
trow = Html("tr") + (
|
||||||
trow = [ Html("tr"),
|
|
||||||
Html("td", _("Nick Name"), class_ = "ColumnAttribute", inline = True),
|
Html("td", _("Nick Name"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", nick_name, class_ = "ColumnValue", inline = True)
|
Html("td", nick_name, class_ = "ColumnValue", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# GRAMPS ID
|
# GRAMPS ID
|
||||||
if not self.noid:
|
person_gid = self.person.get_gramps_id()
|
||||||
trow = [ Html("tr"),
|
if not self.noid and person_gid:
|
||||||
Html("td", _("GRAMPS ID"), class_ = "ColumnAttribute", inline = True),
|
trow = Html("tr") + (
|
||||||
Html("td", self.person.gramps_id, class_ = "ColumnValue", inline = True)
|
Html("td", GRAMPSID, class_ = "ColumnAttribute", inline = True),
|
||||||
]
|
Html("td", person_gid, class_ = "ColumnValue", inline = True)
|
||||||
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# Gender
|
# Gender
|
||||||
gender = self.gender_map[self.person.gender]
|
gender = self.gender_map[self.person.gender]
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", _("Gender"), class_ = "ColumnAttribute", inline = True),
|
Html("td", _("Gender"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", gender, class_ = "ColumnValue", inline = True)
|
Html("td", gender, class_ = "ColumnValue", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# Age At Death???
|
# Age At Death???
|
||||||
@ -3733,7 +3726,7 @@ class IndividualPage(BasePage):
|
|||||||
if birth:
|
if birth:
|
||||||
birth_date = birth.get_date_object()
|
birth_date = birth.get_date_object()
|
||||||
|
|
||||||
if birth_date is not None:
|
if birth_date is not None and birth_date != Date.EMPTY:
|
||||||
alive = probably_alive(self.person, db, date.Today() )
|
alive = probably_alive(self.person, db, date.Today() )
|
||||||
|
|
||||||
death_date = None
|
death_date = None
|
||||||
@ -3743,13 +3736,13 @@ class IndividualPage(BasePage):
|
|||||||
if death:
|
if death:
|
||||||
death_date = death.get_date_object()
|
death_date = death.get_date_object()
|
||||||
|
|
||||||
if not alive and death_date is not None:
|
if not alive and (death_date is not None and death_date != Date.EMPTY):
|
||||||
nyears = death_date - birth_date
|
nyears = death_date - birth_date
|
||||||
nyears.format(precision = 3)
|
nyears.format(precision = 3)
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", _("Age at Death"), class_ = "ColumnAttribute", inline = True),
|
Html("td", _("Age at Death"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", nyears, class_ = "ColumnValue", inline = True)
|
Html("td", nyears, class_ = "ColumnValue", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# time since they passed away
|
# time since they passed away
|
||||||
@ -3757,19 +3750,19 @@ class IndividualPage(BasePage):
|
|||||||
nyears.format(precision = 3)
|
nyears.format(precision = 3)
|
||||||
|
|
||||||
# get appropriate gender pronoun
|
# get appropriate gender pronoun
|
||||||
if gender == "female":
|
if gender == Person.FEMALE:
|
||||||
gdr_str = "she"
|
gdr_str = "she"
|
||||||
elif gender == "male":
|
elif gender == Person.MALE:
|
||||||
gdr_str = "he"
|
gdr_str = "he"
|
||||||
else:
|
else:
|
||||||
gdr_str = "unknown"
|
gdr_str = "unknown"
|
||||||
|
|
||||||
time_str = _("It has been %(time)s, since %(gdr_str)s has died..") % {
|
time_str = _("It has been %(time)s, since %(gdr_str)s has died..") % {
|
||||||
'time' : nyears, 'gdr_str' : gdr_str }
|
'time' : nyears, 'gdr_str' : gdr_str }
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", " ", class_ = "ColumnAttribute", inline = True),
|
Html("td", " ", class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", time_str, class_ = "ColumnValue", inline = True)
|
Html("td", time_str, class_ = "ColumnValue", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# return all three pieces to its caller
|
# return all three pieces to its caller
|
||||||
@ -3789,7 +3782,7 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
# begin events division and section title
|
# begin events division and section title
|
||||||
with Html("div", class_ = "subsection", id = "events") as section:
|
with Html("div", class_ = "subsection", id = "events") as section:
|
||||||
section += Html("h4", _('Events'), inline = True)
|
section += Html("h4", _("Events"), inline = True)
|
||||||
|
|
||||||
# begin events table
|
# begin events table
|
||||||
with Html("table", class_ = "infolist eventlist") as table:
|
with Html("table", class_ = "infolist eventlist") as table:
|
||||||
@ -3823,8 +3816,7 @@ class IndividualPage(BasePage):
|
|||||||
@param: subdirs = True or False
|
@param: subdirs = True or False
|
||||||
@param: hyp = show hyperlinked evt type or not?
|
@param: hyp = show hyperlinked evt type or not?
|
||||||
"""
|
"""
|
||||||
tbody += self.display_event_row(event, evt_ref, True, False, True,
|
tbody += self.display_event_row(event, evt_ref, True, False, True, False, True, True)
|
||||||
False, True, True)
|
|
||||||
|
|
||||||
# return section to its caller
|
# return section to its caller
|
||||||
return section
|
return section
|
||||||
@ -3840,7 +3832,7 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
# begin addresses division and title
|
# begin addresses division and title
|
||||||
with Html("div", class_ = "subsection", id = "Addresses") as section:
|
with Html("div", class_ = "subsection", id = "Addresses") as section:
|
||||||
section += Html("h4", _('Addresses'), inline = True)
|
section += Html("h4", _("Addresses"), inline = True)
|
||||||
|
|
||||||
# write out addresses()
|
# write out addresses()
|
||||||
section += self.dump_addresses(self.person)
|
section += self.dump_addresses(self.person)
|
||||||
@ -3860,7 +3852,7 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
# begin LDS Ordinance division and section title
|
# begin LDS Ordinance division and section title
|
||||||
with Html("div", class_ = "subsection", id = "LDSOrdinance") as section:
|
with Html("div", class_ = "subsection", id = "LDSOrdinance") as section:
|
||||||
section += Html("h4", _('Latter-Day Saints (LDS) Ordinance'), inline = True)
|
section += Html("h4", _("Latter-Day Saints/ LDS Ordinance"), inline = True)
|
||||||
|
|
||||||
# ump individual LDS ordinance list
|
# ump individual LDS ordinance list
|
||||||
section += self.dump_ordinance(db, self.person)
|
section += self.dump_ordinance(db, self.person)
|
||||||
@ -3925,7 +3917,7 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
# begin parents division
|
# begin parents division
|
||||||
with Html("div", class_ = "subsection", id = "parents") as section:
|
with Html("div", class_ = "subsection", id = "parents") as section:
|
||||||
section += Html("h4", _('Parents'), inline = True)
|
section += Html("h4", _("Parents"), inline = True)
|
||||||
|
|
||||||
# begin parents table
|
# begin parents table
|
||||||
with Html("table", class_ = "infolist") as table:
|
with Html("table", class_ = "infolist") as table:
|
||||||
@ -3962,14 +3954,15 @@ class IndividualPage(BasePage):
|
|||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
tabcol1, tabcol2 = self.display_parent(father_handle, _('Father'), frel)
|
tcell1, tcell2 = self.display_parent(father_handle, _("Father"), frel)
|
||||||
trow += (tabcol1, tabcol2)
|
trow += (tcell1, tcell2)
|
||||||
mother_handle = family.get_mother_handle()
|
mother_handle = family.get_mother_handle()
|
||||||
if mother_handle:
|
if mother_handle:
|
||||||
trow = Html("tr")
|
trow = Html("tr")
|
||||||
table += trow
|
table += trow
|
||||||
tabcol1, tabcol2 = self.display_parent(mother_handle, _('Mother'), mrel)
|
|
||||||
trow += (tabcol1, tabcol2)
|
tcell1, tcell2 = self.display_parent(mother_handle, _("Mother"), mrel)
|
||||||
|
trow += (tcell1, tcell2)
|
||||||
|
|
||||||
first = False
|
first = False
|
||||||
if len(child_ref_list) > 1:
|
if len(child_ref_list) > 1:
|
||||||
@ -3979,13 +3972,15 @@ class IndividualPage(BasePage):
|
|||||||
# we've already "seen" this child
|
# we've already "seen" this child
|
||||||
|
|
||||||
# now that we have all natural siblings, display them...
|
# now that we have all natural siblings, display them...
|
||||||
if len(sibling):
|
if sibling:
|
||||||
trow = ( Html("tr") +
|
trow = Html("tr") + (
|
||||||
Html("td", _("Siblings"), class_ = "ColumnAttribute", inline = True)
|
Html("td", _("Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
tcell = Html("td", class_ = "ColumnValue")
|
tcell = Html("td", class_ = "ColumnValue")
|
||||||
trow += tcell
|
trow += tcell
|
||||||
|
|
||||||
ordered = Html("ol")
|
ordered = Html("ol")
|
||||||
tcell += ordered
|
tcell += ordered
|
||||||
|
|
||||||
@ -4036,13 +4031,15 @@ class IndividualPage(BasePage):
|
|||||||
half_siblings.add(half_child_handle)
|
half_siblings.add(half_child_handle)
|
||||||
|
|
||||||
# now that we have all half- siblings, display them...
|
# now that we have all half- siblings, display them...
|
||||||
if len(half_siblings):
|
if half_siblings:
|
||||||
trow = ( Html("tr") +
|
trow = Html("tr") + (
|
||||||
Html("td", _("Half Siblings"), class_ = "ColumnAttribute", inline = True)
|
Html("td", _("Half Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
tcell = Html("td", class_ = "ColumnValue")
|
tcell = Html("td", class_ = "ColumnValue")
|
||||||
trow += tcell
|
trow += tcell
|
||||||
|
|
||||||
ordered = Html("ol")
|
ordered = Html("ol")
|
||||||
tcell += ordered
|
tcell += ordered
|
||||||
|
|
||||||
@ -4076,7 +4073,7 @@ class IndividualPage(BasePage):
|
|||||||
if father_handle:
|
if father_handle:
|
||||||
tmp_parent_handles.add(father_handle)
|
tmp_parent_handles.add(father_handle)
|
||||||
|
|
||||||
while len(tmp_parent_handles) > 0:
|
while len(tmp_parent_handles):
|
||||||
# pop the next parent from the set
|
# pop the next parent from the set
|
||||||
parent_handle = tmp_parent_handles.pop()
|
parent_handle = tmp_parent_handles.pop()
|
||||||
|
|
||||||
@ -4112,7 +4109,7 @@ class IndividualPage(BasePage):
|
|||||||
# of families involved is > 1
|
# of families involved is > 1
|
||||||
|
|
||||||
if len(all_family_handles) > 1:
|
if len(all_family_handles) > 1:
|
||||||
while len(all_family_handles) > 0:
|
while len(all_family_handles):
|
||||||
# pop the next family from the set
|
# pop the next family from the set
|
||||||
family_handle = all_family_handles.pop()
|
family_handle = all_family_handles.pop()
|
||||||
# look in this family for children we haven't yet seen
|
# look in this family for children we haven't yet seen
|
||||||
@ -4127,12 +4124,14 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
# now that we have all step- siblings, display them...
|
# now that we have all step- siblings, display them...
|
||||||
if len(step_siblings):
|
if len(step_siblings):
|
||||||
trow = ( Html("tr") +
|
trow = Html("tr") + (
|
||||||
Html("td", _("Step Siblings"), class_ = "ColumnAttribute", inline = True)
|
Html("td", _("Step Siblings"), class_ = "ColumnAttribute", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
tcell = Html("td", class_ = "ColumnValue")
|
tcell = Html("td", class_ = "ColumnValue")
|
||||||
trow += tcell
|
trow += tcell
|
||||||
|
|
||||||
ordered = Html("ol")
|
ordered = Html("ol")
|
||||||
tcell += ordered
|
tcell += ordered
|
||||||
|
|
||||||
@ -4163,7 +4162,7 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
# begin families division and section title
|
# begin families division and section title
|
||||||
with Html("div", class_ = "subsection", id = "families") as section:
|
with Html("div", class_ = "subsection", id = "families") as section:
|
||||||
section += Html("h4", _('Families'), inline = True)
|
section += Html("h4", _("Families"), inline = True)
|
||||||
|
|
||||||
# begin families table
|
# begin families table
|
||||||
with Html("table", class_ = "infolist") as table:
|
with Html("table", class_ = "infolist") as table:
|
||||||
@ -4184,8 +4183,10 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
tcell = Html("td", class_ = "ColumnValue")
|
tcell = Html("td", class_ = "ColumnValue")
|
||||||
trow += tcell
|
trow += tcell
|
||||||
|
|
||||||
ordered = Html("ol")
|
ordered = Html("ol")
|
||||||
tcell += ordered
|
tcell += ordered
|
||||||
|
|
||||||
childlist = [child_ref.ref for child_ref in childlist]
|
childlist = [child_ref.ref for child_ref in childlist]
|
||||||
|
|
||||||
if self.report.options['birthorder']:
|
if self.report.options['birthorder']:
|
||||||
@ -4200,13 +4201,13 @@ class IndividualPage(BasePage):
|
|||||||
ordered += self.display_child_link(child_handle)
|
ordered += self.display_child_link(child_handle)
|
||||||
|
|
||||||
# family LDS ordinance list
|
# family LDS ordinance list
|
||||||
famldslist = family.get_lds_ord_list()
|
famldslist = family.lds_ord_list
|
||||||
if famldslist:
|
if famldslist:
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", " ", class_ = "ColumnType", inline = True),
|
Html("td", " ", class_ = "ColumnType", inline = True),
|
||||||
Html("td", " ", class_ = "ColumnAttribute", inline = True),
|
Html("td", " ", class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", self.dump_ordinance(db, family, "Family"), class_ = "ColumnValue")
|
Html("td", self.dump_ordinance(db, family, "Family"), class_ = "ColumnValue")
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# return section to its caller
|
# return section to its caller
|
||||||
@ -4245,6 +4246,7 @@ class IndividualPage(BasePage):
|
|||||||
Html("td", relstr, class_ = "ColumnAttribute", inline = True)
|
Html("td", relstr, class_ = "ColumnAttribute", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
tcell = Html("td", class_ = "ColumnValue")
|
tcell = Html("td", class_ = "ColumnValue")
|
||||||
trow += tcell
|
trow += tcell
|
||||||
|
|
||||||
@ -4384,8 +4386,7 @@ class IndividualPage(BasePage):
|
|||||||
@param: subdirs = True or False
|
@param: subdirs = True or False
|
||||||
@param: hyp = show hyperlinked evt type or not?
|
@param: hyp = show hyperlinked evt type or not?
|
||||||
"""
|
"""
|
||||||
tbody += self.display_event_row(event, event_ref, True, False,
|
tbody += self.display_event_row(event, event_ref, True, False, True, False, True, True)
|
||||||
True, False, True, True)
|
|
||||||
|
|
||||||
# return table to its callers
|
# return table to its callers
|
||||||
return table
|
return table
|
||||||
@ -4492,18 +4493,19 @@ class RepositoryPage(BasePage):
|
|||||||
repositorydetail += table
|
repositorydetail += table
|
||||||
|
|
||||||
# repository type
|
# repository type
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", THEAD, class_ = "ColumnType", inline = True),
|
Html("td", THEAD, class_ = "ColumnType", inline = True),
|
||||||
Html("td", str(repo.type), class_ = "ColumnAttribute", inline = True)
|
Html("td", str(repo.type), class_ = "ColumnAttribute", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
|
# GRAMPS ID
|
||||||
if not self.noid and gid:
|
if not self.noid and gid:
|
||||||
# repo gramps id
|
# repo gramps id
|
||||||
trow = [ Html("tr"),
|
trow = Html("tr") + (
|
||||||
Html("td", _("GRAMPS ID"), class_ = "ColumnType", inline = True),
|
Html("td", GRAMPSID, class_ = "ColumnType", inline = True),
|
||||||
Html("td", gid, class_ = "ColumnAttribute", inline = True)
|
Html("td", gid, class_ = "ColumnAttribute", inline = True)
|
||||||
]
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# repository: address(es)
|
# repository: address(es)
|
||||||
@ -4676,6 +4678,9 @@ class NavWebReport(Report):
|
|||||||
self.inc_contact = self.options['contactnote'] or \
|
self.inc_contact = self.options['contactnote'] or \
|
||||||
self.options['contactimg']
|
self.options['contactimg']
|
||||||
|
|
||||||
|
# exif tags option
|
||||||
|
self.exiftagsopt = self.options["exiftagsopt"]
|
||||||
|
|
||||||
# name format option
|
# name format option
|
||||||
self.name_format = self.options['name_format']
|
self.name_format = self.options['name_format']
|
||||||
|
|
||||||
@ -4892,7 +4897,7 @@ class NavWebReport(Report):
|
|||||||
|
|
||||||
# Copy the Creative Commons icon if the Creative Commons
|
# Copy the Creative Commons icon if the Creative Commons
|
||||||
# license is requested???
|
# license is requested???
|
||||||
if 0 < self.copyright < len(_CC):
|
if 0 < self.copyright <= len(_CC):
|
||||||
imgs += ["somerights20.gif"]
|
imgs += ["somerights20.gif"]
|
||||||
|
|
||||||
# include GRAMPS favicon
|
# include GRAMPS favicon
|
||||||
@ -4901,6 +4906,9 @@ class NavWebReport(Report):
|
|||||||
# we need the blank image gif neede by behaviour.css
|
# we need the blank image gif neede by behaviour.css
|
||||||
imgs += ["blank.gif"]
|
imgs += ["blank.gif"]
|
||||||
|
|
||||||
|
# add the document.png file for media other than photos
|
||||||
|
imgs += ["document.png"]
|
||||||
|
|
||||||
# copy Ancestor Tree graphics if needed???
|
# copy Ancestor Tree graphics if needed???
|
||||||
if self.graph:
|
if self.graph:
|
||||||
imgs += ["Web_Gender_Female.png",
|
imgs += ["Web_Gender_Female.png",
|
||||||
@ -4908,9 +4916,9 @@ class NavWebReport(Report):
|
|||||||
"Web_Gender_Male.png",
|
"Web_Gender_Male.png",
|
||||||
"Web_Gender_MaleFFF.png"]
|
"Web_Gender_MaleFFF.png"]
|
||||||
|
|
||||||
for f in imgs:
|
for fname in imgs:
|
||||||
from_path = os.path.join(const.IMAGE_DIR, f)
|
from_path = os.path.join(const.IMAGE_DIR, fname)
|
||||||
self.copy_file(from_path, f, "images")
|
self.copy_file(from_path, fname, "images")
|
||||||
|
|
||||||
def build_events(self, ind_list, event_dict):
|
def build_events(self, ind_list, event_dict):
|
||||||
"""
|
"""
|
||||||
@ -5525,6 +5533,12 @@ class NavWebOptions(MenuReportOptions):
|
|||||||
menu.add_option(category_name, 'gallery', self.__gallery)
|
menu.add_option(category_name, 'gallery', self.__gallery)
|
||||||
self.__gallery.connect('value-changed', self.__gallery_changed)
|
self.__gallery.connect('value-changed', self.__gallery_changed)
|
||||||
|
|
||||||
|
self.__exiftags = BooleanOption(_("Whether to add exif tags to the media page or not?"), False)
|
||||||
|
self.__exiftags.set_help(_("Do you want to add the exif data tags to the page? You will"
|
||||||
|
" need to have the pyexiv2 library installed on your system."
|
||||||
|
"It can be downloaded from here: http://www.exiv2.org/ ."))
|
||||||
|
menu.add_option(category_name, "exiftagsopt", self.__exiftags)
|
||||||
|
|
||||||
self.__maxinitialimagewidth = NumberOption(_("Max width of initial image"),
|
self.__maxinitialimagewidth = NumberOption(_("Max width of initial image"),
|
||||||
_DEFAULT_MAX_IMG_WIDTH, 0, 2000)
|
_DEFAULT_MAX_IMG_WIDTH, 0, 2000)
|
||||||
self.__maxinitialimagewidth.set_help(_("This allows you to set the maximum width "
|
self.__maxinitialimagewidth.set_help(_("This allows you to set the maximum width "
|
||||||
@ -5724,9 +5738,11 @@ class NavWebOptions(MenuReportOptions):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if self.__gallery.get_value() == False:
|
if self.__gallery.get_value() == False:
|
||||||
|
self.__exiftags.set_available(False)
|
||||||
self.__maxinitialimagewidth.set_available(False)
|
self.__maxinitialimagewidth.set_available(False)
|
||||||
self.__maxinitialimageheight.set_available(False)
|
self.__maxinitialimageheight.set_available(False)
|
||||||
else:
|
else:
|
||||||
|
self.__exiftags.set_available(True)
|
||||||
self.__maxinitialimagewidth.set_available(True)
|
self.__maxinitialimagewidth.set_available(True)
|
||||||
self.__maxinitialimageheight.set_available(True)
|
self.__maxinitialimageheight.set_available(True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user