OSDN Git Service

t#31474:update panel_picture list
authoryasushiito <yas@pen-chan.jp>
Fri, 31 May 2013 07:14:50 +0000 (16:14 +0900)
committeryasushiito <yas@pen-chan.jp>
Fri, 31 May 2013 07:14:50 +0000 (16:14 +0900)
app/views/authors/panel_pictures.html.erb
app/views/home/panel_pictures.html.erb
app/views/panel_pictures/_list_item.html.erb
app/views/panel_pictures/index.html.erb

index db6b5e1..b6a7e77 100644 (file)
@@ -3,31 +3,16 @@
 
 <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.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>
index abd6cf5..219ef08 100644 (file)
@@ -2,11 +2,12 @@
 
 <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.updated_at' -%></th>
   </tr>
 
index 6c59f5b..63afb00 100644 (file)
@@ -1,4 +1,10 @@
 <tr>
+  <td>
+    <%= link_to(h(panel_picture.id.to_s), panel_picture_path(panel_picture)) %>
+  </td>
+  <td>
+    <%= link_to(h(truncate(panel_picture.caption, :length => 12)), panel_picture_path(panel_picture)) %>
+  </td>
   <% if panel_picture.picture.showable? @author %>
     <td>
       <%= link_to(tag(:img, panel_picture.tmb_opt_img_tag), 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>
+    <%= link_to panel_icon(:object => panel_picture.panel, :size => 25), panel_path(panel_picture.panel) %>
+    <%= h(truncate((panel_picture.panel.caption), :length => 12)) %></td>
+  <td>
+    <%= link_to h(truncate(panel_picture.link, :length => 12)), panel_picture.link %></td>
   <td><%= distance_of_time_in_words_to_now panel_picture.updated_at %></td>
 </tr>
index 3dd025c..70f01ee 100644 (file)
@@ -2,11 +2,12 @@
 
 <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.updated_at' -%></th>
   </tr>