<% 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 resource 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 resource.mime =~ /image/ %> <%= image_tag(resource.upload.thumb.url) %> <% else %> <%= link_to(resource.upload_url, resource.upload_url, download: resource.upload.identifier) %> <% end %>

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

<%= resource.mime %> <%= resource.upload.size %> bytes <%= l(resource.created_at, format: :short) %>