% if ( $c->user()->has_permission_in_wiki( wiki => $wiki, permission => Silki::Schema::Permission->Upload() ) ) {
<div id="upload-lightbox" style="display: none">
  Uploading ...<br />
  <img src="/images/spinner.gif" height="32" width="32" />
</div>

<& /lib/forms/attachment-upload.mas,
   uri    => $wiki->uri( view => 'files' ),
   legend => loc('Upload a file to this wiki')
 &>
% }

% if ($file_count) {
<& /lib/table/attachments-table.mas, files => $files &>
% } else {
<p>
  <% loc('This wiki does not have any attachments.' ) %>
</p>
% }

<%args>
$wiki
$files
$file_count
</%args>

<%method title>
<% loc( 'All Attachments in the %1 wiki', $wiki->title() ) %>
<%args>
$wiki
</%args>
</%method>
