* src/EditPerson.py: display LDS temple correctly
* src/plugins/NavWebpage.py: print nickname svn: r5927
This commit is contained in:
@@ -657,8 +657,10 @@ class EditPerson:
|
||||
|
||||
def lds_field(self,lds_ord,combo,date,place):
|
||||
build_combo(combo,_temple_names)
|
||||
temple_code = const.lds_temple_to_abrev.get(lds_ord.get_temple(),"")
|
||||
|
||||
temple_code = lds_ord.get_temple()
|
||||
index = _temple_names.index(temple_code)
|
||||
|
||||
combo.set_active(index)
|
||||
if not lds_ord.is_empty():
|
||||
stat = lds_ord.get_status()
|
||||
|
@@ -147,6 +147,24 @@ class NameDisplay:
|
||||
else:
|
||||
return self._fnln(name,'')
|
||||
|
||||
def display_with_nick(self,person):
|
||||
"""
|
||||
Returns a text string representing the L{RelLib.Person} instance's
|
||||
L{RelLib.Name} in a manner that should be used for normal displaying.
|
||||
|
||||
@param person: L{RelLib.Person} instance that contains the
|
||||
L{RelLib.Name} that is to be displayed. The primary name is used for
|
||||
the display.
|
||||
@type person: L{RelLib.Person}
|
||||
@returns: Returns the L{RelLib.Person} instance's name
|
||||
@rtype: str
|
||||
"""
|
||||
name = person.get_primary_name()
|
||||
if name.display_as == RelLib.Name.LNFN:
|
||||
return self._lnfn(name,person.get_nick_name())
|
||||
else:
|
||||
return self._fnln(name,person.get_nick_name())
|
||||
|
||||
def display_name(self,name):
|
||||
"""
|
||||
Returns a text string representing the L{RelLib.Name} instance
|
||||
|
@@ -1664,6 +1664,14 @@ class IndividualPage(BasePage):
|
||||
|
||||
of.write('</td>\n</tr>\n')
|
||||
|
||||
# Gender
|
||||
|
||||
nick = self.person.get_nick_name()
|
||||
if nick:
|
||||
of.write('<tr><td class="field">%s</td>\n' % _('Nickname'))
|
||||
of.write('<td class="data">%s</td>\n' % nick)
|
||||
of.write('</tr>\n')
|
||||
|
||||
# Gender
|
||||
of.write('<tr><td class="field">%s</td>\n' % _('Gender'))
|
||||
gender = self.gender_map[self.person.gender]
|
||||
@@ -2836,7 +2844,7 @@ def nameof(person,private):
|
||||
if person.private and private:
|
||||
return _("Private")
|
||||
else:
|
||||
return _nd.display(person)
|
||||
return _nd.display_with_nick(person)
|
||||
|
||||
def name_nameof(name,private):
|
||||
if name.private and private:
|
||||
|
Reference in New Issue
Block a user