Conditional that redircts to user profile page if too many elections in control panel...
author<jlsharps@mit.edu> <>
Fri, 22 Aug 2008 22:48:50 +0000 (18:48 -0400)
committer<jlsharps@mit.edu> <>
Fri, 22 Aug 2008 22:48:50 +0000 (18:48 -0400)
app/controllers/account_controller.rb
app/views/front/_user_summary.rhtml
public/stylesheets/front.css

index 57cf343ea9de01ab95d67c6de556130df0ef4d1e..2bda7ea04330def0bf0f8eae90f6520d44ecbb2d 100644 (file)
@@ -69,7 +69,7 @@ class AccountController < ApplicationController
   end
   #======================================================================
   
-  #The following methods are for slectricity specific uses
+  #The following methods are for selectricity specific uses
   def summary
     @user = User.find(params[:id])
   end
index 30b3799b6157c4beb914bac3590ec1f452a5a383..fd4ee6f5aff28c73a71c2ce5f010166e75da6be0 100644 (file)
@@ -1,5 +1,8 @@
 <% if @current_elections.length < 1 %>
   <p><em>You have not created any elections.</em></p>
+<% elsif @current_elections.length > 6 %>
+<p>You have more than six elections which may not fit on the control panel. Clcik on the following link to go to your user profile, which lists all your elections. <b/> 
+<%= link_to "Summary", :controller => "account", :action => "summary", :id => session[:user].id %> </p>
 <% else %>
   <ul>
   <% for election in @current_elections %>
index 8805abedfe3cfcfefc4cf7af9214ee7c202f8e57..4c973b125a097ee5cf45a4fafb867cf5fcf3d853 100644 (file)
@@ -127,7 +127,6 @@ h3 {
 
 #control-room-content {
        height: 428px;
-       overflow:auto;
 }
 
 #quickvotes {

Benjamin Mako Hill || Want to submit a patch?