Mercurial > hg > MPIWGWeb
changeset 72:5cb46852ac05
reinsert rplaceNotEmpty in root
author | dwinter |
---|---|
date | Sun, 05 May 2013 13:56:07 +0200 |
parents | ad2e970ffd9f |
children | 33c663a08025 |
files | MPIWGRoot.py zpt/staff/member_index_html.zpt |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGRoot.py Sun May 05 12:36:28 2013 +0200 +++ b/MPIWGRoot.py Sun May 05 13:56:07 2013 +0200 @@ -60,6 +60,16 @@ self.title=title + # TODO: remove + def replaceNotEmpty(self,format,field): + """replace not empty""" + if field and (not field.lstrip()==''): + return format%field + #return self.decode(format%field) + else: + return "" + + def getLang(self): """returns the default language""" return self.lang
--- a/zpt/staff/member_index_html.zpt Sun May 05 12:36:28 2013 +0200 +++ b/zpt/staff/member_index_html.zpt Sun May 05 13:56:07 2013 +0200 @@ -35,7 +35,7 @@ <!-- profile --> <div> <tal:x tal:condition="python:not content.profile"> - <tal:y tal:replace="structure python:here.generateProfileForPerson(member)" /> + <tal:y tal:replace="structure python:member.generateProfileForPerson()" /> </tal:x> <tal:x tal:condition="content/profile"> <h2>Profile</h2>