OSDN Git Service

Merge branch 'syspic'
[pettanr/pettanr.git] / app / views / system_pictures / index.html.erb
1 <h1>Listing system_pictures</h1>
2
3 <% if admin_signed_in? -%>
4   <%= form_tag( {:action => "create"} , { :multipart => true }) do %>
5     <label for="file">File to Upload</label> <%= file_field_tag "system_picture[file]" %>
6     <%= submit_tag 'upload' -%>
7   <% end -%>
8 <% end -%>
9
10 <table>
11   <tr>
12     <th>Ext</th>
13     <th>Width</th>
14     <th>Height</th>
15     <th>filesize</th>
16     <th></th>
17   </tr>
18
19 <% @system_pictures.each do |system_picture| %>
20   <tr>
21     <td><%= system_picture.ext %></td>
22     <td><%= system_picture.width %></td>
23     <td><%= system_picture.height %></td>
24     <td><%= system_picture.filesize %></td>
25     <td><%= link_to 'Show', system_picture %></td>
26     <td>
27       <% if admin_signed_in? -%>
28         <%= link_to 'Destroy', system_picture, confirm: 'Are you sure?', method: :delete %>
29       <% end -%>
30     </td>
31   </tr>
32 <% end %>
33 </table>