2006-06-28 22:11:03 +04:00
|
|
|
<h2><%=_('Files')%></h2>
|
|
|
|
|
|
|
|
<% delete_allowed = authorize_for('versions', 'destroy_file') %>
|
|
|
|
|
|
|
|
<table border="0" cellspacing="1" cellpadding="2" class="listTableContent">
|
|
|
|
<tr class="ListHead">
|
|
|
|
<th><%=_('Version')%></th>
|
|
|
|
<th><%=_('File')%></th>
|
|
|
|
<th><%=_('Date')%></th>
|
|
|
|
<th><%=_('Size')%></th>
|
|
|
|
<th>D/L</th>
|
|
|
|
<th>MD5</th>
|
|
|
|
<% if delete_allowed %><th></th><% end %>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<% for version in @versions %>
|
|
|
|
<tr>
|
|
|
|
<td colspan="7"><%= image_tag 'package' %> <b><%= version.name %></b></td>
|
|
|
|
</tr>
|
2006-07-09 20:30:01 +04:00
|
|
|
<% for file in version.attachments %>
|
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
2006-06-28 22:11:03 +04:00
|
|
|
<td></td>
|
|
|
|
<td><%= link_to file.filename, :controller => 'versions', :action => 'download', :id => version, :attachment_id => file %></td>
|
|
|
|
<td align="center"><%= format_date(file.created_on) %></td>
|
2006-07-09 20:30:01 +04:00
|
|
|
<td align="center"><%= human_size(file.filesize) %></td>
|
2006-06-28 22:11:03 +04:00
|
|
|
<td align="center"><%= file.downloads %></td>
|
|
|
|
<td align="center"><small><%= file.digest %></small></td>
|
|
|
|
<% if delete_allowed %>
|
|
|
|
<td align="center">
|
|
|
|
<%= start_form_tag :controller => 'versions', :action => 'destroy_file', :id => version, :attachment_id => file %>
|
|
|
|
<%= submit_tag _('Delete'), :class => "button-small" %>
|
|
|
|
<%= end_form_tag %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
2006-07-09 20:30:01 +04:00
|
|
|
<% end
|
|
|
|
reset_cycle %>
|
2006-06-28 22:11:03 +04:00
|
|
|
<% end %>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
<p>
|
|
|
|
<%= link_to_if_authorized '» ' + _('New'), :controller => 'projects', :action => 'add_file', :id => @project %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|