File:  [Repository] / MPIWGWeb / zpt / Attic / editPublications.zpt
Revision 1.1.2.5: download - view: text, annotated - select for diffs - revision graph
Tue Oct 18 12:59:51 2005 UTC (18 years, 8 months ago) by casties
Branches: r2
nicer editing for personal homepages

    1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    2:           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    3: <html metal:use-macro="here/mainEditFile/macros/page">
    4: <body>
    5:   <tal:block metal:fill-slot="navsel" tal:define="global selected python:'publications'"/>
    6: 
    7: <tal:block metal:fill-slot="body" tal:define="yes_no_list python:'yes\nno';
    8: 											sortingMode python:'year\npriority'">
    9: 
   10: <p><a href="addPublications">Add Publications to your list</a></p>
   11: <form action="changePublicationSelectionMode" method="post">
   12: 
   13: <h3>Select the 5 publications to be displayed at your <a src="../index.html" target="blank"> homepage</a></h3>
   14: <p>Choose the first 5 of my list following the order of</p>
   15: <table tal:define="sm python:here.getPublicationSelectionMode()">
   16: 	<tr tal:condition="python:sm=='priority'">
   17: 		<td>
   18:           <span><input type="radio" name="publicationSelectionMode" value="year"/>year</span>
   19:           <span><input checked type="radio" name="publicationSelectionMode" value="priority"/>priority</span>
   20:         </td>
   21:     <td><input type="submit" value="change"></td>
   22: 	</tr>
   23: 	<tr tal:condition="not:python:sm=='priority'">
   24:     <td>
   25:       <span><input checked type="radio" name="publicationSelectionMode" value="year"/> year</span>
   26: 		<span><input type="radio" name="publicationSelectionMode" value="priority"/> priority</span>
   27:     </td>
   28:     <td><input type="submit" value="change"></td>
   29: 	</tr>
   30: </table>
   31: </form>
   32: 
   33: <h3>Changing sort order, delete or edit publications</h3>
   34: <p>Editing is only possible for publications which are not imported from the institutsbiliography. For more information see XXX</p>
   35: <form action="changeSortingMode" method="post">
   36: <p>Sort by:</p>
   37: 	<table>
   38: 		<td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList(
   39: 			     'sortingMode',
   40: 			     sortingMode,
   41: 			     boxType='radio',
   42: 			     checked=here.getSortingMode())"/>
   43: 		<td><input type="submit" value="change"></td>
   44: 	</table>
   45: 
   46: </form>
   47: 
   48: <h2>Publication list</h2>
   49: 
   50:    <form action="changePublications" method="post">
   51:      <input type="hidden" name="id_main" tal:attributes="value person/id">
   52:      <input type="hidden" name="main_fields" value="publications__title,publications__publish">
   53:      
   54:      <tal:block tal:define="books python:here.ZSQLSimpleSearch('select *,oid from publications where id_main=\'%s\' and lower(referencetype)in (\'book\') and publish=\'yes\' order by priority'%here.getDBId());
   55: 			     edited_books python:here.ZSQLSimpleSearch('select *,oid from publications where id_main=\'%s\' and lower(referencetype)in (\'edited book\') and publish=\'yes\' order by priority'%here.getDBId());
   56: 			     not_displayed python:here.ZSQLSimpleSearch('select *,oid from publications where id_main=\'%s\' and publish=\'no\' order by priority'%here.getDBId());
   57: 			     articles python:here.ZSQLSimpleSearch('select *,oid from publications where id_main=\'%s\' and lower(referencetype) not in (\'book\',\'edited book\') and publish=\'yes\' order by priority'%here.getDBId())">
   58:     
   59: 	 <tal:block tal:condition="books">
   60: 
   61: 	 <h3>Books</h3>
   62: 		<table>
   63: 		  <tr tal:repeat="found 	python:here.sortBibliography(books)">
   64: 		  	<td>
   65: 		  	  <a tal:condition="python:found.id_gen_bib and (not found.id_gen_bib=='')" 
   66: 		  	  	 tal:attributes="href python:'editBibliography?id=%s'%found.id_gen_bib">edit</a>
   67: 		  	  	 
   68: 			  <a tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a>	  
   69: 		  	</td>
   70: 		  	<td>
   71: 			  <span tal:replace="structure python:here.formatBibliography(here,found)"/>
   72: 			</td>
   73: 	        	<td valign="top">
   74: 	   			<input tal:attributes="name python:'publications__priority__'+str(found.oid);
   75: 				     value python:here.integer(found.priority)" size="3"/>
   76: 	 		</td>
   77: 	 		<td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList(
   78: 			     'publications__publish__'+str(found.oid),
   79: 			     yes_no_list,
   80: 			     boxType='radio',
   81: 			     checked=found.publish)"/>
   82:         		</tr>
   83:         </table>
   84:      </tal:block>
   85: 
   86:      <tal:block tal:condition="edited_books">
   87:      <h3>Edited Books</h3>
   88:      <table>
   89: 
   90: 	  <tr tal:repeat="found python:here.sortBibliography(edited_books)">
   91: 	  	<td>
   92: 	  		  <a tal:condition="python:found.id_gen_bib and (not found.id_gen_bib=='')" 
   93: 		  	  	 tal:attributes="href python:'editBibliography?id=%s'%found.id_gen_bib">edit</a>
   94: 		  	  	 
   95: 	  		<a tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a>
   96: 	  	</td>
   97: 	  	<td>  
   98: 	      <span tal:replace="structure python:here.formatBibliography(here,found)"/>
   99: 	    </td>
  100: 	    <td valign="top">
  101: 	   		<input tal:attributes="name python:'publications__priority__'+str(found.oid);
  102: 			   		value python:here.integer(found.priority)" size="3"/>
  103: 		
  104: 	 	</td>
  105: 	 	<td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList(
  106: 			     'publications__publish__'+str(found.oid),
  107: 			     yes_no_list,
  108: 			     boxType='radio',
  109: 			     checked=found.publish)"/>
  110:         </tr>
  111:        </table>
  112:      </tal:block>
  113: 
  114:      <tal:block tal:condition="articles">
  115: 	<h3>Articles and Chapters</h3>
  116: 	<table>
  117: 	  <tr tal:repeat="found python:here.sortBibliography(articles)">
  118: 	  	<td>	  
  119: 	  		  <a tal:condition="python:found.id_gen_bib and (not found.id_gen_bib=='')" 
  120: 		  	  	 tal:attributes="href python:'editBibliography?id=%s'%found.id_gen_bib">edit</a>
  121: 		  	  	 
  122: 			<a tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a>
  123: 		</td>
  124: 		<td>
  125: 		    <span tal:replace="structure python:here.formatBibliography(here,found)"/>
  126: 		 </td>
  127: 	     <td valign="top">
  128: 		   <input tal:attributes="name python:'publications__priority__'+str(found.oid);
  129: 				     value python:here.integer(found.priority)" size="3"/>
  130: 
  131: 		 </td>
  132: 	 	<td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList(
  133: 			     'publications__publish__'+str(found.oid),
  134: 			     yes_no_list,
  135: 			     boxType='radio',
  136: 			     checked=found.publish)"/>
  137:         </tr>
  138: 		</table>
  139: 		<hr>
  140: 		<h3>Not displayed at the page</h3>
  141: 		<table>
  142: 	    <tr tal:repeat="found python:here.sortBibliography(not_displayed)">
  143: 	  	<td>	  
  144: 			<a tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a>
  145: 		</td>
  146: 		<td>
  147: 		    <span tal:replace="structure python:here.formatBibliography(here,found)"/>
  148: 		 </td>
  149: 	     <td valign="top">
  150: 		   <input tal:attributes="name python:'publications__priority__'+str(found.oid);
  151: 		   				     value python:here.integer(found.priority)" size="3"/>
  152: 
  153: 		 </td>
  154: 	 	<td valign="top" tal:content="structure python:here.ZSQLSelectionFromCRList(
  155: 			     'publications__publish__'+str(found.oid),
  156: 			     yes_no_list,
  157: 			     boxType='radio',
  158: 			     checked=found.publish)"/>
  159:         </tr>
  160: 		</table>
  161:      </tal:block>
  162:      </tal:block>
  163:      <input type="submit" value="change">
  164:   </form>
  165: </tal:block>
  166: </body>
  167: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>