OSDN Git Service

w
[pettanr/pettanr.git] / app / views / system_pictures / index.html.erb
index 0143366..7cf491d 100644 (file)
@@ -1,31 +1,19 @@
-<h1>Listing original_pictures</h1>
+<h1><%= t '.title' -%></h1>
 
-<%= render 'uploader' %>
 <table>
   <tr>
-    <th>Ext</th>
-    <th>Width</th>
-    <th>Height</th>
-    <th>filesize</th>
-    <th>artist</th>
     <th></th>
+    <th><%= t_m 'SystemPicture.ext' -%></th>
+    <th><%= t_m 'SystemPicture.width' -%>x<%= t_m 'SystemPicture.height' -%></th>
+    <th><%= t_m 'SystemPicture.filesize' -%></th>
   </tr>
 
-<% @original_pictures.each do |original_picture| %>
+<% @system_pictures.each do |system_picture| %>
   <tr>
-    <td><%= original_picture.ext %></td>
-    <td><%= original_picture.width %></td>
-    <td><%= original_picture.height %></td>
-    <td><%= original_picture.filesize %></td>
-    <td><%= original_picture.artist_id %></td>
-    <td><%= link_to 'Show', original_picture %></td>
-    <td>
-      <% if author_signed_in? -%>
-        <% if original_picture.own? current_author -%>
-          <%= link_to 'Destroy', original_picture, confirm: 'Are you sure?', method: :delete %>
-        <% end -%>
-      <% end -%>
-    </td>
+    <td><%= link_to tag(:img, system_picture.tmb_opt_img_tag), system_picture.url %>(<%= link_to system_picture.id, system_picture_path(system_picture) %>)</td>
+    <td><%= h system_picture.ext %></td>
+    <td><%= system_picture.width %>x<%= system_picture.height %></td>
+    <td><%= system_picture.filesize %></td>
   </tr>
 <% end %>
 </table>