OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / views / resource_pictures / index.html.erb
index 426f7aa..f255489 100644 (file)
@@ -1,7 +1,7 @@
 <h1><%= t '.title' -%></h1>
 <table>
   <tr>
-    <th</th>
+    <th></th>
     <th></th>
     <th><%= t_m 'ResourcePicture.artist_id' -%></th>
     <th><%= t_m 'ResourcePicture.ext' -%></th>
@@ -9,29 +9,9 @@
     <th><%= t_m 'ResourcePicture.height' -%></th>
     <th><%= t_m 'ResourcePicture.filesize' -%></th>
   </tr>
-<% @resource_pictures.each do |resource_picture| %>
-  <tr>
-    <td>
-      <%= link_to tag(:img, resource_picture.tmb_opt_img_tag), resource_picture_path(resource_picture) %>
-    </td>
-    <td>
-      <%= render resource_picture.credit_template, :picture => resource_picture %>
-    </td>
-    <td>
-      <%= link_to(h(truncate(resource_picture.artist.name, :length => 8)), artist_path(resource_picture.artist)) %>
-    </td>
-    <td>
-      <%= h resource_picture.ext %>
-    </td>
-    <td>
-      <%= resource_picture.width %>px
-    </td>
-    <td>
-      <%= resource_picture.height %>px
-    </td>
-    <td>
-      <%= resource_picture.filesize %>bytes
-    </td>
-  </tr>
-<% end %>
+
+  <% @resource_pictures.each do |resource_picture| %>
+    <%= render 'list_item', :resource_picture => resource_picture %>
+  <% end %>
 </table>
+<%= paginate(@paginate) %>