OSDN Git Service

t#30102:update i18n op rp au ar gc gp pc
[pettanr/pettanr.git] / app / views / original_pictures / index.html.erb
index 43c5fb2..3c8a214 100644 (file)
@@ -1,12 +1,43 @@
-<h1>Listing original_pictures</h1>
+<h1><%= t '.title' -%></h1>
 
 <%= render 'uploader' %>
-<% @original_pictures.each do |original_picture| %>
-  <div>
-    <%= original_picture.filename %>
-    <img src="<%= original_picture.resource_picture.url('thumbnail') -%>">
-    <%= original_picture.width %>x<%= original_picture.height %>
-    <%= original_picture.filesize %>bytes
-    画:<%= h original_picture.artist.name %>
+<table>
+  <tr>
+    <th><%= t_m 'OriginalPicture' -%></th>
+    <th><%= t 'original_pictures.index.history' -%></th>
+    <th><%= t 'original_pictures.index.status' -%></th>
+    <th><%= t_m 'ResourcePicture' -%></th>
+    <th><%=  -%></th>
+    <th><%=  -%></th>
+  </tr>
+  <% @original_pictures.each do |original_picture| %>
+    <tr>
+      <td>
+        <%= link_to tag(:img, original_picture.tmb_opt_img_tag), original_picture %>
+      </td>
+      <td>
+        <% if original_picture.pictures.empty? %>
+          -
+        <% else %>
+          <%= link_to original_picture.history.first.revision, history_original_picture_path(original_picture) %>
+        <% end %>
+      </td>
+      <td>
+      </td>
+      <td>
+        <% if original_picture.resource_picture %>
+          <%= link_to t('original_pictures.index.stop'), original_picture.resource_picture, confirm: 'Are you sure?', method: :delete %>
+        <% else %>
+        <% end %>
+      </td>
+      <td>
+        <%= link_to t('original_pictures.index.destroy'), original_picture, confirm: 'Are you sure?', method: :delete %>
+      </td>
+    </tr>
+  <% end %>
+</table>
+<%= link_to 'open form', new_original_picture_path, :remote => true %>
+  <div id="uploader">
+    ...
   </div>
-<% end %>
+