0373: Narrativeweb: relationship to central person on individual pages
This commit is contained in:
@ -6234,11 +6234,16 @@ class PersonPages(BasePage):
|
|||||||
if sect2 is not None:
|
if sect2 is not None:
|
||||||
individualdetail += sect2
|
individualdetail += sect2
|
||||||
|
|
||||||
# display parents
|
# display relationship to the center person
|
||||||
sect3 = self.display_ind_parents()
|
sect3 = self.display_ind_center_person()
|
||||||
if sect3 is not None:
|
if sect3 is not None:
|
||||||
individualdetail += sect3
|
individualdetail += sect3
|
||||||
|
|
||||||
|
# display parents
|
||||||
|
sect4 = self.display_ind_parents()
|
||||||
|
if sect4 is not None:
|
||||||
|
individualdetail += sect4
|
||||||
|
|
||||||
# display relationships
|
# display relationships
|
||||||
relationships = self.display_relationships(self.person,
|
relationships = self.display_relationships(self.person,
|
||||||
place_lat_long)
|
place_lat_long)
|
||||||
@ -7335,6 +7340,33 @@ class PersonPages(BasePage):
|
|||||||
parent_family, table)
|
parent_family, table)
|
||||||
all_family_handles.append(parent_family_handle)
|
all_family_handles.append(parent_family_handle)
|
||||||
|
|
||||||
|
def display_ind_center_person(self):
|
||||||
|
"""
|
||||||
|
Display the person's relationship to the center person
|
||||||
|
"""
|
||||||
|
center_person = self.report.database.get_person_from_gramps_id(
|
||||||
|
self.report.options['pid'])
|
||||||
|
relationship = self.rel_class.get_one_relationship(self.dbase_,
|
||||||
|
self.person,
|
||||||
|
center_person)
|
||||||
|
if relationship == "": # No relation to display
|
||||||
|
return
|
||||||
|
|
||||||
|
# begin center_person division
|
||||||
|
section = ""
|
||||||
|
with Html("div", class_="subsection", id="parents") as section:
|
||||||
|
message = _("Relation to the center person")
|
||||||
|
message += " ("
|
||||||
|
name_format = self.report.options['name_format']
|
||||||
|
primary_name = center_person.get_primary_name()
|
||||||
|
name = Name(primary_name)
|
||||||
|
name.set_display_as(name_format)
|
||||||
|
message += _nd.display_name(name)
|
||||||
|
message += ") : "
|
||||||
|
message += relationship
|
||||||
|
section += Html("h4", message, inline=True)
|
||||||
|
return section
|
||||||
|
|
||||||
def display_ind_parents(self):
|
def display_ind_parents(self):
|
||||||
"""
|
"""
|
||||||
Display a person's parents
|
Display a person's parents
|
||||||
|
Reference in New Issue
Block a user