app/views/items/show.html.erb
<p>
<strong>Filename:</strong>
<%= @item.file_file_name %>
</p>
<p>
<% if @item.image? %>
<%= image_tag @item.file.url( :display, false ) %>
<% else %>
<%= image_tag "/themes/#{theme}/images/default-file-icon.png" %>
<% end %>
</p>
<p>
Tags: <% @item.tags.each do |tag| %>
<%= link_to( tag.name, tag ) %><%= ', ' unless tag == @item.tags.last %>
<% end %>
</p>
<p>
<% if @item.image? %>Original (<%= @item.file.width %>x<%= @item.file.height %>):<% else %>Link:<% end %>
<input type="text" size="100" value="<%= @item.file.url( 'original', false ) %>">
</p>
<% if @item.image? %>
<% @item.file.styles.each do |style,style_obj| %>
<p>
<%= style.capitalize %> (<%= @item.file.width(style) %>x<%= @item.file.height(style) %>):
<input type="text" size="100" value="<%= @item.file.url( style, false ) %>">
</p>
<% end %>
<% end %>
<%= link_to 'Edit', edit_item_path(@item) %> |
<%= link_to 'Back', items_path %>