OSDN Git Service

fix manifest
[pettanr/pettanr.git] / app / views / original_pictures / show.html.erb
index e8e40c2..1b04b80 100644 (file)
@@ -1,90 +1,80 @@
-<h1><%= t '.title' -%></h1>
-<%= render 'exist', :pictures => Picture.list_by_md5(@original_picture.md5, @original_picture.id) %>
+<h1>
+  <%= link_to icon_tag('OriginalPicture'), original_picture_path(@item) %>
+  <%= t '.title' -%>
+  <%= link_to icon_tag('Prof'), original_picture_path(@item, :format => :prof) %>
+</h1>
+
+<%= render 'exist', :pictures => Picture.list_by_md5(@item.md5, @item.id) %>
 <p id="notice"><%= notice %></p>
 
 <table class="no-border">
   <tr>
     <td width="70%">
-      <%= link_to tag(:img, @original_picture.opt_img_tag), @original_picture.url %>
+      <%= link_to tag(:img, @item.opt_img_tag), @item.url %>
 
       <p>
         <b><%= t 'original_pictures.index.status' -%>:</b>
         <% case true %>
-        <% when  @original_picture.unpublished? %>
+        <% when  @item.unpublished? %>
           <%= t('original_pictures.unpublished') %>
-        <% when  @original_picture.unlicensed? %>
+        <% when  @item.unlicensed? %>
           <%= t('original_pictures.unlicensed') %>
-        <% when  @original_picture.stopped? %>
+        <% when  @item.stopped? %>
           <%= t('original_pictures.stopped') %>
-        <% when  @original_picture.published? %>
+        <% when  @item.published? %>
           <%= t('original_pictures.published') %>
         <% end %>
       </p>
 
       <p>
-        <b><%= t_m 'OriginalPicture.ext' -%>:</b>
-        <%= @original_picture.ext %>
+        <b><%= t_m 'OriginalPicture.published_at' -%>:</b>
+        <% if @item.published_at %>
+          <%= l @item.published_at %>
+        <% end %>
       </p>
 
       <p>
-        <b><%= t_m 'OriginalPicture.width' -%>:</b>
-        <%= @original_picture.width %>
+        <b><%= t_m 'OriginalPicture.stopped_at' -%>:</b>
+        <% if @item.stopped_at %>
+          <%= l @item.stopped_at %>
+        <% end %>
       </p>
 
       <p>
-        <b><%= t_m 'OriginalPicture.height' -%>:</b>
-        <%= @original_picture.height %>
+        <b><%= t_m 'OriginalPicture.ext' -%>:</b>
+        <%= @item.ext %>
       </p>
 
       <p>
         <b><%= t_m 'OriginalPicture.filesize' -%>:</b>
-        <%= @original_picture.filesize %>
-      </p>
-
-      <p>
-        <b><%= t_m 'OriginalPicture.artist_id' -%>:</b>
-        <%= link_to h(@original_picture.artist.name), artist_path(@original_picture.artist) %>
+        <%= @item.filesize %>
       </p>
 
       <p>
         <b><%= t_m 'OriginalPicture.md5' -%>:</b>
-        <%= h(@original_picture.md5) %>
-      </p>
-
-      <p>
-        <b><%= t_m 'OriginalPicture.published_at' -%>:</b>
-        <% if @original_picture.published_at %>
-          <%= l @original_picture.published_at %>
-        <% end %>
-      </p>
-
-      <p>
-        <b><%= t_m 'OriginalPicture.stopped_at' -%>:</b>
-        <% if @original_picture.stopped_at %>
-          <%= l @original_picture.stopped_at %>
-        <% end %>
+        <%= h(@item.md5) %>
       </p>
 
       <p>
         <b><%= t_m 'OriginalPicture.created_at' -%>:</b>
-        <%= l @original_picture.created_at %>
+        <%= l @item.created_at %>
       </p>
 
       <p>
         <b><%= t_m 'OriginalPicture.updated_at' -%>:</b>
-        <%= l @original_picture.updated_at %>
+        <%= l @item.updated_at %>
       </p>
 
       <h2>
         <%= t 'original_pictures.show.select_license' %>
       </h2>
       <p>
-        <%= button_to t('original_pictures.show.select'), {:controller => 'original_picture_license_groups', :action => :new, :original_picture_id => @original_picture.id} %>
+        <%= button_to t('original_pictures.show.select'), {:controller => 'original_picture_license_groups', :action => :new, :original_picture_id => @item.id} %>
       </p>
       <h2>
         <%= t 'original_pictures.show.replace_picture' %>
       </h2>
-      <%= form_for(@original_picture, :html => { :multipart => true }) do |f| %>
+      <%= form_for(@item, :html => { :multipart => true }) do |f| %>
         <%= f.file_field "file" %>
         <div class="actions">
           <%= f.submit t 'original_pictures.show.replace' %>
       <h2>
         <%= t 'link.destroy' %>
       </h2>
-      <%= link_to t('link.destroy'), original_picture_path(@original_picture), :method => :delete %>
+      <%= link_to t('link.destroy'), original_picture_path(@item), :method => :delete %>
     </td>
     <td>
       <h1>
         <%= t 'original_pictures.show.history' %>
       </h1>
-      <%= render 'history_list', :history => @original_picture.history %>
+      <%= render 'history_list', :history => @item.history %>
     </td>
   </tr>
 </table>