Annotation of MPIWGWeb/zpt/editPublications.zpt, revision 1.1.2.3

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

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