2 # file_list: list of source files in package
7 <% unless @files.empty? %>
8 <table cellspacing='1' id="file_table" class="tablesorter">
13 <th class="header" style="min-width: 100px;">Filename</th>
14 <th class="header">Size</th>
15 <th class="header" style="min-width: 90px;">Changed</th>
22 <% @files.each do |file| %>
24 <% if file[:viewable] %>
25 <%= link_to(h(file[:name]), :action => :view_file, :project => @project, :package => @package, :file => file[:name], :srcmd5 => file[:srcmd5], :expand => params[:expand] ) %>
29 <% if @link && @link.has_add_patch?( file[:name] ) %>
31 <% elsif @link && @link.has_patch?( file[:name] ) %>
35 <td><!-- <%= file[:size].rjust(10, '0') %> --><%=h human_readable_fsize( file[:size] )%></td>
36 <td><!-- <%= file[:mtime] %> --><%= fuzzy_time_string( Time.at(file[:mtime].to_i).to_s ) %></td>
37 <td><%= link_to image_tag('icons/page_white_get.png', :alt => "Download", :title => "Download File"), file_url( @project, @package, file[:name], file[:srcmd5] ) %>
38 <% unless file[:name].match(/^_service:/) %>
39 <% if @package.can_edit?( session[:login] ) %>
40 <%= link_to image_tag('icons/page_white_delete.png', :alt => "Remove", :title => "Remove File"), {:action => :remove_file, :project => @project,
41 :package => @package, :filename => file[:name]},
42 {:confirm => "Really remove file '#{file[:name]}'?", :method => :post }%>
51 <% if @package.can_edit?( session[:login] ) %>
52 <p><%= link_to image_tag('icons/page_white_add.png', :alt => "Add", :title => "Add File"),
53 :action => :add_file, :project => @project, :package => @package %>
54 <%= link_to 'Add File', :action => :add_file, :project => @project, :package => @package %>
58 <% if @revision && !(@revision == @current_rev)%>
59 <h3>Showing revision <%= @revision %> (current revision is <%= @current_rev %>)</h3>
61 <h3>Showing current revision</h3>
63 <div style="margin-left: 1em">
65 <%= render :partial => 'commit_item', :locals => {:rev => @revision } %>
68 <!-- Simplified for now.
70 Source MD5: <%= text_field_tag :srcmd5, @files[0][:srcmd5], { :size => 33, :disabled => true } %>
74 <p><i>This package has no files yet</i></p>
76 <% if @package.can_edit?( session[:login] ) %>
77 <p><%= link_to image_tag('icons/page_white_add.png', :alt => "Add", :title => "Add File"),
78 :action => :add_file, :project => @project, :package => @package %>
79 <%= link_to 'Add File', :action => :add_file, :project => @project, :package => @package %>