OSDN Git Service

一覧と削除を実装
[praisedb/praisedb.git] / app / views / songs / list.html.erb
diff --git a/app/views/songs/list.html.erb b/app/views/songs/list.html.erb
new file mode 100644 (file)
index 0000000..612592e
--- /dev/null
@@ -0,0 +1,25 @@
+<table border=1>
+  <tr>
+    <th nowrap>ID</th>
+    <th nowrap>CODE<br>コード</th>
+    <th nowrap>SIZE<br>サイズ</th>
+    <th>TITLE<br>タイトル</th>
+    <th nowrap>LAST UPDATE<br>最終更新</th>
+    <th nowrap colspan="3">OPERATIONS<br>各種操作</th>
+  </tr>
+  <%- @songs.each do |song| -%>
+    <tr>
+      <td><%=h song.id %></td>
+      <td><%=h song.code %></td>
+      <td><%=h song.font_size_name %></td>
+      <td><%=h song.title %></td>
+      <td><%=l song.updated_at %></td>
+      <td>
+        <%= link_to('EDIT', edit_song_path(song)) %>
+        <%= link_to('DEL', song, :confirm => '本当に削除しますか?', :method => :delete) %>
+        <%= link_to('PDF') %>
+        <%= link_to('MP3') %>
+      </td>
+    </tr>
+  <%- end -%>
+</table>