OSDN Git Service

t#30102:update i18n color,sp,sbt
[pettanr/pettanr.git] / app / views / system_pictures / index.html.erb
index e65bf4c..450992c 100644 (file)
@@ -1,33 +1,19 @@
-<h1>Listing system_pictures</h1>
-
-<% if admin_signed_in? -%>
-  <%= form_tag( {:action => "create"} , { :multipart => true }) do %>
-    <label for="file">File to Upload</label> <%= file_field_tag "system_picture[file]" %>
-    <%= submit_tag 'upload' -%>
-  <% end -%>
-<% end -%>
+<h1><%= t '.title' -%></h1>
 
 <table>
   <tr>
-    <th>Ext</th>
-    <th>Width</th>
-    <th>Height</th>
-    <th>filesize</th>
     <th></th>
+    <th><%= t_m 'SystemPicture.ext' -%></th>
+    <th><%= t_m 'SystemPicture.width' -%>x<%= t_m 'SystemPicture.height' -%></th>
+    <th><%= t_m 'SystemPicture.filesize' -%></th>
   </tr>
 
 <% @system_pictures.each do |system_picture| %>
   <tr>
-    <td><%= system_picture.ext %></td>
-    <td><%= system_picture.width %></td>
-    <td><%= system_picture.height %></td>
+    <td><%= link_to tag(:img, :src => system_picture.url), system_picture.url %>(<%= link_to system_picture.id, system_picture_path(system_picture) %>)</td>
+    <td><%= h system_picture.ext %></td>
+    <td><%= system_picture.width %>x<%= system_picture.height %></td>
     <td><%= system_picture.filesize %></td>
-    <td><%= link_to 'Show', system_picture %></td>
-    <td>
-      <% if admin_signed_in? -%>
-        <%= link_to 'Destroy', system_picture, confirm: 'Are you sure?', method: :delete %>
-      <% end -%>
-    </td>
   </tr>
 <% end %>
 </table>