8048 : Narrative web report: add author to citations
This commit is contained in:
parent
f7a09fc558
commit
a57257415c
@ -2355,7 +2355,12 @@ class BasePage(object):
|
|||||||
# Add this source and its references to the page
|
# Add this source and its references to the page
|
||||||
source = self.dbase_.get_source_from_handle(citation.get_source_handle())
|
source = self.dbase_.get_source_from_handle(citation.get_source_handle())
|
||||||
if source is not None:
|
if source is not None:
|
||||||
list = Html("li", self.source_link(source.get_handle(), source.get_title(),
|
if source.get_author():
|
||||||
|
authorstring = source.get_author() + ": "
|
||||||
|
else:
|
||||||
|
authorstring = ""
|
||||||
|
list = Html("li", self.source_link(source.get_handle(),
|
||||||
|
authorstring + source.get_title(),
|
||||||
source.get_gramps_id(), cindex, uplink = self.up))
|
source.get_gramps_id(), cindex, uplink = self.up))
|
||||||
else:
|
else:
|
||||||
list = Html("li", "None")
|
list = Html("li", "None")
|
||||||
@ -4234,7 +4239,7 @@ class SourcePages(BasePage):
|
|||||||
for handle in source_handles:
|
for handle in source_handles:
|
||||||
source = self.db.get_source_from_handle(handle)
|
source = self.db.get_source_from_handle(handle)
|
||||||
if source is not None:
|
if source is not None:
|
||||||
key = source.get_title() + str(source.get_gramps_id())
|
key = source.get_title() + source.get_author() + str(source.get_gramps_id())
|
||||||
source_dict[key] = (source, handle)
|
source_dict[key] = (source, handle)
|
||||||
|
|
||||||
keys = sorted(source_dict, key=SORT_KEY)
|
keys = sorted(source_dict, key=SORT_KEY)
|
||||||
@ -4256,6 +4261,7 @@ class SourcePages(BasePage):
|
|||||||
|
|
||||||
header_row = [
|
header_row = [
|
||||||
(_("Number"), "ColumnRowLabel"),
|
(_("Number"), "ColumnRowLabel"),
|
||||||
|
(_("Author"), "ColumnAuthor"),
|
||||||
(_("Source Name|Name"), "ColumnName") ]
|
(_("Source Name|Name"), "ColumnName") ]
|
||||||
|
|
||||||
trow.extend(
|
trow.extend(
|
||||||
@ -4273,6 +4279,9 @@ class SourcePages(BasePage):
|
|||||||
Html("td", index + 1, class_ ="ColumnRowLabel", inline = True)
|
Html("td", index + 1, class_ ="ColumnRowLabel", inline = True)
|
||||||
)
|
)
|
||||||
tbody += trow
|
tbody += trow
|
||||||
|
trow.extend(
|
||||||
|
Html("td", source.get_author(), class_ ="ColumnAuthor", inline = True)
|
||||||
|
)
|
||||||
trow.extend(
|
trow.extend(
|
||||||
Html("td", self.source_link(source_handle, source.get_title(),
|
Html("td", self.source_link(source_handle, source.get_title(),
|
||||||
source.get_gramps_id()), class_ ="ColumnName")
|
source.get_gramps_id()), class_ ="ColumnName")
|
||||||
|
Loading…
Reference in New Issue
Block a user