Add real, selectable videogenres
[cs356-p2-videostore.git] / app / views / video / list.rhtml
index 1a0ec16..27bd318 100644 (file)
@@ -2,20 +2,24 @@
 
 <table>
   <tr>
-  <th>Video ID</th>
-  <th>Checked Out</th>
-  <% for column in Video.content_columns %>
-    <th><%= column.human_name %></th>
-  <% end %>
+    <th>Video ID</th>
+    <th>Checked Out</th>
+    <th>Title</th>
+    <th>New Release</th>
+    <th>Genre</th>
+    <th>Director</th>
+    <th>Media</th>
   </tr>
   
 <% for video in @videos %>
   <tr>
-  <td><%=h video.id %></td>
-  <td><%=h video.checkedout? %></td>
-  <% for column in Video.content_columns %>
-    <td><%=h video.send(column.name) %></td>
-  <% end %>
+    <td><%=h video.id %></td>
+    <td><%=h video.checkedout? %></td>
+    <td><%=h video.title %></td>
+    <td><%=h video.newrelease %></td>
+    <td><%=h Videogenre.find(video.video_genre).name %></td>
+    <td><%=h video.director %></td>
+    <td><%=h video.media %></td>
     <td><%= link_to 'Show', :action => 'show', :id => video %></td>
     <td><%= link_to 'Edit', :action => 'edit', :id => video %></td>
     <td><%= link_to 'Destroy', { :action => 'destroy', :id => video }, :confirm => 'Are you sure?', :method => :post %></td>