OSDN Git Service

w
[pettanr/pettanr.git] / app / views / panel_pictures / index.html.erb
index d0ba00b..aa5ecb1 100644 (file)
@@ -1,29 +1,19 @@
-<h1>Listing panel_pictures</h1>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>id</th>
-    <th>panel</th>
-    <th>picture</th>
-    <th>link</th>
-    <th>x, y, z</th>
-    <th>t</th>
-    <th>WidthxHeight</th>
-    <th>vh</th>
-    <th>updated_at</th>
+    <th><%= t_m 'PanelPicture.id' -%></th>
+    <th><%= t_m 'PanelPicture.caption' -%></th>
+    <th><%= t_m 'PanelPicture.picture_id' -%></th>
+    <th><%=  -%></th>
+    <th><%= t_m 'PanelPicture.panel_id' -%></th>
+    <th><%= t_m 'PanelPicture.link' -%></th>
+    <th><%= t_m 'PanelPicture.z' -%></th>
+    <th><%= t_m 'PanelPicture.updated_at' -%></th>
   </tr>
 
-<% @panel_pictures.each do |panel_picture| %>
-  <tr>
-    <td><%= panel_picture.id %></td>
-    <td><%= panel_picture.panel_id %></td>
-    <td><%= link_to(tag(:img, panel_picture.tmb_opt_img_tag), panel_picture.picture) %></td>
-    <td><%= h panel_picture.link %></td>
-    <td><%= panel_picture.x %>, <%= panel_picture.y %>, <%= panel_picture.z %></td>
-    <td><%= panel_picture.t %></td>
-    <td><%= panel_picture.width %>x<%= panel_picture.height %></td>
-    <td><%= panel_picture.flip %></td>
-    <td><%= panel_picture.updated_at %></td>
-  </tr>
-<% end %>
+  <% @panel_pictures.each do |panel_picture| %>
+    <%= render 'list_item', :panel_picture => panel_picture %>
+  <% end %>
 </table>
+<%= paginate(@paginate) %>