comparison zpt/project/edit_images.zpt @ 22:5ed0b0c21fe5

started to clean up MPIWGProject.
author casties
date Mon, 08 Apr 2013 20:28:29 +0200
parents zpt/MPIWGProject_manageImagesForm.zpt@bca61e893fcc
children dc41deabc8f8
comparison
equal deleted inserted replaced
21:faa7c9e936a8 22:5ed0b0c21fe5
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/edit_template/macros/page">
4 <head>
5 </head>
6 <body>
7 <tal:block metal:fill-slot="navsel" tal:define="global menusel string:images" />
8 <tal:block metal:fill-slot="body">
9 <table tal:condition="python:here.getImages()">
10 <tr><th/><th>Image</th><th>Caption</th><th/></tr>
11 <tal:block tal:repeat="image here/getImages">
12 <tr>
13 <td>
14 <a tal:attributes="href python:here.absolute_url()+'/manageImages?imageName='+image[0]+'&op=up'">up</a><br>
15 <a tal:attributes="href python:here.absolute_url()+'/manageImages?imageName='+image[0]+'&op=down'">down</a>
16 </td>
17 <td tal:condition="not:python:image[1].height==''" tal:content="structure python:image[1].tag(scale=250.0 / image[1].height)" />
18 <td tal:condition="python:image[1].height==''" tal:content="python:image[1].height"/>
19 <td tal:content="structure python:getattr(image[1],'caption','')" />
20 <td>
21 <a tal:attributes="href python:image[1].getId()+'/editImage'">Edit</a><br/>
22 <a tal:attributes="href python:'deleteImage?id='+image[1].getId()">Delete</a>
23 </td>
24 </tr>
25 </tal:block>
26 </table>
27
28 <h3>Add an Image</h3>
29
30 <form action="addImage" method="post" enctype="multipart/form-data">
31 <table>
32 <tr><th>Image</th><th>Caption</th></tr>
33 <tr>
34 <td><input name="fileHd" type="file" len="50"/></td>
35 <td><textarea name="caption" rows="3" cols="60"></textarea></td>
36 </tr>
37 </table>
38 <p><input type="submit" value="submit"/></p>
39 </form>
40
41 <p>(if the marginal image from your current project description is not in this list, click <a href="copyImageToMargin">here</a>.)</p>
42 </tal:block>
43 </body>
44 </html>