OSDN Git Service

t#30328:create op import ...and pull
[pettanr/pettanr.git] / app / views / original_pictures / _exist.html.erb
index 8129f4f..66df334 100644 (file)
@@ -1,4 +1,52 @@
-<% case exist -%>
-<% when true -%>
-  この画像は既に公開されています
+<% if pictures.any? -%>
+  <%= t('original_pictures.exist.announce') %>
+  <table>
+    <tr>
+      <th><%= t_m 'Picture' -%></th>
+      <th><%= t_m 'Picture.credit' -%></th>
+      <th><%= t_m 'Picture.artist_id' -%></th>
+      <th><%= t 'original_pictures.exist.status' -%></th>
+      <th><%= t_m 'ResourcePicture' -%></th>
+    </tr>
+    <% pictures.each do |picture| %>
+      <tr>
+        <% if picture.showable? @author %>
+          <td>
+            <%= link_to tag(:img, picture.tmb_opt_img_tag), picture %>
+          </td>
+          <td>
+            <%= render picture.credit_template, :picture => picture %>
+          </td>
+        <% else %>
+          <td>
+            <%= link_to tag(:img, picture.tail_tmb_opt_img_tag(asset_path('error.png'))), picture -%>
+          </td>
+          <td>
+          </td>
+        <% end %>
+        <td>
+          <% if picture.artist %>
+            <%= link_to h(picture.artist.name), picture.artist %>
+          <% end %>
+        </td>
+        <td>
+          <% if picture.enable? %>
+            <% if picture.head? %>
+              <%= t 'original_pictures.exist.head' -%>
+            <% else %>
+              <%= t 'original_pictures.exist.tail' -%>
+            <% end %>
+          <% else %>
+            <%= t 'original_pictures.existe.disable' -%>
+          <% end %>
+        </td>
+        <td>
+          <% if picture.enable? %>
+            <%= link_to tag(:img, picture.resource_picture.tmb_opt_img_tag), picture.resource_picture %>
+          <% else %>
+          <% end %>
+        </td>
+      </tr>
+    <% end %>
+  </table>
 <% end -%>