OSDN Git Service

t#30102:update i18n op rp au ar gc gp pc
[pettanr/pettanr.git] / app / views / resource_pictures / list.html.erb
index 2141011..eac212c 100644 (file)
@@ -1,36 +1,44 @@
-<h1>Listing resource_pictures</h1>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>id</th>
-    <th>Ext</th>
-    <th>Width</th>
-    <th>Height</th>
-    <th>filesize</th>
-    <th>artist</th>
-    <th>license_id</th>
-    <th>original_picture_id</th>
-    <th>artist_name</th>
-    <th>classname</th>
-    <th>picture</th>
-    <th>created_at</th>
-    <th>updated_at</th>
+    <th></th>
+    <th><%= t_m 'ResourcePicture.id' -%></th>
+    <th><%= t_m 'ResourcePicture.original_picture_id' -%></th>
+    <th><%= t_m 'ResourcePicture.ext' -%></th>
+    <th><%= t_m 'ResourcePicture.width' -%></th>
+    <th><%= t_m 'ResourcePicture.height' -%></th>
+    <th><%= t_m 'ResourcePicture.filesize' -%></th>
+    <th><%= t_m 'ResourcePicture.md5' -%></th>
+    <th><%= t_m 'ResourcePicture.artist_id' -%></th>
+    <th><%= t_m 'ResourcePicture.license_id' -%></th>
+    <th><%= t_m 'ResourcePicture.artist_name' -%></th>
+    <th><%= t_m 'ResourcePicture.classname' -%></th>
+    <th><%= t_m 'ResourcePicture.credit' -%></th>
+    <th><%= t_m 'ResourcePicture.settings' -%></th>
+    <th><%= t_m 'ResourcePicture.picture_id' -%></th>
+    <th><%= t_m 'ResourcePicture.created_at' -%></th>
+    <th><%= t_m 'ResourcePicture.updated_at' -%></th>
   </tr>
-<% @resource_pictures.each do |resource_picture| %>
-  <tr>
-    <td><%= link_to resource_picture.id, :action => :browse, :id => resource_picture.id%></td>
-    <td><%= resource_picture.ext %></td>
-    <td><%= resource_picture.width %></td>
-    <td><%= resource_picture.height %></td>
-    <td><%= resource_picture.filesize %></td>
-    <td><%= link_to resource_picture.artist_id, :controller => 'artists', :action => :browse, :id => resource_picture.artist_id %></td>
-    <td><%= link_to resource_picture.license_id, :controller => 'licenses', :action => :browse, :id => resource_picture.license_id %></td>
-    <td><%= link_to resource_picture.original_picture_id, :controller => 'original_pictures', :action => :browse, :id => resource_picture.original_picture_id%></td>
-    <td><%= resource_picture.artist_name %></td>
-    <td><%= resource_picture.classname %></td>
-    <td><%= link_to resource_picture.picture_id, main_app.picture_path(resource_picture.picture_id) %></td>
-    <td><%= resource_picture.created_at %></td>
-    <td><%= resource_picture.updated_at %></td>
-  </tr>
-<% end %>
+  <% @resource_pictures.each do |resource_picture| %>
+    <tr>
+      <td><%= link_to tag(:img, resource_picture.tmb_opt_img_tag), resource_picture.url %></td>
+      <td><%= link_to resource_picture.id, browse_resource_picture_path(resource_picture.id) %></td>
+      <td><%= link_to resource_picture.original_picture_id, browse_original_picture_path(resource_picture.original_picture) %></td>
+      <td><%= h resource_picture.ext %></td>
+      <td><%= resource_picture.width %></td>
+      <td><%= resource_picture.height %></td>
+      <td><%= resource_picture.filesize %></td>
+      <td><%= h(truncate(resource_picture.md5, :length => 8)) %></td>
+      <td><%= link_to resource_picture.artist_id, browse_artist_path(resource_picture.artist) %></td>
+      <td><%= link_to resource_picture.license_id, browse_license_path(resource_picture.license) %></td>
+      <td><%= h(truncate(resource_picture.artist_name, :length => 8)) %></td>
+      <td><%= h(truncate(resource_picture.classname, :length => 8)) %></td>
+      <td><%= h(truncate(resource_picture.credit, :length => 8)) %></td>
+      <td><%= h(truncate(resource_picture.settings, :length => 8)) %></td>
+      <td><%= link_to resource_picture.picture_id, main_app.browse_picture_path(resource_picture.picture) %></td>
+      <td><%= l resource_picture.created_at %></td>
+      <td><%= l resource_picture.updated_at %></td>
+    </tr>
+  <% end %>
 </table>