<div id="left">
<div class="blue">Actions</div>
<div class="articles">
<%= link_to("Upload a File", :action => 'new') %>
</div>

<div class="blue">Quick Upload</div>

<div class="articles">
<%= start_form_tag({:action => 'create'}, :multipart => true) %>

<%= render :partial => 'upload' %>

<p><%= submit_tag 'Upload' %></p>
<%= end_form_tag %>
</div>

</div>


<div id="content">

<div class="blue">Files</div>
<div class="articles">
<div id="tablediv">
<%= start_form_tag :action => 'zip' %>
<table id="page-list" class="list" cellpadding="0" cellspacing="0"  width="505">
		  <thead>  
			  <tr class="header">
			   	<th scope="col">chk</th>
				<th scope="col">Name</th>
				<th scope="col">Edited/Created</th>
				<th scope="col">Actions</th>
				<th scope="col">File</th>
			  </tr> 
		  </thead>
		  <tbody>
		  <tr id="page-empty-message" class="empty-message" <%= " style=\"display:none;\" " if !@uploads.empty? %>>
		        <td colspan="5">No Files</td>
   		   </tr>
 <% for @upload in @uploads %>
 <tr>
 <td><input type="checkbox" id="<%= @upload.id %>" name="files_for_zip[]" value="<%= @upload.id %>"></td>
 <td><%= @upload.name %></td>
 <td><%=  distance_of_time_in_words_to_now @upload.updated_at %> ago</td>
 <td><%= link_to("Edit",{ :action => 'edit', :id => @upload} ) %> <%= link_to("Delete", { :action => 'destroy', :id => @upload }, :confirm => "Are you sure you delete this?") %></td>
 <td><%= link_to(url_for_file_column("upload", "file"),{ :action => 'download', :id => @upload } )  %></td>
 </tr>
 <% end %>
 </tbody>
 </table>
 </div>

</div>
 <div class="articles">
 <%= submit_tag "Download checked" %>
 </div>

</div>