First major stab at the integration of Courtland's CSS into
[selectricity] / app / views / site / index.rhtml
index b005cb5ccd109facebb79bf52beb65542eefc7ec..bb74bba558278331eb15c27b640e9121bd016cf9 100644 (file)
@@ -1,18 +1,79 @@
-<% %>
+<div id="voters" class="main-section">
+  <div id="voters-content">
+  <h2>Voters</h2>
 
-<table width="auto" padding="5px">
-<tr>
-<td width="47%" valign="top">
+  <p>If you have received an email with a token inviting you to vote in
+  an ongoing election, you can log in to vote using your token below.</p>
+
+  <%= form_tag :controller => 'voter', :action => 'index' %>
+  <p><%= text_field :vote, :password %></p>
+  <p><%= submit_tag "Log In" %></p>
+  <%= end_form_tag %>
+
+  <p><%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %></p>
+
+  <h3>SMS Interface</h3>
+  <p>For information on accessing Selectricity over email or via SMS/text messages from your mobile phone, email <%= link_to "vote\@mako.cc", "mailto:vote@mako.cc" %> with "help" in the body or read the <%= link_to "Selectricity Anywhere documentation", "selectricity-anywhere.html"%>.</p>
+
+  </div>
+</div>
+
+<div id="control-room" class="main-section">
+  <div id="control-room-content">
+  <h2>Control Room</h2>
+
+  <% if session[:user] %>
+    <%= render :partial => 'user_summary' %> 
+  <% else %>
+    
+    <p>You must have an account to start a new vote or to administer an
+    existing vote. You can log in or create a new account below.</p>
+
+    <%= render_partial 'basic_login' %>
+  <% end %>
+
+  </div>
+</div>
+
+<div id="quickvotes" class="main-section">
+  <div id="quickvotes-content">
+
+  <h2>QuickVotes</h2>
+  <p><em>QuickVotes</em> are like polls: unstructured, non-anonymous and
+  without the complex features of <em>Selectricity</em>. They are the
+  quickest way to make a decision or to compare between voting
+  methods.</p>
+
+  <ul>
+   <li><%= link_to( "Create a QuickVote", :controller => 'quickvote', :action => 'create') %></li>
+   <li><%= link_to( "Recent QuickVotes", :controller => 'quickvote', :action => 'my_quickvotes')%></li>
+  </ul>
+
+  <p>Recently created <em>QuickVotes</em> include:</p>
+  <ul>
+  <% for quickvote in @quickvotes %>
+    <li><%= link_to (h(quickvote.shortdesc) || "Unnamed"), quickvote_url(:ident => quickvote.name) %></li>
+  <% end %>
+  </ul>
+
+  </div>
+</div>
 
-<h2>QuickVotes</h2>
+<!--
 
-<p><em>QuickVotes</em> are unstructured votes, more like polls, without
-the voter verifiability, anonymity, and other more complex features of
-HyperChad. They are the quickest way to make a decision using a variety
-of preferential and non-preficial election methods, or to compare
-between methods.</p>
+<h2>Selectricity <em>Anywhere</em></h2>
 
-<p><%= link_to "Create QuickVote.", :controller => 'quickvote', :action => 'create' %></p>
+<p>You can also access Selectricity entirely over email or via SMS/text
+messages from your mobile phone using Selectricity anywhere. Email <%=
+link_to "vote\@mako.cc", "mailto:vote@mako.cc" %> with <tt>help</tt> in
+the body for more information or read the <%= link_to "documentation
+online", "selectricity-anywhere.html"%>.</p>
+
+</td>
+
+<td width="6%"></td>
+
+<td width="47%" valign="top">
 
 <h2>Voters</h2>
 
@@ -22,20 +83,14 @@ ongoing election, you can log in to vote using your token here.</p>
 <%= form_tag :controller => 'voter', :action => 'index' %>
 <%= text_field :vote, :password %>
 <%= submit_tag "Log In" %>
-<%= end_form_tag %>
 
-<p><%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %></p>
-</td>
-
-<td width="6%"></td>
-
-<td width="47%" valign="top">
 
+<p><%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %></p>
 <% if session[:user] %>
-  <%= render_partial 'user_summary' %> 
+  <%= render :partial => 'user_summary' %> 
 <% else %>
-  <h2>Election Administrators</h2>
-  <p>You must have an account to start a new election or to administer an
+  <h2>Vote Administrators</h2>
+  <p>You must have an account to start a new vote or to administer an
   existing vote. You can log in or create a new account below.</p>
 
   <%= render_partial 'basic_login' %>
@@ -43,3 +98,4 @@ ongoing election, you can log in to vote using your token here.</p>
 </td>
 </tr>
 </table>
+-->

Benjamin Mako Hill || Want to submit a patch?