OSDN Git Service

fix license picture
[pettanr/pettanr.git] / app / views / resource_pictures / show.html.erb
index 4d60081..d6720fe 100644 (file)
@@ -1,16 +1,45 @@
-<h1>Resource Picture #<%= @resource_picture.id %></h1>
-<p id="notice"><%= notice %></p>
-<img src="<%= @resource_picture.url 'full' -%>">
-<h2>credit</h2>
-<%= render @resource_picture.full_credit_template, :picture => @resource_picture %>
-<h2>properties</h2>
-<div>
-  <%= @resource_picture.ext %>
-</div>
-<div>
-  <%= @resource_picture.width %>x<%= @resource_picture.height %>px
-</div>
-<div>
-  <%= @resource_picture.filesize %>bytes
-</div>
-<%= link_to 'Back', resource_pictures_path %>
+<h1>
+  <%= link_to icon_tag('ResourcePicture'), resource_picture_path(@item) %>
+  <%= t '.title' -%>
+  <%= link_to icon_tag('Prof'), resource_picture_path(@item, :format => :prof) %>
+</h1>
+<p>
+  <b><%= t_m 'ResourcePicture.artist_id' -%>:</b>
+  <%= link_to h(@item.artist.name), artist_path(@item.artist) %>
+</p>
+
+
+<%= link_to tag(:img, @item.opt_img_tag), @item.url %>
+
+<%= render @item.full_credit_template, :picture => @item %>
+
+<p>
+  <b><%= t_m 'ResourcePicture.ext' -%>:</b>
+  <%= @item.ext %>
+</p>
+
+<p>
+  <b><%= t_m 'ResourcePicture.filesize' -%>:</b>
+  <%= @item.filesize %>
+</p>
+
+<p>
+  <b><%= t_m 'ResourcePicture.created_at' -%>:</b>
+  <%= l @item.created_at %>
+</p>
+
+<p>
+  <b><%= t_m 'ResourcePicture.updated_at' -%>:</b>
+  <%= l @item.updated_at %>
+</p>
+
+<% if @item.own? @operators -%>
+  <h3><%= t('editor') -%></h3>
+  <p id="notice"><%= notice %></p>
+  
+  <p>
+    <%= link_to t('original_pictures.show.replace'), edit_original_picture_path(@item.original_picture) %>
+    <%= link_to t('show'), original_picture_path(@item.original_picture) %>
+    <%= link_to t('original_pictures.index.stop'), resource_picture_path(@item), :method => :delete %>
+  </p>
+<% end -%>