Skip to content

Commit

Permalink
Add attribute citations
Browse files Browse the repository at this point in the history
  • Loading branch information
SNoiraud committed Oct 2, 2023
1 parent e359fda commit 6a5c1a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 6 additions & 7 deletions gramps/plugins/webreport/basepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,13 +912,12 @@ 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
3 changes: 3 additions & 0 deletions gramps/plugins/webreport/narrativeweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,9 @@ def _add_person(self, person_handle, bkref_class, bkref_handle):
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

0 comments on commit 6a5c1a9

Please sign in to comment.