Mercurial > hg > MPIWGWeb
changeset 236:c90c8333ca8f
fix problem with current_work_p and auto-generated profile.
author | casties |
---|---|
date | Wed, 08 Jan 2014 10:36:16 +0100 |
parents | 7fcb9b18c4d1 |
children | 45ef92d6aa8c |
files | MPIWGStaff.py zpt/staff/edit_shortEntry.zpt |
diffstat | 2 files changed, 14 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGStaff.py Wed Dec 04 10:42:22 2013 +0100 +++ b/MPIWGStaff.py Wed Jan 08 10:36:16 2014 +0100 @@ -720,7 +720,7 @@ return query = "update personal_www set " + ', '.join(fields) + " where key = %s" - values.append(self.getKey().encode('utf-8')) + values.append(self.getKey()) results = self.folder.executeZSQL(query, values) logging.debug(results) @@ -1018,15 +1018,17 @@ #founds=self.ZSQLInlineSearch(_table='research_interest',key_main=person.getKeyUTF8()) founds=self.executeZSQL('select * from research_interest where lower(key_main) = %s', [self.getKey().lower()]) if founds: - ret="<p class=\"bio_section_header\">Research interests: </p><br/>" + ret+='<h3>Research interests</h3>\n<p>' for found in self.sortPriority(founds): - ret+=found.interest+"<br/>" - if (self.content.current_work) and (not self.content.current_work==""): - ret+="<p class=\"bio_section_header\">Current work: </p><br/>" - ret+=self.content.current_work+"<br/>" - if (self.content.cv) and (not self.content.cv==""): - ret+="<p class=\"bio_section_header\">Curriculum Vitae: </p><br/>" - ret+=self.formatAscii(self.content.cv) + ret+=found.interest+'<br/>' + if founds: + ret+='</p>\n' + if (self.content.current_work_p == 'yes') and self.content.current_work: + ret+="<h3>Current work</h3>" + ret+='<p>'+self.content.current_work+'</p>\n' + if (self.content.cv_p == 'yes') and self.content.cv: + ret+="<h3>Curriculum Vitae</h3>" + ret+='<p>'+self.formatAscii(self.content.cv)+'</p>' return ret
--- a/zpt/staff/edit_shortEntry.zpt Wed Dec 04 10:42:22 2013 +0100 +++ b/zpt/staff/edit_shortEntry.zpt Wed Jan 08 10:36:16 2014 +0100 @@ -11,8 +11,8 @@ <input type="hidden" name="key" tal:attributes="value here/content/key" /> <h3>Short entry</h3> <p> - This entry appears only in the staff lists at: <a href="/en/staff/index.html" target="_blank">Fullist</a> and the lists of members of you - department + This entry appears only in the staff lists at: <a href="/en/staff/index.html" target="_blank">Fullist</a> + and the lists of members of your department. </p> <table> <tr> @@ -22,7 +22,7 @@ <tr> <td><input tal:attributes="name string:current_work; value here/content/current_work" size="80" /> </td> - <td tal:define="name string:publish; value here/content/current_work_p;"><span + <td tal:define="name string:current_work_p; value here/content/current_work_p;"><span metal:use-macro="here/common_template/macros/yesno_input_radio" /></td> </tr> </table>