Created a partial to DRY the aja voting method. Modified the voter class to
[selectricity-live] / app / views / site / index.rhtml
1 <div id="voters" class="main-section">
2   <div id="voters-content">
3   <h2>Voters</h2>
4
5   <p>If you have received an email with a token inviting you to vote in
6   an ongoing election, you can log in to vote using your token below.</p>
7
8   <% form_tag(:controller => 'voter', :action => 'index') do %>
9   <p><%= text_field :vote, :password %></p>
10   <p><%= submit_tag "Log In" %></p>
11   <% end %>
12
13   <p><%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %></p>
14
15   <h3>SMS Interface</h3>
16   <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>
17
18   </div>
19 </div>
20
21 <div id="control-room" class="main-section">
22   <div id="control-room-content">
23   <h2>Control Room</h2>
24   <% if session[:user] %>
25     <%= render :partial => 'user_summary' %> 
26   <% else %>
27     
28     <p>You must have an account to start a new vote or to administer an
29     existing vote. You can log in or create a new account below.</p>
30
31     <%= render_partial 'basic_login' %>
32   <% end %>
33
34   </div>
35 </div>
36
37 <div id="quickvotes" class="main-section">
38   <div id="quickvotes-content">
39
40   <h2>QuickVotes</h2>
41   <p><em>QuickVotes</em> are like polls: unstructured, non-anonymous and
42   without the complex features of <em>Selectricity</em>. They are the
43   quickest way to make a decision or to compare between voting
44   methods.</p>
45
46   <ul>
47    <li><%= link_to( "Create a QuickVote", :controller => 'quickvote', :action => 'create') %></li>
48    <li><%= link_to( "My Recent QuickVotes", :controller => 'quickvote', :action => 'my_quickvotes')%></li>
49   </ul>
50
51   <p>Recently created <em>QuickVotes</em> include:</p>
52   <ul>
53   <% for quickvote in @quickvotes %>
54     <li><%= link_to (h(quickvote.shortdesc) || "Unnamed"), quickvote_url(:ident => quickvote.name) %></li>
55   <% end %>
56   </ul>
57
58   </div>
59 </div>
60
61 <!--
62
63 <h2>Selectricity <em>Anywhere</em></h2>
64
65 <p>You can also access Selectricity entirely over email or via SMS/text
66 messages from your mobile phone using Selectricity anywhere. Email <%=
67 link_to "vote\@mako.cc", "mailto:vote@mako.cc" %> with <tt>help</tt> in
68 the body for more information or read the <%= link_to "documentation
69 online", "selectricity-anywhere.html"%>.</p>
70
71 </td>
72
73 <td width="6%"></td>
74
75 <td width="47%" valign="top">
76
77 <h2>Voters</h2>
78
79 <p>If you have received an email with a token inviting you to vote in an
80 ongoing election, you can log in to vote using your token here.</p>
81
82 <%= form_tag :controller => 'voter', :action => 'index' %>
83 <%= text_field :vote, :password %>
84 <%= submit_tag "Log In" %>
85
86
87 <p><%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %></p>
88 <% if session[:user] %>
89   <%= render :partial => 'user_summary' %> 
90 <% else %>
91   <h2>Vote Administrators</h2>
92   <p>You must have an account to start a new vote or to administer an
93   existing vote. You can log in or create a new account below.</p>
94
95   <%= render_partial 'basic_login' %>
96 <% end %>
97 </td>
98 </tr>
99 </table>
100 -->

Benjamin Mako Hill || Want to submit a patch?