Mercurial > hg > MPIWGWeb
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/project/edit_images.zpt Mon Apr 08 20:28:29 2013 +0200 @@ -0,0 +1,44 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html metal:use-macro="here/edit_template/macros/page"> +<head> +</head> +<body> +<tal:block metal:fill-slot="navsel" tal:define="global menusel string:images" /> +<tal:block metal:fill-slot="body"> + <table tal:condition="python:here.getImages()"> + <tr><th/><th>Image</th><th>Caption</th><th/></tr> + <tal:block tal:repeat="image here/getImages"> + <tr> + <td> + <a tal:attributes="href python:here.absolute_url()+'/manageImages?imageName='+image[0]+'&op=up'">up</a><br> + <a tal:attributes="href python:here.absolute_url()+'/manageImages?imageName='+image[0]+'&op=down'">down</a> + </td> + <td tal:condition="not:python:image[1].height==''" tal:content="structure python:image[1].tag(scale=250.0 / image[1].height)" /> + <td tal:condition="python:image[1].height==''" tal:content="python:image[1].height"/> + <td tal:content="structure python:getattr(image[1],'caption','')" /> + <td> + <a tal:attributes="href python:image[1].getId()+'/editImage'">Edit</a><br/> + <a tal:attributes="href python:'deleteImage?id='+image[1].getId()">Delete</a> + </td> + </tr> + </tal:block> + </table> + + <h3>Add an Image</h3> + + <form action="addImage" method="post" enctype="multipart/form-data"> + <table> + <tr><th>Image</th><th>Caption</th></tr> + <tr> + <td><input name="fileHd" type="file" len="50"/></td> + <td><textarea name="caption" rows="3" cols="60"></textarea></td> + </tr> + </table> + <p><input type="submit" value="submit"/></p> + </form> + + <p>(if the marginal image from your current project description is not in this list, click <a href="copyImageToMargin">here</a>.)</p> +</tal:block> +</body> +</html>