.row
  .col-md-12
    .commit_header{style: "background-color: #f1f1f1;"}
      - unless @files.blank? || @spider_bot
        = render partial: 'links' if (@linkinfo && !@linkinfo.has_attribute?('error'))
      .commit_item
        = render partial: 'commit', locals: {rev: @revision}
.row
  .col-md-12
    - unless @files.blank?
      %table.table#files-table
        %thead
          %tr
            %th Filename
            %th Changed
        %tbody
          - @files.each do |file|
            %tr{id: "file-#{valid_xml_id(file[:name])}"}
              %td
                - link_opts = {action: :view_file, project: @project, package: @package, filename: file[:name], expand: @expand}
                - unless @is_current_rev
                  - link_opts[:rev] = file[:srcmd5]
                = link_to_if(file[:viewable], nbsp(file[:name]), link_opts)
              %td
                %span.hidden
                  #{file[:mtime]}
                = fuzzy_time_string(Time.at(file[:mtime].to_i).to_s)
              / limit download for anonymous user to avoid getting killed by crawlers
    - else
      %p
        %i
          This package has no files yet
    - if User.current.can_modify_package? @package
      %p
        = link_to sprite_tag('page_white_add'), action: :add_file, project: @project, package: @package
        = link_to 'Add file', action: :add_file, project: @project, package: @package

