Ignore:
Timestamp:
17 Nov 2011, 13:55:14 (13 years ago)
Author:
Henrik Bettermann
Message:

Include permission waeup.uploadStudentFile to handle file uploads.

Fix pagetemplate filesuploadpage.pt.

Rearrange fileupload.pt

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/filesuploadpage.pt

    r7114 r7127  
    33    tal:content="view/label">Label</h2>
    44
    5 <table class="zebra">
    6   <tbody>
    7     <tal:files content="structure provider:files" />
    8   </tbody>
    9 </table>
     5<form action="." tal:attributes="action request/URL" method="post"
     6      class="edit-form" enctype="multipart/form-data">
     7  <table class="zebra">
     8    <tbody>
     9      <tal:files content="structure provider:files" />
     10    </tbody>
     11  </table>
     12</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/fileupload.pt

    r7111 r7127  
    77  <td class="field">
    88    <span class="widget">
     9
    910      <tal:file tal:condition="viewlet/file_exists">
    1011        <a tal:attributes="href viewlet/download_name"
    11            tal:content="viewlet/download_name"
     12           tal:content="viewlet/title"
    1213           target="image">
    1314          LINK
    1415        </a>
    15         <input type="submit"
    16                tal:attributes="id python:('delete_%s' % viewlet.input_name);
    17                   name python:('delete_%s' % viewlet.input_name)"
    18                value="Delete" class="button" />
    19         <br />
    2016      </tal:file>
     17      <br />
    2118      <input type="file" tal:attributes="name viewlet/input_name"/>
     19      <br />
     20      <input type="submit" tal:condition="viewlet/file_exists"
     21             tal:attributes="id python:('delete_%s' % viewlet.input_name);
     22                name python:('delete_%s' % viewlet.input_name)"
     23             value="Delete attachment" class="button" />
    2224      <input type="submit"
    2325               tal:attributes="id python:('upload_%s' % viewlet.input_name);
    2426                  name python:('upload_%s' % viewlet.input_name)"
    25                value="Upload" class="button" />
    26       <br />
     27               value="Upload new file" class="button" />
    2728      <span i18n:translate="">
    2829        Max. file size:
     
    3031      </span>
    3132    </span>
     33    <br />
    3234  </td>
    3335</tr>
Note: See TracChangeset for help on using the changeset viewer.