OSDN Git Service

merge v06sheet
[pettanr/pettanr.git] / app / views / scrolls / list.html.erb
diff --git a/app/views/scrolls/list.html.erb b/app/views/scrolls/list.html.erb
new file mode 100644 (file)
index 0000000..557736e
--- /dev/null
@@ -0,0 +1,24 @@
+<h1><%= t '.title' -%></h1>
+
+<table>
+  <tr>
+    <th><%= t_m 'Scroll.id' -%></th>
+    <th><%= t_m 'Scroll.title' -%></th>
+    <th><%= t_m 'Scroll.visible' -%></th>
+    <th><%= t_m 'Scroll.author_id' -%></th>
+    <th><%= t_m 'Scroll.created_at' -%></th>
+    <th><%= t_m 'Scroll.updated_at' -%></th>
+  </tr>
+
+<% @scrolls.each do |scroll| %>
+  <tr>
+    <td><%= link_to scroll.id, browse_scroll_path(scroll) %></td>
+    <td><%= h(truncate(scroll.title, :length => 12)) %></td>
+    <td><%= scroll.visible %></td>
+    <td><%= link_to scroll.author_id, browse_author_path(scroll.author) %></td>
+    <td><%= l scroll.created_at %></td>
+    <td><%= l scroll.updated_at %></td>
+  </tr>
+<% end %>
+</table>
+