<% #listItem %>
<tr>
   <td class='uk-text-right'><% file.requests %></td>
   <td style='max-width: 200px; overflow: hidden;'>
      <span title='<% file.description %>' data-uk-tooltip="{pos: 'left'}"><% file.name | file.link %></span>
   </td>
   <!-- td style='white-space: nowrap;'><% file.contentLength %></td -->
   <td><% file.creator %></td>
   <td><% file.created text %></td>
   <td class='uk-text-muted'><i class='uk-icon-file<% file.contentType generic prefix=- %>-o' title='<% file.contentType %>' data-uk-tooltip></i></td>
   <td style='white-space: nowrap;' class='uk-text-right'>
      <a href='' class='av-clipboard-copy' data-text='<% gettext 'Please use the copy command.' %>' data-value="<% file.macro %>"><i class='uk-icon-clipboard'></i></a>
      <% file.link delete "<i class='uk-icon-trash-o'></i>" %>
      <% file.link edit "<i class='uk-icon-pencil'></i>" %>
   </td>
</tr>

<% #edit %>
<h1>
   <% response.title %>
   <% file.link . ' ' class='uk-icon-button uk-icon-link uk-text-middle' %>
</h1>
<div class='uk-article-meta'>
   <% if <% file.creator %> is null then '' else
      <% gettext 'Created by {0} on {1}' <% file.creator %> <% file.created short %> prefix=<div> suffix=</div> %>
   %>
   <% if <% file.created %> is <% file.modified %> then '' else
      <% gettext 'Last modified by {0} on {1}' <% file.modifier %> <% file.modified short %> prefix=<div> suffix=</div> %>
   %>
</div>
<form class='uk-margin-top uk-form uk-form-stacked' method="post" action="<% response.action %>" enctype="multipart/form-data">
   <div class='uk-form-row'>
      <label class='uk-form-label' for='upload'>
         <% gettext File %>
      </label>
      <div class='uk-form-controls'>
         <% file.upload file class='uk-width-1-2' %>
      </div>
   </div>
   <div class='uk-form-row'>
      <label class='uk-form-label' for='name'>
         <% gettext Name %>
         <i class='uk-icon-info-circle uk-text-muted' title='<% gettext "If you do not specify a name Antville will create one based on the filename." %>' data-uk-tooltip='{pos: "right"}'></i>
      </label>
      <div class='uk-form-controls'>
         <% file.input name class='uk-width-1-2' %>
      </div>
   </div>
   <div class='uk-form-row'>
      <label class='uk-form-label' for='description'>
         <% gettext Description %>
      </label>
      <div class='uk-form-controls'>
         <% file.input description  class='uk-width-1-1' %>
      </div>
   </div>
   <fieldset class='uk-margin-top'>
     <legend><% gettext Information %></legend>
      <div class='uk-form-row'>
         <% file.macro | link 'javascript:' data-value=<% file.macro %> data-text=<% gettext "Use keyboard shortcut to copy." %> class='av-clipboard-copy' %>
      </div>
   </fieldset>
    <div class='uk-margin-top'>
      <button class='uk-button uk-button-primary' type="submit" id="submit" name="save" value="1">
         <% gettext Save %>
      </button>
      <% file.link delete <% gettext Delete %> class='uk-button' %>
      <a href="" class="uk-button uk-button-link cancel"><% gettext Cancel %></a>
   </div>
</form>
<script type="text/javascript">
$(function() {
   if ("<% file.created %>") {
      $(".name").hide();
      $(".resize").hide();
   };
});
</script>
