OSDN Git Service

w
[pettanr/pettanr.git] / app / views / original_pictures / list.html.erb
1 <h1><%= t '.title' -%></h1>
2
3 <table>
4   <tr>
5     <th></th>
6     <th><%= t_m 'OriginalPicture.id' -%></th>
7     <th><%= t_m 'OriginalPicture.ext' -%></th>
8     <th><%= t_m 'OriginalPicture.width' -%></th>
9     <th><%= t_m 'OriginalPicture.height' -%></th>
10     <th><%= t_m 'OriginalPicture.filesize' -%></th>
11     <th><%= t_m 'OriginalPicture.md5' -%></th>
12     <th><%= t_m 'OriginalPicture.artist_id' -%></th>
13     <th><%= t_m 'OriginalPicture.published_at' -%></th>
14     <th><%= t_m 'OriginalPicture.stopped_at' -%></th>
15     <th><%= t_m 'OriginalPicture.created_at' -%></th>
16     <th><%= t_m 'OriginalPicture.updated_at' -%></th>
17   </tr>
18
19   <% @original_pictures.each do |original_picture| %>
20     <tr>
21       <td><%= link_to tag(:img, original_picture.tmb_opt_img_tag), original_picture.url %></td>
22       <td><%= link_to original_picture.id,  browse_original_picture_path(original_picture) %></td>
23       <td><%= h original_picture.ext %></td>
24       <td><%= original_picture.width %></td>
25       <td><%= original_picture.height %></td>
26       <td><%= original_picture.filesize %></td>
27       <td><%= h(truncate(original_picture.md5, :length => 8)) %></td>
28       <td><%= link_to original_picture.artist_id, browse_artist_path(original_picture.artist) %></td>
29       <td>
30         <% if original_picture.published_at %>
31           <%= distance_of_time_in_words_to_now original_picture.published_at %>
32         <% end %>
33       </td>
34       <td>
35         <% if original_picture.stopped_at %>
36           <%= distance_of_time_in_words_to_now original_picture.stopped_at %>
37         <% end %>
38       </td>
39       <td><%= l original_picture.created_at %></td>
40       <td><%= l original_picture.updated_at %></td>
41     </tr>
42   <% end %>
43 </table>