Rest of fix of 3837

svn: r15188
This commit is contained in:
Doug Blank 2010-04-17 18:34:00 +00:00
parent 9a82394a6f
commit 8d9ad55ae6

View File

@ -340,7 +340,7 @@ class BasePage(object):
attr_data_row.append(("Sources", srcrefs)) attr_data_row.append(("Sources", srcrefs))
# get attribute note list # get attribute note list
notelist = self.dump_notes(attr.get_note_list() ) or " " notelist = self.dump_notes(attr.get_note_list() )
attr_data_row.append(("Notes", notelist)) attr_data_row.append(("Notes", notelist))
# display attribute list # display attribute list
@ -446,14 +446,14 @@ class BasePage(object):
""" """
if not notelist: if not notelist:
return " " return Html("p")
db = self.report.database db = self.report.database
# begin unordered list # begin unordered list
ul = Html("p") ul = Html("p")
for notehandle in notelist: for notehandle in notelist:
ul.extend( ul.extend(
Html("p", str(db.get_note_from_handle(notehandle).type)) Html("i", str(db.get_note_from_handle(notehandle).type))
) )
ul.extend( ul.extend(
self.get_note_format(db.get_note_from_handle(notehandle)) self.get_note_format(db.get_note_from_handle(notehandle))
@ -506,11 +506,26 @@ class BasePage(object):
notelist = evt.get_note_list() notelist = evt.get_note_list()
notelist.extend( evt_ref.get_note_list() ) notelist.extend( evt_ref.get_note_list() )
if notelist: if notelist:
notelist = self.dump_notes( notelist ) or " " htmllist = self.dump_notes( notelist )
else: else:
notelist = " " htmllist = Html("p")
# if the event or event reference has a attributes attached to it,
# get the text and format it correctly
attrlist = evt.get_attribute_list()
attrlist.extend(evt_ref.get_attribute_list())
for attr in attrlist:
htmllist.extend ( Html (
"p",
_("%(type)s: %(value)s") % {
'type' : Html("b", attr.get_type()),
'value' : attr.get_value() } ))
#also output notes attached to the attributes
notelist = attr.get_note_list()
if notelist:
htmllist.extend (self.dump_notes( notelist ))
trow += Html("td", notelist, class_ = "ColumnNotes") trow += Html("td", htmllist, class_ = "ColumnNotes")
# get event source references # get event source references
srcrefs = self.get_citation_links( evt.get_source_references() ) or " " srcrefs = self.get_citation_links( evt.get_source_references() ) or " "