Mercurial > hg > MPIWGWeb
changeset 170:485bf377913a
fix staff editing pages.
author | casties |
---|---|
date | Fri, 07 Jun 2013 16:29:34 +0200 |
parents | 2da62e93a1c6 |
children | 9d8f202e3895 |
files | SrvTxtUtils.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_publications.zpt zpt/staff/edit_shortEntry.zpt zpt/staff/edit_talks.zpt zpt/staff/edit_teaching.zpt zpt/staff/pubman/add_publications.zpt zpt/staff/pubman/change_publications.zpt |
diffstat | 12 files changed, 257 insertions(+), 240 deletions(-) [+] |
line wrap: on
line diff
--- a/SrvTxtUtils.py Fri Jun 07 12:47:11 2013 +0200 +++ b/SrvTxtUtils.py Fri Jun 07 16:29:34 2013 +0200 @@ -121,6 +121,9 @@ def getDateString(date=None, lang='en', withYear=True, monthNames=True, abbrev=False): """Return formatted date string.""" + if date is None: + return None + ds = None if callable(date.day): # callable members
--- a/zpt/staff/edit_additionalLinks.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_additionalLinks.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -3,14 +3,16 @@ <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="links python:here.getAdditionalLinks()"> - <tal:x tal:repeat="link links"> + <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> + + <form tal:attributes="action string:$root/editAdditionalLinks" method="post"> + + <input type="hidden" name="main_fields" value="additionalLink__title"> + <table tal:define="links python:here.getAdditionalLinks()"> + <tal:x tal:repeat="link links"> <tr class="fliesstext"> <td>Text over Link</td> <td><input tal:attributes="name python:'additionalLink__title__'+str(link.oid); @@ -30,7 +32,7 @@ <span tal:define="name string:additionalLink__published__${link/oid}; value link/published;"> <tal:block metal:use-macro="here/common_template/macros/yesno_input_radio"/> </span> - <a tal:attributes="href python:'deleteField?table=additionalLink&oid=%s'%link.oid">delete this link</a> + <a tal:attributes="href string:$root/deleteField?table=additionalLink&oid=${link/oid}">delete this link</a> </td> </tr> <tr>
--- a/zpt/staff/edit_basic.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_basic.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -4,7 +4,7 @@ <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"> + <form tal:attributes="action string:$root/edit" method="get"> <table> <tr> <td><b>Name</b></td> @@ -28,20 +28,15 @@ </tr> <tr> <td><b>Stay</b></td> - <td><span tal:content="here/content/date_from"/> to - <span tal:content="here/content/date_to"/> + <td><span tal:content="python:here.getDateString(date=here.content.date_from)"/> to + <span tal:content="python:here.getDateString(date=here.content.date_to)"/> </td> <tr> <td><b>Funded by (external funding)</b></td> <td><input size="30" tal:attributes="value here/content/funded_by" name="funded_by"/></td> </tr> - -<!-- <tr> - <td><b>Home institution</b></td> - <td><input size="30" tal:attributes="value here/content/home_inst" name="home_inst"></td> - </tr>--> - </table> - <table> + </table> + <table> <tr><th></th><th></th><th align="left">show</th></tr> <tr> <td><b>email (MPIWG)</b></td> @@ -62,13 +57,6 @@ <td><input size="30" name="room_no" tal:attributes="value 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 here/content/telefon"/></td> @@ -86,7 +74,7 @@ </table> <input type="submit" value="submit"/> </form> - <p>To add references to your homepage at other institutions please use <a href="editAdditionalLinks">the additional links tab</a></p> + <p>To add references to your homepage at other institutions please use <a tal:attributes="href string:$root/editAdditionalLinks">the additional links tab</a></p> </tal:block> </body> </html>
--- a/zpt/staff/edit_downloads.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_downloads.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -11,7 +11,7 @@ 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"> + <form tal:attributes="action string:$root/editDownloads"changeDownloads" method="post" enctype="multipart/form-data"> <h2>Your CV</h2> <p> <input type="hidden" name="key" tal:attributes="value here/getKey" /> @@ -24,7 +24,7 @@ <input type="submit" value="Upload the file" /> </p> <p> - <a href="downloadCV">Download the CV currently stored at the server.</a> (last update:<span + <a tal:attributes="href $root/downloadCV">Download the CV currently stored at the server.</a> (last update:<span tal:content="here/getLastUpdateCV" />) </p> <p> @@ -43,7 +43,7 @@ <input type="submit" value="Upload the file" /> </p> <p> - <a href="downloadPublications">Download the publication list currently stored at the server. </a>(last update:<span + <a tal:attributes="href $root/downloadPublications">Download the publication list currently stored at the server. </a>(last update:<span tal:content="here/getLastUpdatePublications" />) </p> <p> @@ -60,7 +60,7 @@ </form> <br /> <br /> - <a name="templates" /> + <a id="templates" /> <h3>Download Templates:</h3> <ul> <li>For OpenOffice Writer:
--- a/zpt/staff/edit_main.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_main.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -1,6 +1,7 @@ <!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" +<html xmlns="http://www.w3.org/1999/xhtml" + metal:define-macro="page" tal:define="global onload nothing; global menusel nothing; global staffroot python:here.MPIWGrootURL()+'/members'; @@ -29,8 +30,7 @@ <span tal:attributes="class python:here.getPathStyle('talks', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editTalks">Talks</a></span> <span tal:attributes="class python:here.getPathStyle('teaching', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editTeaching">Teaching</a></span> <span tal:attributes="class python:here.getPathStyle('additionalLink', menusel, 'mainmenu')"><a tal:attributes="href string:$root/editAdditionalLinks">Additional links</a></span> - - <span class="mainmenu"><a tal:attributes="href python:here.en.MPIWGrootURL()+'/staff/members/'+here.getUsername()" target="_blank">View</a></span> + <span class="mainmenu"><a tal:attributes="href string:${here/en/MPIWGrootURL}/staff/members/${here/getUsername}" target="_blank">View</a></span> </div> <div class="content"> <tal:block metal:define-slot="body"/>
--- a/zpt/staff/edit_profile.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_profile.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -1,84 +1,65 @@ <!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" - tal:define="global onload string:kupu = startKupu();"> -<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> +<html xmlns:metal="http://xml.zope.org/namespaces/metal" xmlns:tal="http://xml.zope.org/namespaces/tal" + metal:use-macro="here/mainEditFile/macros/page"> +<metal:x metal:fill-slot="javascript" tal:define="global onload string:kupu = startKupu();"> + <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:macros> </metal:x> <body> - <tal:block metal:fill-slot="navsel" tal:define="global menusel string:cv"/> + <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> - - + <tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno'"> + <form tal:attributes="action string:$root/editProfile" method="post"> + <input type="hidden" name="key" tal:attributes="value here/content/key"/> + <tal:x tal: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"> + <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> - <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> + <metal:macros use-macro="here/kupuEditor/kupumacros/macros/xmlconfig"> + <metal:macros fill-slot="dst">saveEditedContent</metal:macros> + </metal:macros> + <metal:macros use-macro="here/kupuEditor/kupumacros/macros/fulleditor"> + <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> + </tal:block> </body> </html>
--- a/zpt/staff/edit_publications.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_publications.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -5,21 +5,42 @@ <tal:block metal:fill-slot="navsel" tal:define="global menusel string:publications" /> <tal:block metal:fill-slot="body"> + <form method="post" tal:attributes="action string:$root/editPublications"> - <h2>Selection mode</h2> - <form method="post" action=""> - <input type="radio" name="selectionMode" value="year" tal:attributes="checked python:here.content.publications_mode=='year'" /> - Show the five most recent publications. (no further action needed) + <h3>Selection mode</h3> + <p> + <input type="radio" name="selectionMode" value="year" + tal:attributes="checked python:here.content.publications_mode=='year'" /> + Show the five most recent publications. (no further action needed)<br/> <input type="radio" name="selectionMode" value="priority" - tal:attributes="checked python:here.content.publications_mode=='priority'" />Show selected publications. - <input type="submit" name="submit" /> + tal:attributes="checked python:here.content.publications_mode=='priority'" /> + Show selected publications. + </p> + <p> + <input type="submit" value="Set mode" /> + </p> </form> - <ul tal:condition="python:here.content.publications_mode=='priority'"> - <li><a href="addPublicationsFromPubman">Add an Entry</a></li> - <li><a href="changePublications">Delete entries from the list or Change the priorities</a></li> + <h3>Publications</h3> - </ul> + <table> + <tr> + <th>Priority</th><th>Citation</th> + </tr> + <tr tal:repeat="entry python:here.getSelectedPublications()"> + <td valign="top" tal:content="string:[${entry/priority}]" /> + <td valign="top" tal:content="structure python:here.mpiwgPubman.getEntryFromPubman(entry.escidocid)"/> + </tr> + </table> + + <div tal:condition="python:here.content.publications_mode=='priority'"> + <p> + <a tal:attributes="href string:$root/changePublications">Change the selected publications</a> + </p> + <p> + <a tal:attributes="href string:$root/addPublicationsFromPubman">Add an entry to the selected publications</a> + </p> + </div> </tal:block> </body>
--- a/zpt/staff/edit_shortEntry.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_shortEntry.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -4,30 +4,32 @@ <head> </head> <body> -<tal:block metal:fill-slot="navsel" tal:define="global menusel string:research" /> -<tal:block metal:fill-slot="body"> + <tal:block metal:fill-slot="navsel" tal:define="global menusel string:research" /> + <tal:block metal:fill-slot="body"> - <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:define="name string:publish; value here/content/current_work_p;"> - <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> - </td> - </tr> - </table> - <input type="submit" value="submit"/> - -</tal:block> + <form tal:attributes="action string:$root/editShortEntry" 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="/en/staff/index.html" target="_blank">Fullist</a> and the lists of members of you + department + </p> + <table> + <tr> + <th /> + <th>Show</th> + </tr> + <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 + metal:use-macro="here/common_template/macros/yesno_input_radio" /></td> + </tr> + </table> + <p> + <input type="submit" value="submit" /> + </p> + </form> + </tal:block> </body> </html>
--- a/zpt/staff/edit_talks.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_talks.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -5,55 +5,56 @@ <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"> + <form tal:attributes="action string:$root/editTalks" 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(published=False)"> + <table tal:define="talks python:here.getTalks(published=False)"> <tr> <th>Date</th> <th>Title/Place/Link</th> <th>Priority</th> <th>Show</th> </tr> - <tr tal:repeat="found2 founds2"> + <tr tal:repeat="talk talks"> <td valign="top"> - <input tal:attributes="name python:'talks__date__'+str(found2.oid); - value found2/date" size="10" /> + <input tal:attributes="name python:'talks__date__'+str(talk.oid); value talk/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" /> + <input tal:attributes="name python:'talks__title__'+str(talk.oid); value python:talk.title" size="80" /><br> + <input tal:attributes="name python:'talks__place__'+str(talk.oid); value python:talk.place" size="80" /><br> + <input tal:attributes="name python:'talks__link__'+str(talk.oid); value python:talk.link" size="80" /> </td> <td valign="top"> - <input tal:attributes="name python:'talks__priority__'+str(found2.oid); value found2/priority" size="3" /> + <input tal:attributes="name python:'talks__priority__'+str(talk.oid); value talk/priority" size="3" /> </td> - <td valign="top" tal:define="name string:talks__published__${found2/oid}; value found2/published;"> + <td valign="top" tal:define="name string:talks__published__${talk/oid}; value talk/published;"> <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> </td> <td> - <a tal:attributes="href python:'deleteField?table=talks&key=%s'%found2.oid">delete</a> + <a tal:attributes="href string:$root/deleteField?table=talks&key=${talk/oid}">delete</a> </td> </tr> <tr colspan="4"> - <td>Add new</td> + <th>Add new</th> </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> + <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:define="name string:talks__published__new; value string:yes;"> - <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> + <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> </td> </tr> </table> - <input type="submit" value="submit"> - + <p> + <input type="submit" value="submit"/> + </p> </form> </tal:block> </body>
--- a/zpt/staff/edit_teaching.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/edit_teaching.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -5,51 +5,56 @@ <tal:block metal:fill-slot="navsel" tal:define="global menusel string:teaching" /> <tal:block metal:fill-slot="body"> - <form action="" method="post"> + <form tal:attributes="action string:$root/editTeaching" 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(published=False)"> + <table tal:define="teachings python:here.getTeaching(published=False)"> <tr> <th>Date</th> <th>Title/Place/Link</th> <th>Priority</th> <th>Show</th> </tr> - <tr class="fliesstext" tal:repeat="found2 founds2"> - <td valign="top"><input tal:attributes="name python:'teaching__date__'+str(found2.oid); - value python:found2.date" size="10" /> + <tr class="fliesstext" tal:repeat="teaching teachings"> + <td valign="top"> + <input tal:attributes="name python:'teaching__date__'+str(teaching.oid); value python:teaching.date" size="10" /> + </td> + + <td> + <input tal:attributes="name python:'teaching__title__'+str(teaching.oid); value python:teaching.title" size="80" /> <br/> + <input tal:attributes="name python:'teaching__place__'+str(teaching.oid); value python:teaching.place" size="80" /> <br/> + <input tal:attributes="name python:'teaching__link__'+str(teaching.oid); value python:teaching.link" size="80" /> </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:define="name string:teaching__published__${found2/oid}; value found2/published;"> + <td valign="top"> + <input tal:attributes="name python:'teaching__priority__'+str(teaching.oid); value teaching/priority" size="3" /> + </td> + <td valign="top" tal:define="name string:teaching__published__${teaching/oid}; value teaching/published;"> <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> </td> - <td><a tal:attributes="href python:'deleteField?table=teaching&oid=%s'%found2.oid">delete</a></td> + <td><a tal:attributes="href string:$root/deleteField?table=teaching&oid=${teaching/oid}">delete</a></td> </tr> <tr colspan="4"> - <td>Add new</td> + <th>Add new</th> </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 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:define="name string:teaching__published__new; value string:yes;"> <span metal:use-macro="here/common_template/macros/yesno_input_radio"/> </td> </tr> </table> - <input type="submit" value="submit"> + <p> + <input type="submit" value="submit"/> + </p> </form> </tal:block>
--- a/zpt/staff/pubman/add_publications.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/pubman/add_publications.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -2,38 +2,50 @@ "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="method" value="search"/> - <div> Author/Editor: <input type="text" size="30" name="author"/></div> - <div> Title: <input type="text" size="30" name="title"/></div> - <div> Somewhere in the metadata: <input type="text" size="30" name="any"/></div> - - <input type="submit" value="submit"> - - </form> - + <tal:block metal:fill-slot="navsel" tal:define="global menusel string:publications" /> -<div tal:condition="python:options.has_key('values')"> -<form action="" method="post"> - <input type="hidden" name="method" value="add"/> - -<table> - + <tal:block metal:fill-slot="body"> + <h3>Search publication to select</h3> + <form action="" method="post"> + <input type="hidden" name="method" value="search" /> + <table> + <tr> + <td>Author/Editor</td> + <td><input type="text" size="30" name="author" /></td> + </tr> + <tr> + <td>Title</td> + <td><input type="text" size="30" name="title" /></td> + </tr> + <tr> + <td>Somewhere in the metadata</td> + <td><input type="text" size="30" name="any" /></td> + </tr> + </table> + <p> + <input type="submit" value="Search" /> + </p> + </form> -<tr tal:repeat="entry python:options['values'].items()"> -<td><input type="checkbox" value="add" tal:attributes="name python:entry[0]"/></td> -<td><tal:x tal:replace="structure python:entry[1]"/></td> -</tr> + <div tal:condition="python:options.has_key('values')"> + <form action="" method="post"> + <input type="hidden" name="method" value="add" /> + <h3>Select publication(s) to add</h3> + <table> + <tr tal:repeat="entry python:options['values'].items()"> + <td><input type="checkbox" value="add" tal:attributes="name python:entry[0]" /></td> + <td><tal:x tal:replace="structure python:entry[1]" /></td> + </tr> + </table> + <p> + <input type="submit" value="Add to selected publications" /> + </p> + <p> + <a tal:attributes="href string:$root/editPublications">Back to publication list</a> + </p> + </form> -</table> -<input type="submit" value="submit"/> - -</form> - -</div> -</tal:block> + </div> + </tal:block> </body> </html>
--- a/zpt/staff/pubman/change_publications.zpt Fri Jun 07 12:47:11 2013 +0200 +++ b/zpt/staff/pubman/change_publications.zpt Fri Jun 07 16:29:34 2013 +0200 @@ -2,33 +2,35 @@ "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'"> - - -<div> -<form action="" method="post"> - -<table> - -<input type="hidden" value="change" name="method"/> + <tal:block metal:fill-slot="navsel" tal:define="global menusel string:publications" /> -<tr> -<td>Delete</td><td>Priority</td><td>Citation</td> -</tr> -<tr tal:repeat="entry python:here.getSelectedPublications()"> -<td><input type="checkbox" value="delete" tal:attributes="name python:entry.escidocid"/></td> -<td><input type="text" size="5" tal:attributes="name python:entry.escidocid+'__p'; value python:entry.priority"/></td> -<td><tal:x tal:replace="structure python:here.mpiwgPubman.getEntryFromPubman(entry.escidocid)"/></td> -</tr> + <tal:block metal:fill-slot="body"> + <div> + <form action="" method="post"> + <input type="hidden" value="change" name="method" /> + <table> + <tr> + <th>Delete</th> + <th>Priority</th> + <th>Citation</th> + </tr> + <tr tal:repeat="entry python:here.getSelectedPublications()"> + <td><input type="checkbox" value="delete" tal:attributes="name python:entry.escidocid" /></td> + <td><input type="text" size="5" tal:attributes="name python:entry.escidocid+'__p'; value python:entry.priority" /></td> + <td><tal:x tal:replace="structure python:here.mpiwgPubman.getEntryFromPubman(entry.escidocid)" /></td> + </tr> + </table> -</table> -<input type="submit" value="submit"/> <b>This will delete all selected entries and change the priorities!</b> + <p> + <input type="submit" value="submit" /> + <b>This will delete all selected entries and change the priorities!</b> + </p> + <p> + <a tal:attributes="href string:$root/editPublications">Back to publication list</a> + </p> + </form> -</form> - -</div> -</tal:block> + </div> + </tal:block> </body> </html>