File:  [Repository] / MPIWGWeb / zpt / Attic / editPublications.zpt
Revision 1.1.2.8: download - view: text, annotated - select for diffs - revision graph
Wed Nov 16 19:09:28 2005 UTC (18 years, 7 months ago) by casties
Branches: r2
small fixes for "add publications"
still doesn't work properly

    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 menusel string:publications" />
    6: 
    7: <tal:block metal:fill-slot="body"
    8:   tal:define="yes_no_list python:'yes\nno'; sortingMode python:'year\npriority'">
    9: 
   10:   <h3><a href="addPublications">Add Publications to your list</a></h3>
   11:   <form action="changePublicationSelectionMode" method="post">
   12: 
   13:   <h3>Select the 5 publications to be displayed in the first part of your homepage</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><span><input type="radio" name="publicationSelectionMode" value="year" />year</span>
   18:       <span><input checked type="radio" name="publicationSelectionMode" value="priority" />priority</span></td>
   19:       <td><input type="submit" value="change"></td>
   20:     </tr>
   21:     <tr tal:condition="not:python:sm=='priority'">
   22:       <td><span><input checked type="radio" name="publicationSelectionMode" value="year" />
   23:       year</span> <span><input type="radio" name="publicationSelectionMode"
   24:         value="priority" /> priority</span></td>
   25:       <td><input type="submit" value="change"></td>
   26:     </tr>
   27:   </table>
   28:   </form>
   29: 
   30: 
   31:   <h2>Publication list</h2>
   32:   <p>(You can not change entries from the <i>Institutsbibliographie</i> here)</p>
   33:   <form action="changeSortingMode" method="post">
   34:   <p>Sort by:</p>
   35:   <table>
   36:     <td valign="top"
   37:       tal:content="structure python:here.ZSQLSelectionFromCRList(
   38:            'sortingMode',
   39:            sortingMode,
   40:            boxType='radio',
   41:            checked=here.getSortingMode())" />
   42:     <td><input type="submit" value="change"></td>
   43:   </table>
   44:   </form>
   45: 
   46:   <form action="changePublications" method="post">
   47:   <input type="hidden" name="id_main" tal:attributes="value person/id">
   48:   <input type="hidden" name="main_fields"
   49:     value="publications__title,publications__publish">
   50:   <tal:block
   51:     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());
   52: 			     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());
   53: 			     not_displayed python:here.ZSQLSimpleSearch('select *,oid from publications where id_main=\'%s\' and publish=\'no\' order by priority'%here.getDBId());
   54: 			     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())">
   55: 
   56:     <tal:block tal:condition="books">
   57:       <h3>Books</h3>
   58:       <table>
   59:         <tr>
   60:           <th />
   61:           <th />
   62:           <th>Priority</th>
   63:           <th align="left" width="100">Show</th>
   64:         </tr>
   65:         <tr tal:repeat="found 	python:here.sortBibliography(books)">
   66:           <td><a tal:condition="python:found.id_gen_bib and (not found.id_gen_bib=='')"
   67:             tal:attributes="href python:'editBibliography?id=%s'%found.id_gen_bib">edit</a>
   68:           <a
   69:             tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a></td>
   70:           <td><span tal:replace="structure python:here.formatBibliography(here,found)" /></td>
   71:           <td valign="top"><input
   72:             tal:attributes="name python:'publications__priority__'+str(found.oid);
   73: 				     value python:here.integer(found.priority)"
   74:             size="3" /></td>
   75:           <td valign="top"
   76:             tal:content="structure python:here.ZSQLSelectionFromCRList(
   77: 			     'publications__publish__'+str(found.oid),
   78: 			     yes_no_list,
   79: 			     boxType='radio',
   80: 			     checked=found.publish)" />
   81:         </tr>
   82:       </table>
   83:     </tal:block>
   84: 
   85:     <tal:block tal:condition="edited_books">
   86:       <h3>Edited Books</h3>
   87:       <table>
   88:         <tr>
   89:           <th/>
   90:           <th/>
   91:           <th>Priority</th>
   92:           <th align="left" width="100">Show</th>
   93:         </tr>
   94:         <tr tal:repeat="found python:here.sortBibliography(edited_books)">
   95:           <td><a tal:condition="python:found.id_gen_bib and (not found.id_gen_bib=='')"
   96:             tal:attributes="href python:'editBibliography?id=%s'%found.id_gen_bib">edit</a>
   97:           <a
   98:             tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a></td>
   99:           <td><span tal:replace="structure python:here.formatBibliography(here,found)" /></td>
  100:           <td valign="top"><input
  101:             tal:attributes="name python:'publications__priority__'+str(found.oid);
  102: 			   		value python:here.integer(found.priority)"
  103:             size="3" /></td>
  104:           <td valign="top"
  105:             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>
  118:           <th/>
  119:           <th/>
  120:           <th>Priority</th>
  121:           <th align="left" width="100">Show</th>
  122:         </tr>
  123:         <tr tal:repeat="found python:here.sortBibliography(articles)">
  124:           <td><a tal:condition="python:found.id_gen_bib and (not found.id_gen_bib=='')"
  125:             tal:attributes="href python:'editBibliography?id=%s'%found.id_gen_bib">edit</a>
  126:           <a
  127:             tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a></td>
  128:           <td><span tal:replace="structure python:here.formatBibliography(here,found)" /></td>
  129:           <td valign="top"><input
  130:             tal:attributes="name python:'publications__priority__'+str(found.oid);
  131: 				     value python:here.integer(found.priority)"
  132:             size="3" /></td>
  133:           <td valign="top"
  134:             tal:content="structure python:here.ZSQLSelectionFromCRList(
  135: 			     'publications__publish__'+str(found.oid),
  136: 			     yes_no_list,
  137: 			     boxType='radio',
  138: 			     checked=found.publish)" />
  139:         </tr>
  140:       </table>
  141:     </tal:block>
  142: 
  143:   <tal:block tal:condition="not_displayed">
  144:     <h3>Currently not shown</h3>
  145:     <table>
  146:       <tr>
  147:         <th />
  148:         <th />
  149:         <th>Priority</th>
  150:         <th align="left" width="100">Show</th>
  151:       </tr>
  152:       <tr tal:repeat="found python:here.sortBibliography(not_displayed)">
  153:         <td><a
  154:           tal:attributes="href python:'deleteField?table=publications&oid=%s'%found.oid">delete</a></td>
  155:         <td><span tal:replace="structure python:here.formatBibliography(here,found)" /></td>
  156:         <td valign="top"><input
  157:           tal:attributes="name python:'publications__priority__'+str(found.oid);
  158: 		   				     value python:here.integer(found.priority)"
  159:           size="3" /></td>
  160:         <td valign="top"
  161:           tal:content="structure python:here.ZSQLSelectionFromCRList(
  162: 			     'publications__publish__'+str(found.oid),
  163: 			     yes_no_list,
  164: 			     boxType='radio',
  165: 			     checked=found.publish)" />
  166:       </tr>
  167:     </table>
  168:     </tal:block>
  169:     
  170:   </tal:block>
  171:   <input type="submit" value="change">
  172:   </form>
  173: </tal:block>
  174: </body>
  175: </html>

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