OSDN Git Service

import all source code
[pettanr/pettanr.git] / app / views / original_pictures / index.html.erb
1 <h1>Listing original_pictures</h1>
2
3 <%= render 'uploader' %>
4 <table>
5   <tr>
6     <th>Ext</th>
7     <th>Width</th>
8     <th>Height</th>
9     <th>filesize</th>
10     <th>artist</th>
11     <th></th>
12   </tr>
13
14 <% @original_pictures.each do |original_picture| %>
15   <tr>
16     <td><%= original_picture.ext %></td>
17     <td><%= original_picture.width %></td>
18     <td><%= original_picture.height %></td>
19     <td><%= original_picture.filesize %></td>
20     <td><%= original_picture.artist_id %></td>
21     <td><%= link_to 'Show', original_picture %></td>
22     <td>
23       <% if author_signed_in? -%>
24         <% if original_picture.own? current_author -%>
25           <%= link_to 'Destroy', original_picture, confirm: 'Are you sure?', method: :delete %>
26         <% end -%>
27       <% end -%>
28     </td>
29   </tr>
30 <% end %>
31 </table>