<% content_for :page_heading do %>

<%= t('.media_library') %>

<% end %> <%= form_tag({ action: 'upload' }, { enctype: 'multipart/form-data', class: 'form-inline' }) do %>

<%= t('.upload_a_file_to_your_site') %>

<%= file_field_tag(:upload, class: 'input-file') %>
<%= submit_tag(t('.upload'), class: 'btn btn-success') %>
<% end %> <% if @resources.empty? %> <% end %> <% for upload in @resources %> <% end %> <%= display_pagination(@resources, 6) %>
<%= t('.filename') %> (<%= t('.right_click_for_link') %>) <%= t('.content_type') %> <%= t('.file_size') %> <%= t('.date') %>
<%= t('.no_resources') %>
<% if upload.mime =~ /image/ %> <%= image_tag(upload.upload.thumb.url) %> <% else %> <%= link_to(upload.upload_url, upload.upload_url) %> <% end %>

<% if upload.mime =~ /image/ %> <%= link_to(t('.thumbnail'), upload.upload.thumb.url) %> | <%= link_to(t('.medium_size'), upload.upload.medium.url) %> | <%= link_to(t('.original_size'), upload.upload.url) %> | <% end %> <%= link_to(t('.delete'), { action: 'destroy', id: upload.id, search: params[:search], page: params[:page] }, { confirm: t('.are_you_sure'), method: :delete }) %>

<%= upload.mime %> <%= begin h upload.size rescue StandardError 0 end %> bytes <%= l(upload.created_at, format: :short) %>