OSDN Git Service

t#30102:update i18n op rp au ar gc gp pc
[pettanr/pettanr.git] / app / views / ground_pictures / index.html.erb
index 18e665c..f44803e 100644 (file)
@@ -1,23 +1,29 @@
-<h1>Listing Ground Pictures</h1>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>id</th>
-    <th>panel_id</th>
-    <th>picture_id</th>
-    <th>repeat</th>
-    <th>position x,y</th>
-    <th>z</th>
+    <th><%= t_m 'GroundPicture.panel_id' -%></th>
+    <th><%= t_m 'GroundPicture.picture_id' -%></th>
+    <th><%=   -%></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 |gp| %>
-  <tr>
-    <td><%= gp.id %></td>
-    <td><%= link_to gp.panel_id, panel_path(gp.panel_id) %></td>
-    <td><%= link_to gp.picture_id, color_path(gp.picture_id) %></td>
-    <td><%= gp.repeat %><%= MagicNumber['ground_picture_repeat_items'][gp.repeat] %></td>
-    <td><%= gp.x %>, <%= gp.y %></td>
-    <td><%= gp.z %></td>
-  </tr>
-<% end -%>
+  <% @ground_pictures.each do |gp| %>
+    <tr>
+      <td><%= link_to gp.panel_id, panel_path(gp.panel_id) %></td>
+      <td><%= tag :img, gp.picture.tmb_opt_img_tag -%></td>
+      <td><%= render gp.picture.credit_template, :picture => gp.picture %></td>
+      <td><%= gp.z %></td>
+      <td><%= gp.repeat %><%= MagicNumber['ground_picture_repeat_items'][gp.repeat] %></td>
+      <td><%= gp.x %></td>
+      <td><%= gp.y %></td>
+      <td><%= distance_of_time_in_words_to_now gp.created_at %></td>
+      <td><%= distance_of_time_in_words_to_now gp.updated_at %></td>
+    </tr>
+  <% end -%>
 </table>