OSDN Git Service

import all source code
[pettanr/pettanr.git] / app / views / original_pictures / index.html.erb
diff --git a/app/views/original_pictures/index.html.erb b/app/views/original_pictures/index.html.erb
new file mode 100644 (file)
index 0000000..0143366
--- /dev/null
@@ -0,0 +1,31 @@
+<h1>Listing original_pictures</h1>
+
+<%= render 'uploader' %>
+<table>
+  <tr>
+    <th>Ext</th>
+    <th>Width</th>
+    <th>Height</th>
+    <th>filesize</th>
+    <th>artist</th>
+    <th></th>
+  </tr>
+
+<% @original_pictures.each do |original_picture| %>
+  <tr>
+    <td><%= original_picture.ext %></td>
+    <td><%= original_picture.width %></td>
+    <td><%= original_picture.height %></td>
+    <td><%= original_picture.filesize %></td>
+    <td><%= original_picture.artist_id %></td>
+    <td><%= link_to 'Show', original_picture %></td>
+    <td>
+      <% if author_signed_in? -%>
+        <% if original_picture.own? current_author -%>
+          <%= link_to 'Destroy', original_picture, confirm: 'Are you sure?', method: :delete %>
+        <% end -%>
+      <% end -%>
+    </td>
+  </tr>
+<% end %>
+</table>