From 3e545735b4784af19edec9bfcc8e25ff17cb7f12 Mon Sep 17 00:00:00 2001
From:
<%= quickform.date_select(:enddate, :start_year => Time.now.year) %>
+
Would you like to be e-mailed when this QuickVote concludes? +Yes <%= quickform.radio_button(:notices, 1)%> +No <%= quickform.radio_button(:notices, 0)%>
+<% end -%> + <% end %> diff --git a/app/views/quickvote/my_quickvotes.rhtml b/app/views/quickvote/my_quickvotes.rhtml index a512c7f..a920480 100644 --- a/app/views/quickvote/my_quickvotes.rhtml +++ b/app/views/quickvote/my_quickvotes.rhtml @@ -7,13 +7,18 @@ <% @myqvs.each do |quickvote| %>Sorry, the creator of this QuickVote has decided this election shouldn't + be visible while the QuickVote is running.
+<%= link_to "Selectricity Home", :controller => 'site' %> \ No newline at end of file diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 0c44218..9b0b1fe 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -53,7 +53,7 @@ ongoing election, you can log in to vote using your token here.<%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %>
<% if session[:user] %> - <%= render_partial 'user_summary' %> + <%= render :partial => 'user_summary' %> <% else %>You must have an account to start a new vote or to administer an diff --git a/db/create.sql b/db/create.sql index 298b99a..2033ed1 100644 --- a/db/create.sql +++ b/db/create.sql @@ -10,6 +10,8 @@ create table elections ( startdate datetime, enddate datetime NOT NULL, active tinyint NOT NULL DEFAULT 0, + viewable tinyint NOT NULL DEFAULT 1, + notices tinyint NOT NULL DEFAULT 0, user_id int NULL, quickuser varchar(255) NULL, #stores session_id for quickvote creators election_method varchar(100) DEFAULT 'ssd', diff --git a/db/schema.rb b/db/schema.rb index 57e39ac..4ea61b7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -5,9 +5,12 @@ ActiveRecord::Schema.define() do create_table "candidates", :force => true do |t| - t.column "election_id", :integer, :null => false - t.column "name", :string, :limit => 100, :default => "", :null => false - t.column "description", :text + t.column "election_id", :integer, :null => false + t.column "name", :string, :limit => 100, :default => "", :null => false + t.column "description", :text + t.column "picture_filename", :string, :limit => 200 + t.column "picture_data", :binary + t.column "picture_type", :string, :limit => 100 end create_table "elections", :force => true do |t| @@ -17,6 +20,8 @@ ActiveRecord::Schema.define() do t.column "startdate", :datetime t.column "enddate", :datetime, :null => false t.column "active", :integer, :limit => 4, :default => 0, :null => false + t.column "viewable", :integer, :limit => 4, :default => 1, :null => false + t.column "notices", :integer, :limit => 4, :default => 0, :null => false t.column "user_id", :integer t.column "quickuser", :string t.column "election_method", :string, :limit => 100, :default => "ssd" @@ -25,15 +30,6 @@ ActiveRecord::Schema.define() do add_index "elections", ["user_id"], :name => "fk_user_election" - create_table "pictures", :force => true do |t| - t.column "filename", :string, :limit => 200 - t.column "data", :binary - t.column "filetype", :string, :limit => 100 - t.column "candidate_id", :integer - end - - add_index "pictures", ["candidate_id"], :name => "fk_candidate_picture" - create_table "rankings", :force => true do |t| t.column "vote_id", :integer t.column "candidate_id", :integer -- 2.39.5