4851: [NarWeb]: Displaying Note reference of the Source on Name object

svn: r17196
This commit is contained in:
Doug Blank 2011-04-21 23:35:15 +00:00
parent 2feab9ae20
commit 2860ed3b22

View File

@ -814,8 +814,10 @@ class BasePage(object):
title = html_escape( source.get_title() ) title = html_escape( source.get_title() )
# begin hyperlink # begin hyperlink
hyper = Html("a", title, href = url, hyper = Html("a", title,
title = _("Source Reference: ") + title, inline = True) href=url,
title=_("Source Reference: %s") % title,
inline=True)
# if not None, add name reference to hyperlink element # if not None, add name reference to hyperlink element
if cindex: if cindex:
@ -1726,30 +1728,23 @@ class BasePage(object):
ordered1 = Html("ol") ordered1 = Html("ol")
citation_ref_list = citation.get_ref_list() citation_ref_list = citation.get_ref_list()
for key, sref in citation_ref_list: for key, sref in citation_ref_list:
tmp = Html("ul")
tmp = []
confidence = Utils.confidence.get(sref.confidence, _('Unknown')) confidence = Utils.confidence.get(sref.confidence, _('Unknown'))
if confidence == _('Normal'): if confidence == _('Normal'):
confidence = None confidence = None
for (label, data) in [[DHEAD, _dd.display(sref.date)],
tmp.extend("%s: %s" % (label, data)
for (label, data) in [
[DHEAD, _dd.display(sref.date)],
[_("Page"), sref.page], [_("Page"), sref.page],
[_("Confidence"), confidence] ] [_("Confidence"), confidence] ]:
if data) if data:
tmp += Html("li", "%s: %s" % (label, data))
for handle in sref.get_note_list(): for handle in sref.get_note_list():
this_note = db.get_note_from_handle(handle) this_note = db.get_note_from_handle(handle)
if this_note is not None: if this_note is not None:
tmp.extend("%s: %s" % ( str( this_note.get_type() ), tmp += Html("li", "%s: %s" % (str(this_note.get_type() ),
self.get_note_format(this_note, True) self.get_note_format(this_note, True)
) ))
)
if tmp: if tmp:
list1 = Html("li", " ".join(tmp), inline = True) ordered1 += tmp
ordered1 += list1
if citation_ref_list: if citation_ref_list:
list += ordered1 list += ordered1