File:  [Repository] / MPIWGWeb / zpt / Attic / editPublications.zpt
Revision 1.1.2.4: download - view: text, annotated - select for diffs - revision graph
Wed Oct 12 19:35:38 2005 UTC (18 years, 8 months ago) by dwinter
Branches: r2
new  database handling, major changes to minimize filemaer parts

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

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