- content_for :title do
= t('links.download')
%i= @item.name
- content_for :toolbar do
= link_to t('links.back'), item_path(@item), class: 'btn btn-default'
%h2= t('.title')
%table.table
%tr
%th= t('.name')
%th= t('.filename')
%th= t('.filesize')
%th= t('.created_at')
%th
- @versions.each do |item_file|
%tr{class: ('info' if @versions.first == item_file)}
%td= item_file.name
%td= item_file.filename
%td= number_to_human_size(item_file.filesize)
%td= l(item_file.created_at, format: :long)
%td
- if item_file.item.publicly_available?
= link_to download_item_path(@item, item_file_id: item_file.id), class: 'btn btn-success', target: '_blank' do
%i.fa.fa-download
= t('links.download')
- elsif @purchase.active?
= link_to download_item_purchase_path(@item, @purchase, item_file_id: item_file.id), class: 'btn btn-success', target: '_blank' do
%i.fa.fa-download
= t('links.download')