OSDN Git Service

w
[pettanr/pettanr.git] / app / views / authors / panel_pictures.html.erb
index db6b5e1..884baeb 100644 (file)
@@ -3,31 +3,18 @@
 
 <table>
   <tr>
+    <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.caption' -%></th>
+    <th><%= t_m 'PanelPicture.z' -%></th>
     <th><%= t_m 'PanelPicture.updated_at' -%></th>
   </tr>
 
   <% @panel_pictures.each do |panel_picture| %>
-    <tr>
-      <% if panel_picture.picture.showable? @author %>
-        <td>
-          <%= link_to(tag(:img, panel_picture.tmb_opt_img_tag), panel_picture) %>
-        </td>
-        <td><%= render panel_picture.picture.credit_template, :picture => panel_picture.picture %></td>
-      <% else %>
-        <td>
-          <%= link_to(tag(:img, panel_picture.picture.tail_tmb_opt_img_tag(asset_path('error.png'))), panel_picture) -%>
-        </td>
-        <td></td>
-      <% end %>
-      <td><%= link_to panel_picture.panel.id, panel_path(panel_picture.panel) %></td>
-      <td><%= link_to h(truncate(panel_picture.link, :length => 12)), panel_picture.link %></td>
-      <td><%= h(truncate(panel_picture.caption, :length => 12)) %></td>
-      <td><%= distance_of_time_in_words_to_now panel_picture.updated_at %></td>
-    </tr>
+    <%= render 'panel_pictures/list_item', :panel_picture => panel_picture %>
   <% end %>
 </table>
+<%= paginate(@paginate) %>