]> projects.mako.cc - selectricity/blobdiff - app/views/quickvote/create.rhtml
The results page should now work for scaling embeddableelections as well.
[selectricity] / app / views / quickvote / create.rhtml
index b1b6004ec7a75d60b76244a58f74138cf63576d2..eecb4fb8ca4f44bb6e0d65142a0efd24e00f243d 100644 (file)
@@ -1,34 +1,8 @@
-<div id="voters-title">
-       <span class="header">Title</span>
-       <span class="subheader">Subtitle</span>
-       <div style="clear:both;"></div>
-</div>
-
-<div id="controlroom-title">
-       <span class="header">Title</span>
-       <span class="subheader">Subtitle</span>
-       <div style="clear:both;"></div>
-</div>
-
-<div id="quickvote-title">
+<div id="title-header">
        <span class="header">Quickvote</span>
        <span class="header">Quickvote</span>
-       <span class="subheader"></span>
-       <div style="clear:both;"></div>
+       <span class="subheader">Create New QuickVote</span>
 </div>
 
 </div>
 
-<%= error_messages_for 'quickvote' %>
-
-<span class="header">Header</span>
-<span class="subheader">Subheader</span>
-<div style="clear:both;"></div>
-
-<span class="header">Header</span>
-<span class="subheader"></span>
-<div style="clear:both;"></div>
-
-<span class="header">Header</span>
-<div style="clear:both;"></div>
-
 <p><label for="quickvote_candidate_names">Choices</p>
 
 <!-- the list of candidates -->
 <p><label for="quickvote_candidate_names">Choices</p>
 
 <!-- the list of candidates -->
 
 <% form_tag(:action => 'create') do %>
 <!--[form:election]-->
 
 <% form_tag(:action => 'create') do %>
 <!--[form:election]-->
-
 <p><label for="quickvote_name">One Word Description (for URL)</label></p>
 
 <p><label for="quickvote_name">One Word Description (for URL)</label></p>
 
-<p><em><font size="-1">required; 5-12 characters; only letters and numbers; no spaces</font></em></p>
+<p>required; 5-12 characters; only letters and numbers; no spaces</p>
 
 <p><%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12  %></p>
 
 <p><label for="quickvote_description">Description</label></p>
 
 
 <p><%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12  %></p>
 
 <p><label for="quickvote_description">Description</label></p>
 
-<p><font size="-1">required; one line summary on the first line</font></em><br/>
-
-<%= text_area 'quickvote', 'description', :cols => 50, :rows => 4 %></p>
+<p><font size="-1">required; free-form</font></em><br/>
 
 
-<%= check_box('options', 'advanced', 
-    :onclick => 'Element.toggle($("advanced")); false;' )%>Advanced
+<%= text_field 'quickvote', 'description', :size => 50 %></p>
 
 <div id="advanced" style="display: none">
 
 <div id="advanced" style="display: none">
-<%= render :partial => 'advanced', :locals => {:quickvote => @quickvote} %>
-</div>
-<br />
+  <div class="normal-header">
+    <span class="header">Advanced Options</span>
+    <span class="subheader"></span>
+  </div>
+  <div class="clear-div"></div>
 
 
-<p><%= submit_tag "Create Quickvote" -%></p>
+  <% fields_for 'quickvote', @quickvote do |quickform| %>
 
 
-<% end %>
+    <p><label for="quickvote_election_method">Election Method</label></p>
+
+<!--
+<% type_hash = {}; ELECTION_TYPES.each {|k,v| type_hash[v] = k} %>
+<%= select_tag 'election_election_method', options_for_select(type_hash, @quickvote.election_method) %></p>
+-->
+    <p><%= quickform.select('election_method', 
+        %w(ssd condorcet plurality approval borda) ) %></p>
+
+    <p><label for="quickvote_enddate">End Time</label></p>
+    <p><%= quickform.date_select(:enddate, :start_year => Time.now.year) %></p>
+
+    <p><label for="quickvote_visibility">Visibility</label></p>
+
+    <p>Do you want the results to be visible while the election is active?</p>
+
+    <p>Yes <%= quickform.radio_button(:viewable, 1)%>
+       No  <%= quickform.radio_button(:viewable, 0)%></p>
+
+    <% if session[:user] %>
+      <p>Notification</p>
 
 
+      <p>Would you like to be e-mailed when this QuickVote concludes?</p>
 
 
+      <p>Yes <%= quickform.radio_button(:notices, 1)%>
+         No  <%= quickform.radio_button(:notices, 0)%></p>
+    <% end -%>
 
 
+  <% end %>
 
 
+</div>
+<br />
+
+<p><%= submit_tag "Create Quickvote" -%></p>
+
+<% end %>
 
 

Benjamin Mako Hill || Want to submit a patch?