<% @pagetitle = "Detailed Information About #{@filename}"
  @metarobots = 'noindex' # files change too often
  package_bread_crumb(
  link_to( 'Binaries', :controller => 'package', :action => :binaries,
           :project => @project, :package => @package, :repository => @repository, :arch => @arch ),
  truncate(@filename, :length => 30))
-%>

<%= render :partial => "tabs" %>

<h3>Detailed Information About
  <% if @durl -%>
    <%= link_to(@filename, @durl) -%>
  <% else -%>
    <%= @filename -%>
  <% end -%></h3>

<div>
  <p><strong>Title:</strong> <%= @fileinfo.value('summary') %></p>
  <p><strong>Description:</strong><br/>
    <% description = @fileinfo.value('description') %>
    <% if description %>
      <% description.split( /\n/ ).each do |line| %>
        <%= line -%><br/>
      <% end %>
    <% else %>
      <i>No description set</i>
    <% end %>
  </p>
  <p><strong>Version:</strong> <%= @fileinfo.value('version') %></p>
  <p><strong>Release:</strong> <%= @fileinfo.value('release') %></p>
  <p><strong>Architecture:</strong> <%= @fileinfo.value('arch') %></p>
  <p><strong>Size:</strong> <%= human_readable_fsize(@fileinfo.value(:size).to_i) %></p>
  <p><strong>Build Time:</strong> <%= btime = Time.at(@fileinfo.value(:mtime).to_i)
  btime.to_s + " (" + fuzzy_time_string(btime.ctime) + ")" %></p>
  <% if Feature.active?(:cloud_upload) && !User.current.is_nobody? && uploadable?(@filename, @arch) %>
    <p><strong>Cloud Upload</strong></p>
    <p>
      The Open Build Service can upload appliances to Cloud providers like Amazon EC2 or Microsoft Azure.
    </p>
    <p>
      <%= button_tag(type: 'button') do
        link_to "Upload to EC2", new_cloud_upload_path(project: @project, package: @package, repository: @repository, arch: @arch, filename: @filename)
      end
      %>
    </p>
  <% end %>

</div>

<%= render :partial => "deps" %>
