Mercurial > hg > MPIWGWeb
view zpt/project/edit_images.zpt @ 96:2dd8e3be4a8e
add project image link. fix edit image template bug.
author | casties |
---|---|
date | Thu, 16 May 2013 15:58:28 +0200 |
parents | 04fb655633ef |
children | 7b96a85552aa |
line wrap: on
line source
<!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:define="images here/getImageList" tal:condition="images"> <tr> <th /> <th>Image</th> <th>Caption</th> <th>Link</th> <th /> </tr> <tal:block tal:repeat="image images"> <tr tal:define="imgid image/getId"> <td> <a tal:attributes="href string:$root/manageImages?name=$imgid&op=up">up</a><br/> <a tal:attributes="href string:$root/manageImages?name=$imgid&op=down">down</a> </td> <td> <img tal:attributes="src image/absolute_url" /><br/> <span tal:content="string:(${image/width}x${image/height}px)"/> </td> <td tal:content="structure image/getCaption" /> <td tal:content="structure image/getLink" /> <td><a tal:attributes="href string:$root/$imgid/editImage">Edit</a><br /> <a tal:attributes="href string:$root/deleteImage?id=$imgid">Delete</a></td> </tr> </tal:block> </table> <p> The image for the project description should have a width of 230px. </p> <p> The last image in the list is used as the project thumbnail image (140x87px): <img align="middle" width="140" height="87" tal:attributes="src here/getThumbUrl" /> </p> <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 valign="top"><input name="fileHd" type="file" len="50" /></td> <td valign="top"><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 tal:attributes="href string:$root/copyImageToMargin">here</a>.) </p> </tal:block> </body> </html>