0005678: Fix Nick Name and Call Name in narrated website. Nickname, callname and associated citations fixed for current name structure.
svn: r20521
This commit is contained in:
parent
a8f5f13950
commit
3d172b1972
@ -6027,7 +6027,10 @@ class IndividualPage(BasePage):
|
|||||||
"""
|
"""
|
||||||
self.page_title = self.sort_name
|
self.page_title = self.sort_name
|
||||||
thumbnail = self.display_first_image_as_thumbnail(self.person.get_media_list(), self.person)
|
thumbnail = self.display_first_image_as_thumbnail(self.person.get_media_list(), self.person)
|
||||||
section_title = Html("h3", self.page_title, inline =True)
|
section_title = Html("h3", self.page_title, inline =True) + \
|
||||||
|
(Html('sup') +\
|
||||||
|
(Html('small') +
|
||||||
|
self.get_citation_links(self.person.get_citation_list())))
|
||||||
|
|
||||||
# begin summaryarea division
|
# begin summaryarea division
|
||||||
with Html("div", id = 'summaryarea') as summaryarea:
|
with Html("div", id = 'summaryarea') as summaryarea:
|
||||||
@ -6038,12 +6041,15 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
primary_name = self.person.get_primary_name()
|
primary_name = self.person.get_primary_name()
|
||||||
all_names = [primary_name] + self.person.get_alternate_names()
|
all_names = [primary_name] + self.person.get_alternate_names()
|
||||||
|
# if the callname or the nickname is the same as the 'first
|
||||||
|
# name' (given name), then they are not displayed.
|
||||||
|
first_name = primary_name.get_first_name()
|
||||||
|
|
||||||
# Names [and their sources]
|
# Names [and their sources]
|
||||||
for name in all_names:
|
for name in all_names:
|
||||||
pname = _nd.display_name(name)
|
pname = _nd.display_name(name)
|
||||||
if name == primary_name:
|
# if name == primary_name:
|
||||||
pname += self.get_citation_links(self.person.get_citation_list() )
|
# pname += self.get_citation_links(self.person.get_citation_list() )
|
||||||
pname += self.get_citation_links( name.get_citation_list() )
|
pname += self.get_citation_links( name.get_citation_list() )
|
||||||
|
|
||||||
# if we have just a firstname, then the name is preceeded by ", "
|
# if we have just a firstname, then the name is preceeded by ", "
|
||||||
@ -6057,17 +6063,15 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
type_ = str( name.get_type() )
|
type_ = str( name.get_type() )
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", type_, class_ = "ColumnAttribute", inline = True)
|
Html("td", type_, class_ = "ColumnAttribute",
|
||||||
|
inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
|
||||||
tcell = Html("td", pname, class_ = "ColumnValue")
|
|
||||||
trow += tcell
|
|
||||||
|
|
||||||
|
tcell = Html("td", pname, class_ = "ColumnValue")
|
||||||
# display any notes associated with this name
|
# display any notes associated with this name
|
||||||
notelist = name.get_note_list()
|
notelist = name.get_note_list()
|
||||||
if len(notelist):
|
if len(notelist):
|
||||||
unordered = Html("ul")
|
unordered = Html("ul")
|
||||||
tcell += unordered
|
|
||||||
|
|
||||||
for notehandle in notelist:
|
for notehandle in notelist:
|
||||||
note = self.dbase_.get_note_from_handle(notehandle)
|
note = self.dbase_.get_note_from_handle(notehandle)
|
||||||
@ -6076,23 +6080,29 @@ class IndividualPage(BasePage):
|
|||||||
|
|
||||||
# attach note
|
# attach note
|
||||||
unordered += note_text
|
unordered += note_text
|
||||||
|
tcell += unordered
|
||||||
|
trow += tcell
|
||||||
|
table += trow
|
||||||
|
|
||||||
# display call name
|
# display the callname associated with this name.
|
||||||
first_name = primary_name.get_first_name()
|
|
||||||
for name in all_names:
|
|
||||||
call_name = name.get_call_name()
|
call_name = name.get_call_name()
|
||||||
if call_name and call_name != first_name:
|
if call_name and call_name != first_name:
|
||||||
call_name += self.get_citation_links(name.get_citation_list() )
|
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", _("Call Name"), class_ = "ColumnAttribute", inline = True),
|
Html("td", _("Call Name"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", call_name, class_ = "ColumnValue", inline = True)
|
Html("td", call_name, class_ = "ColumnValue", inline = True)
|
||||||
)
|
)
|
||||||
table += trow
|
table += trow
|
||||||
|
|
||||||
# display the nickname attribute
|
# display the nickname associated with this name. Note that
|
||||||
nick_name = self.person.get_nick_name()
|
# this no longer displays the Nickname attribute (if
|
||||||
|
# present), because the nickname attribute is deprecated in
|
||||||
|
# favour of the nick_name property of the name structure
|
||||||
|
# (see http://gramps.1791082.n4.nabble.com/Where-is-
|
||||||
|
# nickname-stored-tp4469779p4484272.html), and also because
|
||||||
|
# the attribute is (normally) displayed lower down the
|
||||||
|
# wNarrative Web report.
|
||||||
|
nick_name = name.get_nick_name()
|
||||||
if nick_name and nick_name != first_name:
|
if nick_name and nick_name != first_name:
|
||||||
nick_name += self.get_citation_links(self.person.get_citation_list() )
|
|
||||||
trow = Html("tr") + (
|
trow = Html("tr") + (
|
||||||
Html("td", _("Nick Name"), class_ = "ColumnAttribute", inline = True),
|
Html("td", _("Nick Name"), class_ = "ColumnAttribute", inline = True),
|
||||||
Html("td", nick_name, class_ = "ColumnValue", inline = True)
|
Html("td", nick_name, class_ = "ColumnValue", inline = True)
|
||||||
|
Loading…
Reference in New Issue
Block a user