Add Rental Policies and Limits
authorIra W. Snyder <devel@irasnyder.com>
Mon, 26 Nov 2007 05:55:26 +0000 (21:55 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Mon, 26 Nov 2007 05:55:26 +0000 (21:55 -0800)
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
app/controllers/game_policy_controller.rb
app/controllers/login_controller.rb
app/controllers/rentable_policy_controller.rb
app/controllers/video_policy_controller.rb
app/views/game_policy/list.rhtml
app/views/layouts/admin.rhtml
app/views/login/limits.rhtml [new file with mode: 0644]
app/views/rentable_policy/list.rhtml
app/views/video_policy/list.rhtml

index 1d5dc09..f2ca039 100644 (file)
@@ -1,4 +1,5 @@
 class GamePolicyController < ApplicationController
+  layout "admin"
 
   # Make sure that the user has logged in before they can take any action
   before_filter :authorize, :only => [:index, :list, :show]
index 7ca9b85..53cd00b 100644 (file)
@@ -11,6 +11,10 @@ class LoginController < ApplicationController
     render :action => 'maintenence'
   end
 
+  def limits
+    render :action => 'limits'
+  end
+
   def add_user
     @user = User.new(params[:user])
     if request.post? and @user.save
index 84c4e7c..4151e6a 100644 (file)
@@ -1,4 +1,5 @@
 class RentablePolicyController < ApplicationController
+  layout "admin"
 
   # Make sure that a user logs in before doing any action here
   before_filter :authorize, :only => [:index, :list, :show]
index 918c2e4..7999bc0 100644 (file)
@@ -1,4 +1,5 @@
 class VideoPolicyController < ApplicationController
+  layout "admin"
 
   # Make sure that a user logs in before doing any action here
   before_filter :authorize, :only => [:index, :list, :show]
index 761de30..03b7b37 100644 (file)
@@ -1,6 +1,6 @@
-<h1>Listing game_policies</h1>
+<h1>Game Rental Policies</h1>
 
-<table>
+<table border="1">
   <tr>
   <% for column in GamePolicy.content_columns %>
     <th><%= column.human_name %></th>
@@ -12,9 +12,8 @@
   <% for column in GamePolicy.content_columns %>
     <td><%=h game_policy.send(column.name) %></td>
   <% end %>
-    <td><%= link_to 'Show', :action => 'show', :id => game_policy %></td>
+    <td><%= link_to 'View', :action => 'show', :id => game_policy %></td>
     <td><%= link_to 'Edit', :action => 'edit', :id => game_policy %></td>
-    <td><%= link_to 'Destroy', { :action => 'destroy', :id => game_policy }, :confirm => 'Are you sure?', :method => :post %></td>
   </tr>
 <% end %>
 </table>
index 13cf017..420c1ad 100644 (file)
@@ -22,6 +22,7 @@
       <p><%= link_to "Customer Maintenence", :controller => 'customer', :action => 'index' %></p>
       <p><%= link_to "Financial Information", :controller => 'purchase', :action => 'index' %></p>
       <p><%= link_to "System Maintenence", :controller => 'login', :action => 'maintenence' %></p>
+      <p><%= link_to "Rental Policies and Limits", :controller => 'login', :action => 'limits' %></p>
       <br/>
       <p><%= link_to "Logout", :controller => 'login', :action => 'logout' %></p>
     </div>
diff --git a/app/views/login/limits.rhtml b/app/views/login/limits.rhtml
new file mode 100644 (file)
index 0000000..5d86493
--- /dev/null
@@ -0,0 +1,9 @@
+<h1>Rental Limits and Pricing</h1>
+
+<h3>Actions</h3>
+<ul>
+  <li><%= link_to 'Game Rental Pricing', :controller => 'game_policy', :action => 'index' %></li>
+  <li><%= link_to 'Video Rental Pricing', :controller => 'video_policy', :action => 'index' %></li>
+  <li><%= link_to 'Rental Limits', :controller => 'rentable_policy', :action => 'index' %></li>
+</ul>
+
index b5a4833..c1c0e57 100644 (file)
@@ -1,6 +1,6 @@
-<h1>Listing rentable_policies</h1>
+<h1>Rental Policies</h1>
 
-<table>
+<table border="1">
   <tr>
   <% for column in RentablePolicy.content_columns %>
     <th><%= column.human_name %></th>
@@ -12,9 +12,8 @@
   <% for column in RentablePolicy.content_columns %>
     <td><%=h rentable_policy.send(column.name) %></td>
   <% end %>
-    <td><%= link_to 'Show', :action => 'show', :id => rentable_policy %></td>
+    <td><%= link_to 'View', :action => 'show', :id => rentable_policy %></td>
     <td><%= link_to 'Edit', :action => 'edit', :id => rentable_policy %></td>
-    <td><%= link_to 'Destroy', { :action => 'destroy', :id => rentable_policy }, :confirm => 'Are you sure?', :method => :post %></td>
   </tr>
 <% end %>
 </table>
index 2b916c6..0573275 100644 (file)
@@ -1,6 +1,6 @@
-<h1>Listing video_policies</h1>
+<h1>Video Rental Policies</h1>
 
-<table>
+<table border="1">
   <tr>
   <% for column in VideoPolicy.content_columns %>
     <th><%= column.human_name %></th>
@@ -12,9 +12,8 @@
   <% for column in VideoPolicy.content_columns %>
     <td><%=h video_policy.send(column.name) %></td>
   <% end %>
-    <td><%= link_to 'Show', :action => 'show', :id => video_policy %></td>
+    <td><%= link_to 'View', :action => 'show', :id => video_policy %></td>
     <td><%= link_to 'Edit', :action => 'edit', :id => video_policy %></td>
-    <td><%= link_to 'Destroy', { :action => 'destroy', :id => video_policy }, :confirm => 'Are you sure?', :method => :post %></td>
   </tr>
 <% end %>
 </table>