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

<%= link_to @asset.data_file_name, @asset.url %> <% unless @asset.is_a?(Ckeditor::Picture) %> <%= link_to icon_tag('link'), @asset.url, title: @asset.url, target: '_blank', class: 'btn btn-default' %> <% end -%>

<% if @asset.is_a?(Ckeditor::Picture) %>
<%= image_tag @asset.url(:content), title: @asset.data_file_name, class: 'media-image--inline' %>
<% end -%>

Information

File Name: <%= @asset.data_file_name %>
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') %>

<%= simple_form_for @asset, as: :asset, url: media_path(@asset) do |f| %> <%= f.input :tag_list, input_html: {class: 'js-token-input'} %> <%= button_to_save if can?(:update, @asset) %> <%= link_to_delete media_path(@asset) if can? :destroy, @asset %> <% end -%>

<% 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 -%>