<%= render 'header' %>
<%= active_facet_list(:tg) %>

<%= @asset.filename %>

<% if @asset.image? %>
<%= image_tag @asset.url, title: @asset.filename, class: 'media-image--inline' %>
<% end -%>

Information

File Name: <%= @asset.filename %>
Content Type: <%= @asset.data_content_type %>
<% if @asset.is_a?(Ckeditor::Picture) %> File Size: <%= number_to_human_size(@asset.data_file_size) %>
Width: <%= @asset.width %>px
Height: <%= @asset.height %>px
<% end -%> Last updated: <%= @asset.updated_at.strftime('%F') %>

<%= link_to "#{icon_tag('link')} Link to original file".html_safe, @asset.url, title: @asset.url, target: '_blank', class: 'btn btn-default' %>

<% if @asset.is_a?(Ckeditor::Picture) and policy(@asset).update? %>
<%= simple_form_for @asset, as: :asset, url: media_path(@asset), html: {class: 'form-asset-replace'} do |f| %> <%= icon_tag 'refresh' %> Replace File <%= f.input_field :data, as: :file, class: 'input-file-upload js-replace-asset' %> <% end -%>
<% end -%>
<%= simple_form_for @asset, as: :asset, url: media_path(@asset) do |f| %>

Tags

<%= f.input :tag_list, as: :text, label: false, input_html: {class: 'js-taggable', rows: 1} %>
<% if @asset.is_a?(Ckeditor::Picture) %>

Featured in <%= pluralize(@asset.pages.length, 'page') %>

    <% @asset.pages.each do |page| %>
  • <%= link_to page.title, [:edit, page] %>
  • <% end -%>
<% end -%> <%= button_to_save if policy(@asset).update? %> <%= link_to_delete media_path(@asset) if policy(@asset).destroy? %> <% end -%>