Add System Maintence pages
[cs356-p2-videostore.git] / app / views / video / searchresults.rhtml
index daefca0..eae7d23 100644 (file)
@@ -1,27 +1,31 @@
-<h1>Search Results</h1>
+<h1>Search Results for '<%= @query[0].to_s %>'</h1>
 
 <% if @videos.empty? %>
 <p>Sorry, there were no results</p>
 <% else %>
-<table>
+<table border=1>
   <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>Title</th>
+    <th>Checked Out</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><%= link_to 'Show', :action => 'show', :id => video %></td>
+    <td><%=h video.id %></td>
+    <td><%=h video.title %></td>
+    <td><%=h tf_to_yesno(video.checkedout?) %></td>
+    <td><%=h tf_to_yesno(video.newrelease) %></td>
+    <td><%=h video.genre %></td>
+    <td><%=h video.director %></td>
+    <td><%=h video.media_name %></td>
+    <td><%= link_to 'View', :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?', :post => true %></td>
+    <td><%= link_to 'Remove', { :action => 'destroy', :id => video }, :confirm => 'Are you sure?', :post => true %></td>
   </tr>
 <% end %>
 </table>