OSDN Git Service

8905130a97c7d86c100b21d19282b64c695b134b
[pettanr/pettanr.git] / app / views / original_pictures / index.html.erb
1 <h1><%= t '.title' -%></h1>
2
3 <%= render 'form' %>
4 <table>
5   <tr>
6     <th><%= t_m 'OriginalPicture' -%></th>
7     <th><%= t 'original_pictures.index.history' -%></th>
8     <th><%= t 'original_pictures.index.status' -%></th>
9     <th><%= t_m 'ResourcePicture' -%></th>
10     <th><%=  -%></th>
11     <th><%=  -%></th>
12   </tr>
13   <% @original_pictures.each do |original_picture| %>
14     <tr>
15       <td>
16         <%= link_to tag(:img, original_picture.tmb_opt_img_tag), original_picture %>
17       </td>
18       <td>
19         <% if original_picture.pictures.empty? %>
20           -
21         <% else %>
22           <%= link_to original_picture.history.first.revision, history_original_picture_path(original_picture) %>
23         <% end %>
24       </td>
25       <td>
26       </td>
27       <td>
28         <% if original_picture.resource_picture %>
29           <%= link_to t('original_pictures.index.stop'), original_picture.resource_picture, confirm: 'Are you sure?', method: :delete %>
30         <% else %>
31         <% end %>
32       </td>
33       <td>
34         <%= link_to t('original_pictures.index.destroy'), original_picture, confirm: 'Are you sure?', method: :delete %>
35       </td>
36     </tr>
37   <% end %>
38 </table>