OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / views / resource_pictures / show.html.erb
index 9dc4303..2efb406 100644 (file)
@@ -1,56 +1,45 @@
-<h1><%= t '.title' -%></h1>
-<p id="notice"><%= notice %></p>
-
-<%= link_to tag(:img, @resource_picture.opt_img_tag), @resource_picture.url %>
-
-<%= render @resource_picture.full_credit_template, :picture => @resource_picture %>
-
+<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.ext' -%>:</b>
-  <%= @resource_picture.ext %>
+  <b><%= t_m 'ResourcePicture.artist_id' -%>:</b>
+  <%= link_to h(@item.artist.name), artist_path(@item.artist) %>
 </p>
 
-<p>
-  <b><%= t_m 'ResourcePicture.width' -%>:</b>
-  <%= @resource_picture.width %>
-</p>
 
-<p>
-  <b><%= t_m 'ResourcePicture.height' -%>:</b>
-  <%= @resource_picture.height %>
-</p>
+<%= link_to tag(:img, @item.opt_img_tag), @item.url %>
+
+<%= render @item.full_credit_template, :picture => @item %>
 
 <p>
-  <b><%= t_m 'ResourcePicture.filesize' -%>:</b>
-  <%= @resource_picture.filesize %>
+  <b><%= t_m 'ResourcePicture.ext' -%>:</b>
+  <%= @item.ext %>
 </p>
 
 <p>
-  <b><%= t_m 'ResourcePicture.artist_id' -%>:</b>
-  <%= link_to h(@resource_picture.artist.name), artist_path(@resource_picture.artist) %>
+  <b><%= t_m 'ResourcePicture.filesize' -%>:</b>
+  <%= @item.filesize %>
 </p>
 
 <p>
   <b><%= t_m 'ResourcePicture.created_at' -%>:</b>
-  <%= l @resource_picture.created_at %>
+  <%= l @item.created_at %>
 </p>
 
 <p>
   <b><%= t_m 'ResourcePicture.updated_at' -%>:</b>
-  <%= l @resource_picture.updated_at %>
+  <%= l @item.updated_at %>
 </p>
 
-<%= link_to t('link.back'), resource_pictures_path %>
-
-<% if @author and @author.working? -%>
-  <h3><%= t('home.index.catch') -%></h3>
-  <%= link_to panel_icon(:object => @author.working_panel, :size => 25), panel_path(@author.working_panel) %>
-  <%= link_to @author.working_panel.caption, main_app.panel_path(@author.working_panel) %>
-
-  <p>
-    <%= link_to t('resource_pictures.add_to_panel_for_panel_picture'), main_app.new_panel_picture_path(:picture_id => @resource_picture.picture_id) %>
-  </p>
+<% if @item.own? @operators -%>
+  <h3><%= t('editor') -%></h3>
+  <p id="notice"><%= notice %></p>
+  
   <p>
-    <%= link_to t('resource_pictures.add_to_panel_for_ground_picture'), main_app.new_ground_picture_path(:picture_id => @resource_picture.picture_id) %>
+    <%= link_to t('original_pictures.show.replace'), edit_original_picture_path(@item.original_picture) %>
+    <%= link_to t('original_pictures.show.title'), original_picture_path(@item.original_picture) %>
+    <%= link_to t('original_pictures.index.stop'), resource_picture_path(@item), :method => :delete %>
   </p>
 <% end -%>