<% #edit %>
<script type="text/javascript">
$(function() {
   if ("<% image.created %>") {
      $(".name").hide();
      $(".resize").hide();
   };
   if ("<% image.parent_type %>" === "Layout") {
      $(".tags").hide();
   }
});
</script>
<p class="storyTitle"><% response.title %></p><br />
<div style="width: 100px; overflow: hidden; float: left; margin-right: 10px"><% image.thumbnail %></div>
<form method="post" action="<% response.action %>" enctype="multipart/form-data">
<table border="0" width="400" cellspacing="0" cellpadding="3">
<tr>
<td class="small"><% gettext "File" suffix=: %></td>
<td><% image.upload file %></td>
</tr>
<tr class="name">
<td valign="top" class="small"><% gettext Name suffix=: %></td>
<td>
   <% image.input name %><br />
   <span class="small"><% gettext "If you do not specify a name Antville will 
   create one based on the name of the local or remote file, resp." %></span>
</td>
</tr>
<tr>
<td class="small" valign="top"><% gettext Description suffix=: %></td>
<td><% image.textarea description %></td>
</tr>
<tr class="tags">
<td class="small" valign="top"><% gettext Tags suffix=: %></td>
<td><% image.input tags %></td>
</tr>
<tr class="resize">
<td></td>
<td>
   <span class="small"></small>
</td>
</tr>
<tr class="resize">
<td class="small"><% gettext "Max. width" suffix=: %></td>
<td><% image.input maxWidth value="400" %> pixel</td>
</tr>
<tr class="resize">
<td class="small"><% gettext "Max. height" suffix=: %></td>
<td><% image.input maxHeight value="400" %> pixel</td>
</tr>
<tr class="resize">
<td class="small"> </td>
<td class="small">
   <% gettext "If you want to resize the image please specify your desired 
   maximum width and/or maximum height in pixels. If you specify both the image 
   will be resized to match both criterias, but the image ratio will be 
   preserved." %><br /><br />
   <% gettext "If the width or height of your image exceeds 100 pixels Antville 
   automatically creates a thumbnail of it, too." %>
</td>
</tr>
<tr>
<td class="small" valign="top"> </td>
<td>
   <br />
   <button type="submit" name="save" value="1"><% gettext Save %></button>
   <a href="" class="cancel"><% gettext Cancel %></a>
</td>
</tr>
</table>
</form>

<% #listItem %>
<div class="listSeparator"> </div>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="small">
   <strong><% gettext Macro suffix=: %></strong> <% image.macro %>
   <div class="ample"><strong><% gettext Format suffix=: %></strong>
   <% image.contentType %>, <% image.width %>&times;<% image.height %> 
   <% gettext pixels %></div>
</td>
</tr>
<tr>
<td>
   <div class="storyTitle"><% image.name %></div>
   <div class="storyDate"><% image.creator as="link" %>
   <% image.created short prefix=<% gettext on prefix=" " suffix=" " %> %></div>
</td>
<td align="right" class="small" valign="top">
   <% image.link edit prefix="... " suffix="<br />" %>
   <% image.link delete prefix="... " suffix="<br />" %>
   <% image.link replace prefix="..." suffix="<br />" %> 
</td>
</tr>
<tr>
<td colspan="2">
   <% image.thumbnail vspace="5" | image.link %>
</td>
</tr>
</table>
