view zpt/project/edit_images.zpt @ 61:04fb655633ef

more cleaning up projects.
author casties
date Thu, 02 May 2013 18:32:01 +0200
parents dc41deabc8f8
children 2dd8e3be4a8e
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 />
      </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 python:getattr(image,'caption','')" />
          <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 220px.
    </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>