blob: 17cdda3fb9672ee30bbc1a44208ceb4bc3968eb5 [file] [log] [blame]
<div class="sectionHeading">Uploads</div>
<div class="sectionContent">
<table cellpadding="0" cellspacing="0" border="0" class="sectionTable">
<tr>
<td class="sectionTableCell">
<table width="100%">
<tr>
<th>ID</th>
<th>Filename</th>
<th>Type</th>
<th>Content_type</th>
<th width="20%">Description</th>
<th>Comment</th>
<th>Review<br>Complete<br>(Harvested)</th>
<th>Reviewer</th>
<th width="20%">Review Note</th>
<th>Review Note<br>Send On</th>
<th>Action</th>
</tr>
<% for upload in @uploads%>
<% upload.review_note = 'Click to add...' if upload.review_note.blank? %>
<tr>
<td><%= upload.id %></td>
<td><%= link_to upload.filename, upload.url %></td>
<td><%= upload.upload_type %></td>
<td><%= upload.content_type %></td>
<td><%= truncate(strip_tags(upload.description))%></td>
<td>Created <%= time_ago_in_words(upload.created_on) %> ago by <%= link_to_user upload.user %></td>
<td><%= link_to_done_toggle(upload) %></td>
<td><%= link_to_reviewer upload %></td>
<td>
<% if admin? %>
<%= editable_content(:content => {:element => 'span',
:text => upload.review_note,
:options => {:id => "review_note_#{upload.id}",
:class => 'editable-content'}},
:url => { :controller => 'review',
:action => 'note',
:id => upload.id,
:class_name => Upload.name
},
:ajax => {:okText => "'Ok'",:cancelText => "'Cancel'" }) %>
<% else %>
<%= upload.review_note %>
<% end %>
</td>
<td><%= upload.review_note_send_on.localtime.strftime(TIME_FORMAT) unless upload.review_note_send_on.nil? %></td>
<td>
[<%= link_to 'Edit', :action => 'edit', :id => upload %>]
[<%= link_to 'Destroy', { :action => 'destroy', :id => upload }, :confirm => 'Are you sure?', :method => 'post' %>]
</td>
</tr>
<% end %>
</table>
</td>
</tr>
</table>
</div>