Mercurial > hg > MPIWGWeb
changeset 37:9b38ba45773b
?berarbeitung MPIWGStaff
neue editfunktionen
author | dwinter |
---|---|
date | Fri, 26 Apr 2013 17:19:08 +0200 |
parents | dbe037d2f574 |
children | 3c98cc79dd14 |
files | MPIWGStaff.py zpt/staff/edit_additionalLinks.zpt zpt/staff/edit_basic.zpt zpt/staff/edit_downloads.zpt zpt/staff/edit_main.zpt zpt/staff/edit_profile.zpt zpt/staff/edit_shortEntry.zpt zpt/staff/edit_talks.zpt zpt/staff/edit_teaching.zpt |
diffstat | 9 files changed, 911 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/MPIWGStaff.py Fri Apr 26 11:02:02 2013 +0200 +++ b/MPIWGStaff.py Fri Apr 26 17:19:08 2013 +0200 @@ -18,7 +18,7 @@ from Products.ZDBInterface.ZDBInterfaceFolder import ZDBInterfaceFolder from AccessControl import ClassSecurityInfo from App.class_init import InitializeClass - +from Products.ExtFile.ExtFile import * import os import logging import email @@ -1033,11 +1033,21 @@ try: # id is the first path component id = stack[-1] + logging.debug(id) + member = self.getMember(id) if member is not None: + member = member.__of__(self) request.set('MPIWGStaffMember', member) stack.pop(-1) + #weitere parameter + if len(stack)> 0: + mode = stack[-1] + request.set('MPIWGStaffMode', mode) + stack.pop(-1) + + except (IndexError, ValueError): # missing context or not an integer id; perhaps some URL hacking going on? logging.error("error traversing user id!") @@ -1049,7 +1059,13 @@ """show homepage""" logging.debug("MPIWGStaffFolder: index_html!") member = REQUEST.get('MPIWGStaffMember', None) + mode = REQUEST.get('MPIWGStaffMode', None) if member is not None: + + if mode is not None: + return member.execute(mode,REQUEST); + + logging.debug("member: key=%s"%(member.getKey())) pt = None try: @@ -1084,6 +1100,27 @@ return member + def sortPriority(self,list): + def sort(x,y): + try: + xInt=int(x.priority) + except: + xInt=0 + try: + yInt=int(y.priority) + except: + yInt=0 + + return cmp(xInt,yInt) + + if not list: + return [] + tmp=[x for x in list] + tmp.sort(sort) + + return tmp + + def manage_addMPIWGStaffFolderForm(self): """form for adding the project""" pt=PageTemplateFile('zpt/addMPIWGStaffFolderForm', globals()).__of__(self) @@ -1099,7 +1136,7 @@ RESPONSE.redirect('manage_main') -class MPIWGStaffMember(): +class MPIWGStaffMember(Folder): """MPIWG staff member object from database""" security = ClassSecurityInfo() @@ -1134,6 +1171,7 @@ """returns the db content of this object""" return self.content + # TODO: ugly! security.declarePublic('sortBibliography') def sortBibliography(self,bib,sortingMode=None,max=None): @@ -1153,5 +1191,362 @@ else: return l + + + def execute(self,mode,REQUEST=None): + method = getattr(self,mode,None) + if method is not None: + return method(REQUEST); + else: + return "NOT FOUND" + + + def getProfile(self,REQUEST): + """get the profile""" + self.REQUEST.RESPONSE.setHeader('Last-Modified',email.Utils.formatdate().split("-")[0]+'GMT') + + + html="""<html><body>%s</body></html>""" + if self.content.profile and self.content.profile != "": + + return html%self.content.profile + else: + + return html%"" + + + def getTalks(self): + + return self.folder.executeZSQL("SELECT oid,* FROM talks WHERE key_main = %s",[self.content.key]) + #return self.folder.ZSQLInlineSearch(_table='talks',key_main=self.content.key) + + + def getTeaching(self): + + return self.folder.executeZSQL("SELECT oid,* FROM teaching WHERE key_main = %s",[self.content.key]) + + + + def getLastUpdateCV(self): + """getDate of Last Update""" + try: + fname="%s_cv.pdf"%self.getUsername().encode('utf-8') + logging.debug(fname) + ob=self.folder._getOb("downloadableFiles")._getOb(fname) + return ob.bobobase_modification_time() + except: + return "No file yet!" + + def getLastUpdatePublications(self): + """getDate of Last Update""" + try: + ob=self.folder._getOb("downloadableFiles")._getOb("%s_publications.pdf"%self.getUsername().encode('utf-8')) + return ob.bobobase_modification_time() + except: + return "No file yet!" + + + def downloadCV(self,REQUEST): + + fname="%s_cv.pdf"%self.getUsername().encode('utf-8') + logging.debug(fname) + ob=self.folder._getOb("downloadableFiles")._getOb(fname) + REQUEST.RESPONSE.redirect(ob.absolute_url()) + + def downloadPublications(self,REQUEST): + ob=self.folder._getOb("downloadableFiles")._getOb("%s_publications.pdf"%self.getUsername().encode('utf-8')) + REQUEST.RESPONSE.redirect(ob.absolute_url()) + + def getAdditionalLinks(self): + + return self.folder.executeZSQL("SELECT oid,* FROM additionalLink WHERE key_main = %s",[self.content.key]) + #return self.folder.ZSQLInlineSearch(_table='talks',key_main=self.content.key) + + #return self.folder.ZSQLInlineSearch(_table='talks',key_main=self.content.key) + + def getPathStyle(self, path, selected, style=""): + """returns a string with the given style + 'sel' if path == selected.""" + + if path == selected: + return style + 'sel' + else: + return style + + + + mainEditFile=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_main.zpt')) + + + security.declareProtected('View management screens','edit') + def edit(self,REQUEST=None): + """Edit the basic information""" + + + + if REQUEST: + argv=REQUEST.form + + if argv.has_key('last_name'): #got data to change + self.invalidate_chache() + self.changeData(argv); + + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_basic.zpt')).__of__(self) + return pt() + + + security.declareProtected('View management screens','edit') + def editShortEntry(self,REQUEST=None): + """Edit the basic information""" + + + + if REQUEST: + argv=REQUEST.form + + if argv.has_key('current_work'): #got data to change + self.invalidate_chache() + self.changeData(argv); + + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_shortEntry.zpt')).__of__(self) + return pt() + + + security.declareProtected('View management screens','editProfile') + def editProfile(self, REQUEST=None): + """edit Profile, new entry replaces CD, current work and research interests""" + + + if REQUEST: + kupu=REQUEST.form.get('kupu',None); + preview=REQUEST.form.get('preview',None); + + if kupu: + start=kupu.find("<body>") + end=kupu.find("</body>") + + newcontent= kupu[start+6:end] + query="UPDATE personal_www SET profile=%s WHERE key='%s'" + self.executeZSQL(query%(self.ZSQLQuote(newcontent),self.content.key)) + logging.error("PROFILE:"+query%(self.ZSQLQuote(newcontent),self.content.key)) + + if preview: + pass + #TODO: not supported yet + #if RESPONSE: + # self.redirect(RESPONSE,"editProfile") + + #return self.preview(newcontent) + + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_profile.zpt')).__of__(self) + return pt() + + + + security.declareProtected('View management screens','editTalks') + def editTalks(self,REQUEST): + """edit talks""" + + + if REQUEST: + argv=REQUEST.form + + if argv.has_key('main_fields'): #got data to change + self.invalidate_chache() + self.changeAdditionalData(argv); + + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_talks.zpt')).__of__(self) + return pt() + + + security.declareProtected('View management screens','editTeaching') + def editTeaching(self,REQUEST): + """edit teaching""" + + + if REQUEST: + argv=REQUEST.form + + if argv.has_key('main_fields'): #got data to change + self.invalidate_chache() + self.changeAdditionalData(argv); + + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_teaching.zpt')).__of__(self) + return pt() + + + security.declareProtected('View management screens','editAdditionalLinks.zpt') + def editAdditionalLinks(self,REQUEST): + """editiere die additiona link von der Webseite""" + + if REQUEST: + argv=REQUEST.form + + if argv.has_key('main_fields'): #got data to change + self.invalidate_chache() + self.changeAdditionalData(argv); + + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_additionalLinks.zpt')).__of__(self) + return pt() + + + security.declareProtected('View management screens','editDownloads') + def editDownloads(self,REQUEST): + """editiere die Downloads von der Webseite""" + + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt/staff','edit_downloads.zpt')).__of__(self) + return pt() + + def changeDownloads(self,REQUEST): + """"change the downloadable files""" + self.invalidate_chache(); + + data=REQUEST.form + + ob = self.folder._getOb("downloadableFiles") + + if data.get('cv_publish',None): + + self.changeData({'cv_p':data['cv_publish']}) + + if data.get('publications_publish',None): + self.changeData({'publications_p':data['publications_publish']}) + + + if data.get('cv_pdf',None): + cvName ="%s_cv.pdf"%self.getUsername() + cvName=cvName.encode('utf-8') + logging.debug("CCC") + if not hasattr(ob,cvName): + + cvFile = ExtFile(cvName,cvName) + ob._setObject(cvName,cvFile) + + + cvFile = getattr(ob,cvName) + + cvFile.manage_upload(file=data['cv_pdf']) + + + + + if data.get('publications_pdf',None): + + + pdfName="%s_publications.pdf"%self.getUsername() + pdfName=pdfName.encode('utf-8') + + if not hasattr(ob,pdfName): + + cvFile = ExtFile(pdfName,pdfName) + ob._setObject(pdfName,cvFile) + + + cvFile = getattr(ob,pdfName) + + cvFile.manage_upload(file=data['publications_pdf']) + + + #REQUEST.response.redirect(self.REQUEST['HTTP_REFERER']) + + + + + def changeData(self,changeSet): + """changes the data in the database, changeset expects field --> value.""" + for field in changeSet.keys(): + if hasattr(self.content,field): + logging.debug("Changing: %s"%field) + + + results = self.folder.executeZSQL("update personal_www set "+field+" = %s where key = %s ", [changeSet.get(field),self.getKey().encode('utf-8')]); + + logging.debug(results) + + + security.declareProtected('View management screens','changeAdditionalData') + def changeAdditionalData(self,data): + """change the research entries""" + + self.invalidate_chache(); + + newEntries={} + + + mainfieldL=data['main_fields'].split(",") #fields to be changed + # format DATABASE__FIELDNAME + + mainfield={} + for x in mainfieldL: + tmp=x.split('__') + mainfield[tmp[0]]=tmp[1] + for field in data: + splittedField=field.split("__") + if len(splittedField)<3: + pass #kein datenbank eintrag + + elif splittedField[2]=='new': # store new entries + if not newEntries.has_key(splittedField[0]): + newEntries[splittedField[0]]={} + + newEntries[splittedField[0]][splittedField[1]]=data[field] + + else: + query="UPDATE %s "%splittedField[0] + query+="SET %s = '%s' "%(splittedField[1],sql_quote(data[field])) + query+="WHERE oid = '%s' "%sql_quote(splittedField[2]) + + self.executeZSQL(query) + + + #new entries + for newEntry in newEntries.keys(): + query="INSERT INTO %s "%newEntry + keys=['key_main'] + values=["'"+sql_quote(self.getKey())+"'"] + for key in newEntries[newEntry].keys(): + keys.append(key) + values.append("'"+sql_quote(newEntries[newEntry][key])+"'") + + + keystring=",".join(keys) + + valuestring=",".join(values) + + query+=" (%s) "%keystring + query+="VALUES (%s)"%valuestring + if not (newEntries[newEntry][mainfield[newEntry]].lstrip().rstrip()==""): + self.executeZSQL(query) + + + + + def deleteField(self,REQUEST): + """delete entry""" + + + table = REQUEST.form.get('table',None); + oid = REQUEST.form.get('oid',None); + + if table is None or oid is None: + return + + query="DELETE FROM %s WHERE oid = '%s'"%(table,oid) + + self.executeZSQL(query) + REQUEST.response.redirect(self.REQUEST['HTTP_REFERER']) + + + def invalidate_chache(self): + #TODO: How to invalidate the varnish cache from the member object + pass; + + + def getStaffURL(self): + ident = self.content.e_mail; + splitted = ident.split("@"); + return splitted[0] + + + InitializeClass(MPIWGStaffMember)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_additionalLinks.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,71 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/mainEditFile/macros/page"> +<body> +<tal:block metal:fill-slot="navsel" tal:define="global menusel string:additionalLink" /> +<p>You can add links to documents or project websites you want to provide and are relevant for +presenting your work and research interests</p> + +<tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> + <form action="" method="post"> + <input type="hidden" name="main_fields" value="additionalLink__title"> + <table tal:define="founds2 python:here.getAdditionalLinks()"> + <tal:x tal:repeat="found2 python:here.sortPriority(founds2)"> + <tr class="fliesstext"> + <td>Text over Link</td> + <td><input tal:attributes="name python:'additionalLink__title__'+str(found2.oid); + value python:found2.title" size="80" /> </td> + </tr> + <tr> + <td>Url</td> + <td><input tal:attributes="name python:'additionalLink__link__'+str(found2.oid); + value python:found2.link" size="80" /></td> + </tr> + <tr> + <td valign="top">Priority <input tal:attributes="name python:'additionalLink__priority__'+str(found2.oid); + value python:found2.priority" + size="3" /> + </td> + <td valign="top">Publish + <tal:x tal:content="structure python:here.ZSQLSelectionFromCRList( + 'additionalLink__published__'+str(found2.oid), + yes_no_list, + boxType='radio', + checked=found2.published)" /> + <a tal:attributes="href python:'deleteField?table=additionalLink&oid=%s'%found2.oid">delete this link</a> + </td> + </tr> + <tr> + <td colspan="2"><hr/></td> + </tr> + </tal:x> + <tr > + <td colspan="2"><b>Add new link</b></td> + </tr> + <tr> + <td>Text over Link</td> + <td><input tal:attributes="name python:'additionalLink__title__new'" size="80"/></td> + </tr> + <tr> + <td>Url</td> + <td><input tal:attributes="name python:'additionalLink__link__new'" size="80" /></td> + </tr> + <tr> + <td>Priority <input tal:attributes="name python:'additionalLink__priority__new'" size="3"></td> + <td valign="top">Publish + <tal:x tal:content="structure python:here.ZSQLSelectionFromCRList( + 'additionalLink__published__new', + yes_no_list, + boxType='radio', + checked='yes')" /> + </td> + </tr> + </table> + <input type="submit" value="submit"> + + </form> + <p>Please contact the IT Group <a href="mailto:itgroup@mpiwg-berlin.mpg.de">itgroup@mpiwg-berlin.mpg.de</a>, if you intend + to link to documents not available in the net and if you want to publish these.</p> +</tal:block> +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_basic.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,101 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/mainEditFile/macros/page"> +<body> + <tal:block metal:fill-slot="navsel" tal:define="global menusel string:maindata"/> + <tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> + <form action="" method="get"> + <table> + <tr> + <td><b>Name</b></td> + <td><input size="30" tal:attributes="value python:here.content.last_name" name="last_name"></td> + </tr> + <tr> + <td><b>First Name</b></td> + <td><input size="30" tal:attributes="value python:here.content.first_name" name="first_name"></td> + </tr> + <tr> + <td><b>Academic degrees and position</b></td> + <td><textarea tal:content="python:here.content.titles_new" name="titles_new" cols="60" rows="3"/></td> + </tr> + <tr> + <td><b>Status</b></td> + <td tal:content="python:here.content.status"/> + </tr> + <tr> + <td><b>Department</b></td> + <td tal:content="python:here.content.department"/> + </tr> + <tr> + <td><b>Stay</b></td> + <td><span tal:content="python:here.content.date_from"/> to + <span tal:content="python:here.content.date_to"/> + </td> + <tr> + <td><b>Funded by (external funding)</b></td> + <td><input size="30" tal:attributes="value python:here.content.funded_by" name="funded_by"></td> + </tr> + +<!-- <tr> + <td><b>Home institution</b></td> + <td><input size="30" tal:attributes="value python:here.content.home_inst" name="home_inst"></td> + </tr>--> + </table> + <table> + <tr><th></th><th></th><th align="left">show</th></tr> + <tr> + <td><b>email (MPIWG)</b></td> + <td tal:content="python:here.content.e_mail"/> + <td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList( + 'e_mail_p', + yes_no_list, + boxType='radio', + checked=here.content.e_mail_p)"/> + </tr> + <tr> + <td><b>email (additional)</b></td> + <td><input size="30" name="e_mail2" tal:attributes="value python:here.content.e_mail2"></td> + <td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList( + 'e_mail2_p', + yes_no_list, + boxType='radio', + checked=here.content.e_mail2_p)"/> + </tr> + <tr> + <td><b>Room</b></td> + <td><input size="30" name="room_no" tal:attributes="value python:here.content.room_no"></td> + <td>(never published)</td> + </tr> + +<!-- <tr> + <td><b>Private homepage</b></td> + <td><input size="30" name="private_homepage" tal:attributes="value python:here.decode(person.private_homepage)"></td> + <td> </td> + </tr> + --> + <tr> + <td><b>Telephone</b></td> + <td><input size="30" name="telefon" tal:attributes="value python:here.content.telefon"></td> + <td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList( + 'telefon_p', + yes_no_list, + boxType='radio', + checked=here.content.telefon_p)"/> + </tr> + <tr> + <td><b>Fax</b></td> + <td><input size="30" name="fax" tal:attributes="value python:here.content.fax"></td> + <td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList( + 'fax_p', + yes_no_list, + boxType='radio', + checked=here.content.fax_p)"/> + </tr> + </table> + <input type="submit" value="submit"> + </form> + <p>To add references to your homepage at other institutions plese use <a href="editAdditionalLinks">the additional links tab</a></p> + </tal:block> + </body> + </html> + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_downloads.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,56 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/mainEditFile/macros/page"> +<head> +</head> +<body> +<tal:block metal:fill-slot="navsel" tal:define="global menusel string:downloads" /> +<tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> +<p>Here you can upload your CV and and publication list to be downloaded from your homepage.</p> +<p>The documents should be in <b>PDF format</b>. Add the add bottom of this page you find <a href="#templates">templates</a> for OpenOffice and +Word to make it easier for you to create these documents.</p> +<form action="changeDownloads" method="post" enctype="multipart/form-data"> +<h2>Your CV</h2> +<p><input type="hidden" name="key" tal:attributes="value here/getKey"/></p> +<p><input type="file" name="cv_pdf"/></p> +<p>Remember that documents should be in <b>PDF format</b>. <br/><input type="submit" value="Upload the file"/></p> +<p><a href="downloadCV">Download the CV currently stored at the server.</a> (last update:<span tal:content="here/getLastUpdateCV"/>)</p> +<p>publish: <tal:x tal:content="structure python:here.ZSQLSelectionFromCRList( + 'cv_publish', + yes_no_list, + boxType='radio', + checked=getattr(here,'cv_publish','no'))" /></p> + +<h2>Publication list</h2> +<p><input type="file" name="publications_pdf"/></p> +<p>Remember that documents should be in <b>PDF format</b>. <br/><input type="submit" value="Upload the file"/></p> +<p><a href="downloadPublications">Download the publicaton list currently stored at the server. </a>(last update:<span tal:content="here/getLastUpdatePublications"/>)</p> +<p>publish: <tal:x tal:content="structure python:here.ZSQLSelectionFromCRList( + 'publications_publish', + yes_no_list, + boxType='radio', + checked=getattr(here,'publications_publish','no'))" /></p> + +<p><input type="submit" value="Update"/></p> + +</form> +<br/> <br/> +<a name="templates"/><h3>Download Templates:</h3> +<ul> + <li>For OpenOffice Writer: + <ul> + <li><a href="downloads/publications_template.ott">Publication List</a> </li> + <li><a href="downloads/CV_template.ott">CV</a></li> + </ul> + </li> + <li>For Ms Word: + <ul> + <li><a href="downloads/Vorlage_Publikation.dot">Publication List</a></li> + <li><a href="downloads/Beispiel_CV.doc">CV</a></li> + </ul> + </li> +</ul> +</tal:block> + +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_main.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,38 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:define-macro="page"> +<head> + <!-- <base tal:attributes="href python:here.getStaffURL()+'/'"/>--> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" href="editstaff.css" type="text/css"/> + <metal:x metal:define-slot="javascript"/> +</head> +<body onload="kupu = startKupu();"> + <h2 class="title">Edit homepage of <span tal:replace="python:here.content.first_name"/> <span tal:replace="python:here.content.last_name"/></h2> + <metal:block metal:define-slot="navsel"/> + <p>Please contact the support group <a href="mailto:support@mpiwg-berlin.mpg.de">support@mpiwg-berlin.mpg.de (Tel. 247)</a>, if you need any help.</p> + + <div class="mainnav"> + <span tal:attributes="class python:here.getPathStyle('maindata', menusel, 'mainmenu')"><a href="edit">Basic Data</a></span> + <span tal:attributes="class python:here.getPathStyle('cv', menusel, 'mainmenu')"><a href="editProfile">Profile</a></span> + <span tal:attributes="class python:here.getPathStyle('publications', menusel, 'mainmenu')"><a href="editPublications">Publications</a></span> + <span tal:attributes="class python:here.getPathStyle('research', menusel, 'mainmenu')"><a href="editShortEntry">Research: short entry</a></span> + <span tal:attributes="class python:here.getPathStyle('image', menusel, 'mainmenu')"><a href="editImage">Photo</a></span> + <span tal:attributes="class python:here.getPathStyle('downloads', menusel, 'mainmenu')"><a href="editDownloads">Edit +downloads</a></span> + <!-- <span tal:attributes="class python:here.getPathStyle('cv', menusel, 'mainmenu')"><a href="editCV">Curriculum Vitae</a></span>--> + + <!-- <span tal:attributes="class python:here.getPathStyle('awards', menusel, 'mainmenu')"><a href="editAwards">Awards</a></span>--> + <span tal:attributes="class python:here.getPathStyle('talks', menusel, 'mainmenu')"><a href="editTalks">Talks</a></span> + <span tal:attributes="class python:here.getPathStyle('teaching', menusel, 'mainmenu')"><a href="editTeaching">Teaching</a></span> + <span tal:attributes="class python:here.getPathStyle('additionalLink', menusel, 'mainmenu')"><a href="editAdditionalLinks">Additional links</a></span> + + + + <span class="mainmenu"><a tal:attributes="href python:'http://www.mpiwg-berlin.mpg.de/en/staff/members/'+here.getStaffURL()+'/index_html'" target="_blank">View</a></span> + </div> + <div class="content"> + <tal:block metal:define-slot="body"/> + </div> +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_profile.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,83 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/mainEditFile/macros/page"> +<metal:x metal:fill-slot="javascript"> +<metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" use-macro="here/kupuEditor/kupumacros/macros/head"> + <metal:macros fill-slot="bootstrap-editor"> + <script type="text/javascript" src="/kupuEditor/kupuinit_form.js"> </script> + <script type="text/javascript" src="/kupuEditor/kupustart_form.js"> </script> + </metal:macros> +</metal:macros> +</metal:x> +<body> + <tal:block metal:fill-slot="navsel" tal:define="global menusel string:cv"/> + +<tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> +<form action="" method="post"> +<input type="hidden" name="key" tal:attributes="value here/content/key"> +<tal:x condition="python:(here.content.profile is None) | (here.content.profile=='')"> +<p>You haven't edited your profile yet, this entry is generated automatically from you old CV entry, your current work entry, and research interests entry from you old profile! </p> + +</tal:x> + + + + <div><span class="kupu-tb-buttongroup"> + <button type="button" id="kupu-preview-button" title="preview: alt-p" accesskey="p">Preview</button> + </span> + <span class="kupu-tb-buttongroup"> + <button type="button" id="kupu-save-button" title="save: alt-s" accesskey="s">Publish</button> + </span> + </div> + <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" use-macro="here/kupuEditor/kupumacros/macros/xmlconfig"> + <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" fill-slot="dst">saveEditedContent</metal:macros> + </metal:macros> + <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" use-macro="here/kupuEditor/kupumacros/macros/fulleditor"> + + <!-- <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" fill-slot="tb_select_styles"> + <span id="kupu-tb-styles"/> + </metal:macros> + <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" fill-slot="buttongroup_subsuper"> + <span id="kupu-bg-subsuper"/> + <span id="kupu-subscript-button"/> + <span id="kupu-superscript-button"/> + </metal:macros> + + <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" fill-slot="buttongroup_justify"> + <span id="kupu-justifyleft-button"/> + <span id="kupu-justifycenter-button"/> + <span id="kupu-justifyright-button"/> + </metal:macros> + <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" fill-slot="buttongroup_list"> + <span id="kupu-list-ol-addbutton"/> + <span id="kupu-list-ul-addbutton"/> + + </metal:macros> + <metal:macros xmlns:metal="http://xml.zope.org/namespaces/metal" fill-slot="buttongroup_indent"/> + --> + + <metal:macros fill-slot="toolbox_properties"> + <div class="kupu-toolbox" id="kupu-toolbox-properties"><input type="hidden" class="wide" id="kupu-properties-title" /> <input + type="hidden" class="wide" id="kupu-properties-description" /></div> + </metal:macros> + <metal:macros fill-slot="toolbox_tables"> + <div class="kupu-toolbox" id="kupu-toolbox-properties"><input type="hidden" class="wide" id="kupu-table-classchooser" /> <input + type="hidden" class="wide" id="kupu-table-newrows" /> <input type="hidden" class="wide" id="kupu-table-newcols" /></div> + </metal:macros> + <metal:macros fill-slot="editorframe"> + + <iframe class="kupu-editor-iframe" id="kupu-editor" frameborder="0" scrolling="auto" src="fulldoc" + tal:attributes="src python:here.REQUEST['URL1']+'/'+here.getStaffURL()+'/getProfile?time='+here.REQUEST.get('time','0')"> + </iframe> + + </metal:macros> + </metal:macros> + + + </form> + + +<br/> +</tal:block> +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_shortEntry.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,36 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/mainEditFile/macros/page"> +<head> +</head> +<body> +<tal:block metal:fill-slot="navsel" tal:define="global menusel string:research" /> +<tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> + + <form action="" method="post"> + <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="../staff/fullist.html">Fullist</a> and the + lists of members of you department</p> + <table> + <tr> + <th /> + <th>Show</th> + </tr> + <tr class="fliesstext"> + <td><input tal:attributes="name python:'current_work'; + value python:here.content.current_work" size="80" /> + </td> + <td + tal:content="structure python:here.ZSQLSelectionFromCRList( + 'publish', + yes_no_list, + boxType='radio', + checked=here.content.current_work_p)" /> + </tr> + </table> + <input type="submit" value="submit"/> + +</tal:block> +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_talks.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,66 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/mainEditFile/macros/page"> +<body> +<tal:block metal:fill-slot="navsel" tal:define="global menusel string:talks" /> + +<tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> + <form action="" method="post"> + <input type="hidden" name="key_main" tal:attributes="value python:here.content.key"> + <input type="hidden" name="main_fields" value="talks__title"> + <table tal:define="founds2 python:here.getTalks()"> + <tr> + <th>Date</th> + <th>Title/Place/Link</th> + <th>Priority</th> + <th>Show</th> + </tr> + <tr class="fliesstext" tal:repeat="found2 python:here.sortPriority(founds2)"> + <td valign="top"> + <input tal:attributes="name python:'talks__date__'+str(found2.oid); + value found2/date" size="10" /> + </td> + <td> + <input tal:attributes="name python:'talks__title__'+str(found2.oid); + value python:found2.title" size="80" /><br> + <input tal:attributes="name python:'talks__place__'+str(found2.oid); + value python:found2.place" size="80" /><br> + <input tal:attributes="name python:'talks__link__'+str(found2.oid); + value python:found2.link" size="80" /> + </td> + <td valign="top"> + <input tal:attributes="name python:'talks__priority__'+str(found2.oid); value found2/priority" size="3" /> + </td> + <td valign="top" + tal:content="structure python:here.ZSQLSelectionFromCRList( + 'talks__published__'+str(found2.oid), + yes_no_list, + boxType='radio', + checked=found2.published)" /> + <td> + <a tal:attributes="href python:'deleteField?table=talks&key=%s'%found2.oid">delete</a> + </td> + </tr> + <tr colspan="4"> + <td>Add new</td> + </tr> + <tr> + <td valign="top"><input tal:attributes="name python:'talks__date__new'" size="10" /></td> + <td><input tal:attributes="name python:'talks__title__new'" size="80"> <br> + <input tal:attributes="name python:'talks__place__new'" size="80" /> <br> + <input tal:attributes="name python:'talks__link__new'" size="80" /></td> + <td><input tal:attributes="name python:'talks__priority__new'" size="3"></td> + <td valign="top" + tal:content="structure python:here.ZSQLSelectionFromCRList( + 'talks__published__new', + yes_no_list, + boxType='radio', + checked='yes')" /> + </tr> + </table> + <input type="submit" value="submit"> + + </form> +</tal:block> +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/staff/edit_teaching.zpt Fri Apr 26 17:19:08 2013 +0200 @@ -0,0 +1,63 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/mainEditFile/macros/page"> +<body> +<tal:block metal:fill-slot="navsel" tal:define="global menusel string:teaching" /> + +<tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> + <form action="" method="post"> + <input type="hidden" name="key_main" tal:attributes="value python:here.content.key"> + <input type="hidden" name="main_fields" value="teaching__title"> + <table tal:define="founds2 python:here.getTeaching()"> + <tr> + <th>Date</th> + <th>Title/Place/Link</th> + <th>Priority</th> + <th>Show</th> + </tr> + <tr class="fliesstext" tal:repeat="found2 python:here.sortPriority(founds2)"> + <td valign="top"><input tal:attributes="name python:'teaching__date__'+str(found2.oid); + value python:found2.date" size="10" /> + </td> + + <td><input tal:attributes="name python:'teaching__title__'+str(found2.oid); + value python:found2.title" size="80" /> <br> + <input tal:attributes="name python:'teaching__place__'+str(found2.oid); + value python:found2.place" size="80" /> <br> + <input tal:attributes="name python:'teaching__link__'+str(found2.oid); + value python:found2.link" size="80" /></td> + + <td valign="top"><input tal:attributes="name python:'teaching__priority__'+str(found2.oid); + value found2/priority" + size="3" /></td> + <td valign="top" + tal:content="structure python:here.ZSQLSelectionFromCRList( + 'teaching__published__'+str(found2.oid), + yes_no_list, + boxType='radio', + checked=found2.published)" /> + <td><a tal:attributes="href python:'deleteField?table=teaching&oid=%s'%found2.oid">delete</a></td> + </tr> + <tr colspan="4"> + <td>Add new</td> + </tr> + <tr> + <td valign="top"><input tal:attributes="name python:'teaching__date__new'" size="10" /></td> + <td><input tal:attributes="name python:'teaching__title__new'" size="80"> <br> + <input tal:attributes="name python:'teaching__place__new'" size="80" /> <br> + <input tal:attributes="name python:'teaching__link__new'" size="80" /></td> + <td><input tal:attributes="name python:'teaching__priority__new'" size="3"></td> + <td valign="top" + tal:content="structure python:here.ZSQLSelectionFromCRList( + 'teaching__published__new', + yes_no_list, + boxType='radio', + checked='yes')" /> + </tr> + </table> + <input type="submit" value="submit"> + + </form> +</tal:block> +</body> +</html>