Working on source references and events. Changes in stylesheet to match work.
svn: r13619
This commit is contained in:
parent
03af2705e7
commit
1888d3b423
@ -88,22 +88,22 @@ img {
|
||||
overflow: auto;
|
||||
width:965px;
|
||||
margin:0 auto;
|
||||
padding-bottom:.5em;
|
||||
padding-bottom: .2em;
|
||||
}
|
||||
.content div.snapshot {
|
||||
margin:0;
|
||||
padding:0;
|
||||
background:none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
}
|
||||
.content div.snapshot div.thumbnail {
|
||||
margin:0;
|
||||
padding:2em 0 0 0;
|
||||
background:none;
|
||||
margin: 0;
|
||||
padding: 2em 0 0 0;
|
||||
background: none;
|
||||
}
|
||||
.content div.snapshot div.thumbnail a {
|
||||
display:block;
|
||||
width:96px;
|
||||
margin:0 auto;
|
||||
display: block;
|
||||
width: 96px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.fullclear {
|
||||
width:100%;
|
||||
@ -149,8 +149,10 @@ p#description {
|
||||
padding:1em 20px;
|
||||
}
|
||||
p#description:first-letter {
|
||||
color: #228A22;
|
||||
font-size:xx-large;
|
||||
color: #903;
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
p a {
|
||||
color: #FFF;
|
||||
@ -311,8 +313,9 @@ div#navigation ul li.CurrentSection a:hover {
|
||||
}
|
||||
div#subnavigation ul li.CurrentSection a {
|
||||
border-width: 0px 0px 2px 0px;
|
||||
border-color: #6AF364;
|
||||
border-color: #5D835F;
|
||||
}
|
||||
i0
|
||||
|
||||
/* Alphabet Navigation
|
||||
----------------------------------------------------- */
|
||||
@ -329,7 +332,7 @@ div#alphabet ul {
|
||||
padding: 0px 0px 0px 16px;
|
||||
border-width: 2px 0px 4px 0px;
|
||||
border-style: solid;
|
||||
border-color: #000;
|
||||
border-color: #5D835F;
|
||||
}
|
||||
div#alphabet ul li:after {
|
||||
content:" |";
|
||||
@ -385,7 +388,7 @@ table.infolist tr td a {
|
||||
color: #000;
|
||||
}
|
||||
table.infolist tr.BeginLetter td, table.infolist tr.BeginSurname td {
|
||||
border-top:solid 1px #5D835F;
|
||||
border-top: solid 1px #5D835F;
|
||||
}
|
||||
table.infolist tr td.ColumnLetter {
|
||||
width:3%;
|
||||
@ -481,14 +484,14 @@ table.surnamelist tbody tr td.ColumnSurname:hover,
|
||||
background-color: #C1B398;
|
||||
}
|
||||
table.surname {
|
||||
border-bottom:solid 1px #5D835F;
|
||||
border-bottom: solid 1px #5D835F;
|
||||
}
|
||||
table.surname thead tr th.ColumnName {
|
||||
width:20%;
|
||||
padding-left:20px;
|
||||
}
|
||||
table.surname tbody tr td {
|
||||
border-bottom:dashed 1px #000;
|
||||
border-bottom: dashed 1px #5D835F;
|
||||
background-color: #D8F3D6;
|
||||
}
|
||||
table.surname tbody tr td.ColumnName {
|
||||
@ -701,7 +704,7 @@ div#EventDetail table.eventlist tbody tr td.ColumnEvent {
|
||||
#GalleryNav a {
|
||||
font-weight:bold;
|
||||
text-decoration:none;
|
||||
border:solid 1px #5D835F;
|
||||
border: solid 1px #5D835F;
|
||||
}
|
||||
#GalleryNav a#Previous {
|
||||
padding:.5em .7em .3em .7em;
|
||||
@ -743,12 +746,12 @@ div#EventDetail table.eventlist tbody tr td.ColumnEvent {
|
||||
#GalleryDetail div#summaryarea table.gallery {
|
||||
padding-bottom:0;
|
||||
margin: 1.5em 0 0 0;
|
||||
border-style:solid;
|
||||
border-width:2px 0 1px 0;
|
||||
border-style: solid;
|
||||
border-width: 2px 0 1px 0;
|
||||
border-color: #5D835F;
|
||||
}
|
||||
table.exifdata tr td.ColumnAttribute {
|
||||
border-top:solid 1px #5D835F;
|
||||
border-top: solid 1px #5D835F;
|
||||
width:60%;
|
||||
}
|
||||
table.exiflist tr td.ColumnValue {
|
||||
@ -763,7 +766,7 @@ table.exiflist tr td.ColumnValue {
|
||||
width:500px;
|
||||
margin:0 auto;
|
||||
padding:3em;
|
||||
border:double 4px #5D835F;
|
||||
border: double 4px #5D835F;
|
||||
}
|
||||
#Contact #summaryarea img {
|
||||
float:right;
|
||||
@ -817,11 +820,11 @@ div#Download table.download img {
|
||||
float:center;
|
||||
}
|
||||
div#Download table.download tbody tr#Row02 {
|
||||
border-bottom:solid 2px #000;
|
||||
border-bottom: solid 2px #5D835F;
|
||||
}
|
||||
div#Download table.download tbody tr td {
|
||||
background-color: #D8F3D6;
|
||||
border: solid 1px #000;
|
||||
border: solid 1px #5D835F;
|
||||
text-align:left;
|
||||
}
|
||||
div#Download table.download td.Filename {
|
||||
@ -1097,7 +1100,7 @@ table.ldsordlist {
|
||||
margin-bottom:.5em;
|
||||
}
|
||||
table.ldsordlist tbody tr td {
|
||||
border-bottom:solid 1px #000;
|
||||
border-bottom: solid 1px #5D835F;
|
||||
}
|
||||
table.ldsordlist tbody tr td.ColumnLDSType {
|
||||
width:12%;
|
||||
@ -1181,7 +1184,7 @@ div#Addresses table.infolist tbody tr td.ColumnPhone {
|
||||
#indivgallery div.thumbnail a img {
|
||||
margin-bottom:.5cm;
|
||||
padding:0;
|
||||
border:solid 1px #000;
|
||||
border: solid 1px #5D835F;
|
||||
}
|
||||
#indivgallery div.thumbnail p {
|
||||
font:normal .7em/1.4em sans-serif;
|
||||
@ -1228,7 +1231,7 @@ div#summaryarea table.infolist {
|
||||
margin:0;
|
||||
padding:0;
|
||||
background:#FFF;
|
||||
border-bottom:solid .7em #FFF;
|
||||
border-bottom: solid .7em #5D835F;
|
||||
}
|
||||
div#summaryarea table.infolist tr td, div#summaryarea table.infolist tr td p {
|
||||
font:normal .9em/1.2em sans-serif;
|
||||
|
@ -545,7 +545,7 @@ class BasePage(object):
|
||||
else:
|
||||
return eventtype
|
||||
|
||||
def get_event_data(self, evt, evt_ref, showplc, showdescr, showsrc, shownote, subdirs, hyp, gid = None):
|
||||
def get_event_data(self, evt, evt_ref, showplc, showdescr, showsrc, shownote, up, hyp, gid = None):
|
||||
"""
|
||||
retrieve event data from event and evt_ref
|
||||
|
||||
@ -555,7 +555,7 @@ class BasePage(object):
|
||||
@param: showdescr = to show the event description or not?
|
||||
@param: showsrc = to show the event source references or not?
|
||||
@param: shownote = show notes or not?
|
||||
@param: subdirs = either True or False
|
||||
@param: up = either True or False; add subdirs or not?
|
||||
@param: hyp = to hyperlink the event type or not?
|
||||
"""
|
||||
db = self.report.database
|
||||
@ -566,16 +566,18 @@ class BasePage(object):
|
||||
# get hyperlink or not?
|
||||
evt_hyper = evt_type
|
||||
if hyp:
|
||||
evt_hyper = self.event_link(evt_type, evt_ref.ref, gid, subdirs)
|
||||
evt_hyper = self.event_link(evt_type, evt_ref.ref, gid, up)
|
||||
|
||||
# get place name
|
||||
place = None
|
||||
place_handle = evt.get_place_handle()
|
||||
if place_handle:
|
||||
place = db.get_place_from_handle(place_handle)
|
||||
|
||||
place_hyper = None
|
||||
if place:
|
||||
place_name = ReportUtils.place_name(db, place_handle)
|
||||
place_hyper = self.place_link(place_handle, place_name, up = subdirs)
|
||||
place_hyper = self.place_link(place_handle, place_name, up = up)
|
||||
|
||||
# wrap it all up and return to its callers
|
||||
# position 0 = translatable label, position 1 = column class
|
||||
@ -678,17 +680,16 @@ class BasePage(object):
|
||||
# return table to its callers
|
||||
return table
|
||||
|
||||
def source_link(self, handle, hyper_name, name, gid = None, up = False):
|
||||
def source_link(self, handle, name, gid = None, up = False):
|
||||
"""
|
||||
creates a link to the source
|
||||
"""
|
||||
|
||||
url = self.report.build_url_fname_html(handle, "src", up)
|
||||
|
||||
# begin hyperlink
|
||||
hyper = Html("a", html_escape(name), href = url, title = html_escape(name))
|
||||
|
||||
# adding to accomodate display_source_refs()
|
||||
if hyper_name:
|
||||
hyper.attr += 'name = "%s"' % hyper_name
|
||||
|
||||
# add GRAMPS ID
|
||||
if not self.noid and gid:
|
||||
hyper += Html("span", ' [%s]' % gid, class_ = "grampsid", inline = True)
|
||||
@ -878,11 +879,10 @@ class BasePage(object):
|
||||
|
||||
def display_attr_list(self, attrlist, showsrc):
|
||||
"""
|
||||
will display an object's attributes
|
||||
will display a list of attributes
|
||||
|
||||
@param: attrlist = a list of attributes
|
||||
@param: objtype = which object are we using? Ex. Person, Event, Photo
|
||||
@param: showsrc = to shown source references or not?
|
||||
@param: attrlist -- a list of attributes
|
||||
@param: showsrc -- to shown source references or not?
|
||||
"""
|
||||
if not attrlist:
|
||||
return None
|
||||
@ -1345,18 +1345,23 @@ class BasePage(object):
|
||||
def display_source_refs(self, bibli):
|
||||
if bibli.get_citation_count() == 0:
|
||||
return None
|
||||
db = self.report.database
|
||||
|
||||
# begin Source References division and title
|
||||
# local gettext variables
|
||||
_PAGE = _("Page")
|
||||
_CONFIDENCE = _("Confidence")
|
||||
_TEXT = _("Text")
|
||||
|
||||
db = self.report.database
|
||||
with Html("div", id = "sourcerefs", class_ = "subsection") as section:
|
||||
section += Html("h4", _("Source References"), inline = True)
|
||||
|
||||
ordered = Html("ol")
|
||||
|
||||
cindex = 0
|
||||
for citation in bibli.get_citation_list():
|
||||
|
||||
citationlist = bibli.get_citation_list()
|
||||
for citation in citationlist:
|
||||
cindex += 1
|
||||
|
||||
# Add this source to the global list of sources to be displayed
|
||||
# on each source page.
|
||||
lnk = (self.report.cur_fname, self.page_title, self.gid)
|
||||
@ -1370,42 +1375,41 @@ class BasePage(object):
|
||||
# Add this source and its references to the page
|
||||
source = db.get_source_from_handle(shandle)
|
||||
title = source.get_title()
|
||||
|
||||
list = Html("li", inline = True)
|
||||
|
||||
hyper = (Html("a", name = "sref%d" % cindex) +
|
||||
self.source_link(source.handle, title, source.gramps_id, True)
|
||||
list = Html("li", inline = True) + (
|
||||
Html("a", self.source_link(source.handle, title, source.gramps_id, True),
|
||||
name = "sref%d" % cindex)
|
||||
)
|
||||
list += hyper
|
||||
ordered += list
|
||||
|
||||
ordered1 = Html("ol")
|
||||
list += ordered1
|
||||
|
||||
for key, sref in citation.get_ref_list():
|
||||
citation_ref_list = citation.get_ref_list()
|
||||
for key, sref in citation_ref_list:
|
||||
|
||||
tmp = []
|
||||
confidence = Utils.confidence.get(sref.confidence, _('Unknown'))
|
||||
if confidence == _('Normal'):
|
||||
confidence = None
|
||||
for (label, data) in [(_("Date"), format_date(sref.date)),
|
||||
(_("Page"), sref.page),
|
||||
(_("Confidence"), confidence)]:
|
||||
for (label, data) in [(DHEAD, format_date(sref.date)),
|
||||
(_PAGE, sref.page),
|
||||
(_CONFIDENCE, confidence)]:
|
||||
if data:
|
||||
tmp.append("%s: %s" % (label, data))
|
||||
|
||||
notelist = sref.get_note_list()
|
||||
for notehandle in notelist:
|
||||
note = db.get_note_from_handle(notehandle)
|
||||
note_text = self.get_note_format(note)
|
||||
tmp.append("%s: %s" % (_('Text'), note_text))
|
||||
if len(tmp) > 0:
|
||||
|
||||
list1 = Html("li")
|
||||
tmp.append("%s: %s" % (_TEXT, note_text))
|
||||
if len(tmp):
|
||||
list1 = Html("li", inline = True) + (
|
||||
Html("a", '; '.join(tmp), name = "sref%d%s" % (cindex, key))
|
||||
)
|
||||
ordered1 += list1
|
||||
list += ordered1
|
||||
ordered += list
|
||||
section += ordered
|
||||
|
||||
hyper1 = Html("a", '; '.join(tmp), name = "sref%d%s" % (cindex, key))
|
||||
list1 += hyper1
|
||||
|
||||
# return section to its callers
|
||||
# return section to its caller
|
||||
return section
|
||||
|
||||
def display_references(self, handlelist, up = False):
|
||||
@ -3360,7 +3364,6 @@ class IndividualPage(BasePage):
|
||||
self.place_list = place_list
|
||||
self.sort_name = self.get_name(person)
|
||||
self.name = self.get_name(person)
|
||||
self.attribute_list = attribute_list
|
||||
db = report.database
|
||||
|
||||
of = self.report.create_file(person.handle, "ppl")
|
||||
@ -3890,7 +3893,7 @@ class IndividualPage(BasePage):
|
||||
db = self.report.database
|
||||
|
||||
# begin events division and section title
|
||||
with Html("div", class_ = "subsection", id = "events") as section:
|
||||
with Html("div", id = "events", class_ = "subsection") as section:
|
||||
section += Html("h4", _("Events"), inline = True)
|
||||
|
||||
# begin events table
|
||||
@ -3906,7 +3909,7 @@ class IndividualPage(BasePage):
|
||||
@param: show source references
|
||||
@param: show note
|
||||
"""
|
||||
thead += self.display_event_header(True, False, True, False)
|
||||
thead += self.display_event_header(True, True, True, False)
|
||||
|
||||
tbody = Html("tbody")
|
||||
table += tbody
|
||||
@ -3925,7 +3928,7 @@ class IndividualPage(BasePage):
|
||||
@param: subdirs = True or False
|
||||
@param: hyp = show hyperlinked evt type or not?
|
||||
"""
|
||||
tbody += self.display_event_row(event, evt_ref, True, False, True, False, True, True)
|
||||
tbody += self.display_event_row(event, evt_ref, True, True, True, False, True, True)
|
||||
|
||||
# return section to its caller
|
||||
return section
|
||||
@ -4442,6 +4445,9 @@ class IndividualPage(BasePage):
|
||||
return trow
|
||||
|
||||
def format_event(self, eventlist):
|
||||
"""
|
||||
displays the event row for events such as marriage and divorce
|
||||
"""
|
||||
db = self.report.database
|
||||
|
||||
# begin eventlist table and table header
|
||||
@ -4456,7 +4462,7 @@ class IndividualPage(BasePage):
|
||||
@param: show source references
|
||||
@param: show note
|
||||
"""
|
||||
thead += self.display_event_header(True, False, True, False)
|
||||
thead += self.display_event_header(True, True, True, False)
|
||||
|
||||
# begin table body
|
||||
tbody = Html("tbody")
|
||||
@ -4473,10 +4479,10 @@ class IndividualPage(BasePage):
|
||||
@param: show description or not?
|
||||
@param: show source references or not?
|
||||
@param: shownote = show notes or not?
|
||||
@param: subdirs = True or False
|
||||
@param: up = True or False: attach subdirs or not?
|
||||
@param: hyp = show hyperlinked evt type or not?
|
||||
"""
|
||||
tbody += self.display_event_row(event, event_ref, True, False, True, False, True, True)
|
||||
tbody += self.display_event_row(event, event_ref, True, True, True, False, True, True)
|
||||
|
||||
# return table to its callers
|
||||
return table
|
||||
|
Loading…
Reference in New Issue
Block a user