Sha256: d32e3c5035b04c3f519d9125db5a3436b407e67c5728f93f5fee6ddab87cc5d7

Contents?: true

Size: 1.55 KB

Versions: 2

Compression:

Stored size: 1.55 KB

Contents

<%= render 'menu' %>

<div id="show-assets">

  <div id="image">
  <% if @asset.image? or @asset.video? %>
    <%= link_to(image_tag( @asset.url('500x400', @asset.dragonfly_extension_sym), :alt => @asset.description, :id => "asset-#{@asset.id}" ), @asset.url, :class => ('lightboxVideo' if @asset.video?)) %>
    <% else -%>
    <%= link_to( asset_icon(@asset) ) %>
  <% end -%>
  </div>

  <div id="info">
    <h2><%=h @asset.title %></h2>
    <p><strong>File Size:</strong> <%= number_to_human_size( @asset.file_size ) %></p>
    <p><strong>Description:</strong> <%= @asset.description %></p>
<% unless readonly %>
    <p><%= link_to "Edit '#{@asset.title}'", edit_noodall_admin_asset_path(@asset), :title => "Edit '#{@asset.title}'" , :class => 'edit' %></p>
<% end %>

    <h2>Used <%= @asset.log_entries.count %> times</h2>
    <ul id="asset-usage">
      <% for entry in @asset.log_entries %>
      <% unless entry.node.nil? %>
      <li><%= link_to entry.node.title, noodall_admin_node_path(entry.node) %> - <%= entry.location %></li>
      <% end -%>
      <% end -%>
    </ul>

  </div>

  <% if @asset.tags? %>
  <div id="tags">
      <h2>'<%= @asset.title %>' Tags</h2>
      <ul>
        <% for tag in @asset.tags %>
          <li><%= link_to "#{h( tag )}", :tag => tag  %></li>
        <% end -%>
      </ul>
  </div>
    <% elsif !readonly -%>
  <div id="no-tags">
    <h2>'<%= @asset.title %>' Tags</h2>
    <p>This asset has no tags, <%= link_to 'click here', edit_noodall_admin_asset_path(@asset), :title => 'Edit Tags' %> to add them.</p>
  </div>
  <% end -%>

</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
noodall-ui-0.1.4 app/views/noodall/admin/assets/_show.html.erb
noodall-ui-0.1.3 app/views/noodall/admin/assets/_show.html.erb