Skip to content

Commit

Permalink
Merge pull request #1608 from SNoiraud/B13046-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Hall committed Feb 6, 2024
2 parents dd788e2 + 220e1b6 commit b8cf8b7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
1 change: 1 addition & 0 deletions gramps/gen/proxy/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ def sanitize_event_ref(db, event_ref):

new_ref.set_reference_handle(event_ref.get_reference_handle())
new_ref.set_role(event_ref.get_role())
copy_citation_ref_list(db, event_ref, new_ref)
copy_notes(db, event_ref, new_ref)
copy_attributes(db, event_ref, new_ref)

Expand Down
24 changes: 17 additions & 7 deletions gramps/plugins/webreport/basepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,12 @@ def display_event_row(

trow2 = Html("tr")
# get event source references
srcrefs = self.get_citation_links(event.get_citation_list()) or " "
srcrefs = (
self.get_citation_links(
event.get_citation_list() + event_ref.get_citation_list()
)
or " "
)
trow += Html("td", srcrefs, class_="ColumnSources", rowspan=2)

# get event notes
Expand All @@ -911,13 +916,18 @@ def display_event_row(
# cached original
attrlist.extend(event_ref.get_attribute_list())
for attr in attrlist:
htmllist.extend(
Html(
"p",
self._("%(str1)s: %(str2)s")
% {"str1": Html("b", attr.get_type()), "str2": attr.get_value()},
)
attrrefs = self.get_citation_links(attr.get_citation_list())
attrdesc = self._("%(str1)s: %(str2)s") % {
"str1": Html("b", attr.get_type()),
"str2": attr.get_value(),
}
attr_row = (
Html("tr")
+ Html("td", "&nbsp")
+ Html("td", attrdesc, colspan=3)
+ Html("td", attrrefs)
)
htmllist.extend(attr_row)

# also output notes attached to the attributes
notelist = attr.get_note_list()
Expand Down
9 changes: 9 additions & 0 deletions gramps/plugins/webreport/narrativeweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,11 @@ def _add_person(self, person_handle, bkref_class, bkref_handle):

for citation_handle in event.get_citation_list():
self._add_citation(citation_handle, Person, person_handle)
for citation_handle in evt_ref.get_citation_list():
self._add_citation(citation_handle, Person, person_handle)
for attr in evt_ref.get_attribute_list():
for citation_handle in attr.get_citation_list():
self._add_citation(citation_handle, Event, evt_ref.ref)

############### Families section ##############
# Tell the families tab to display this individuals families
Expand Down Expand Up @@ -753,6 +758,10 @@ def _add_person(self, person_handle, bkref_class, bkref_handle):
self._add_citation(
cite_hdl, Person, person_handle
)
for cite_hdl in evt_ref.get_citation_list():
self._add_citation(
cite_hdl, Person, person_handle
)
# add the family media and the family event media if the
# families page is not being displayed (If it is displayed,
# the media are linked from the families page)
Expand Down

0 comments on commit b8cf8b7

Please sign in to comment.