OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / views / authors / ground_pictures.html.erb
index c886ec1..726c337 100644 (file)
@@ -2,36 +2,20 @@
 
 <table>
   <tr>
-    <th><%= t_m 'GroundPicture.panel_id' -%></th>
+    <th><%= t_m 'GroundPicture.id' -%></th>
+    <th><%= t_m 'GroundPicture.caption' -%></th>
     <th><%= t_m 'GroundPicture.picture_id' -%></th>
     <th><%=   -%></th>
+    <th><%= t_m 'GroundPicture.panel_id' -%></th>
     <th><%= t_m 'GroundPicture.z' -%></th>
     <th><%= t_m 'GroundPicture.repeat' -%></th>
     <th><%= t_m 'GroundPicture.x' -%></th>
     <th><%= t_m 'GroundPicture.y' -%></th>
-    <th><%= t_m 'GroundPicture.created_at' -%></th>
     <th><%= t_m 'GroundPicture.updated_at' -%></th>
   </tr>
 
-  <% @ground_pictures.each do |ground_picture| %>
-    <tr>
-      <td><%= link_to ground_picture.panel_id, panel_path(ground_picture.panel_id) %></td>
-      <% if ground_picture.picture.showable? @author %>
-        <td><%= link_to(tag(:img, ground_picture.picture.tmb_opt_img_tag), ground_picture) -%></td>
-        <td><%= render ground_picture.picture.credit_template, :picture => ground_picture.picture %></td>
-      <% else %>
-        <td>
-          <%= link_to(tag(:img, ground_picture.picture.tail_tmb_opt_img_tag(asset_path('error.png'))), ground_picture) -%>
-        </td>
-        <td></td>
-      <% end %>
-      <td><%= ground_picture.z %></td>
-      <td><%= ground_picture.repeat %><%= MagicNumber['ground_picture_repeat_items'][ground_picture.repeat] %></td>
-      <td><%= ground_picture.x %></td>
-      <td><%= ground_picture.y %></td>
-      <td><%= distance_of_time_in_words_to_now ground_picture.created_at %></td>
-      <td><%= distance_of_time_in_words_to_now ground_picture.updated_at %></td>
-    </tr>
+  <% @ground_pictures.each do |gp| %>
+    <%= render 'ground_pictures/list_item', :ground_picture => gp %>
   <% end %>
 </table>
 <%= paginate(@paginate) %>