Created a user "summary/profile page". Also corected several minor typos on election...
[selectricity-live] / app / views / election / show.rhtml
1 <%= render_partial 'progress', 'review' %>
2 <h1>Vote Information</h1>
3
4 <% if @election.active? %>
5   <div id="status">Vote is in currently in progress. Return to
6         this page for results on <%= @election.enddate %>.</div>
7 <% elsif @election.done? %>
8   <div id="status">Election is finished. <%= link_to "View results",
9   :action => 'results', :id => @election.id %>.</div>
10 <% end %>
11
12 <h2>Overview</h2> 
13
14 <p><strong>Summary</strong></p>
15
16 <blockquote>
17 <%= h(@election.name) %>
18 </blockquote>
19
20 <p><strong>Description</strong></p>
21
22 <blockquote>
23 <%= h(@election.description) %>
24 </blockquote>
25
26 <p><strong>End Date</strong></p>
27
28 <blockquote>
29 <%= @election.enddate %>
30 </blockquote>
31
32 <% unless @election.active %>
33 <p><%= link_to "Edit overview.", :action => 'edit', :id => @election.id %></p>
34 <% end %>
35
36 <h2>Candidates</h2> 
37 <% %>
38 <% unless @election.candidates.empty? %>
39   <%= render :partial => 'candidate_list' %>
40   <% unless @election.active %>
41   <p><%= link_to "Add, remove, or edit candidates.", :action => 'edit_candidates', :id => @election.id %></p>
42   <% end %>
43 <% else %>
44   <p><em>There are currently no candidates registered.  <%= link_to "Add some!", :action => 'edit_candidates', :id => @election.id unless @election.active %></em></p>
45
46 <% end %>
47
48 <h2>Voters</h2>
49
50 <% unless @election.voters.empty? %>
51   <%= render :partial => 'voter_list' %>
52   <%= link_to "Add or remove voters.", :action => 'edit_voters', :id => @election.id unless @election.active %></em></p>
53 <% else %>
54   <p><em>There are currently no voters registered.  <%= link_to "Add some!", :action => 'edit_voters', :id => @election.id unless @election.active %></em></p>
55 <% end %>
56
57 <% unless @election.active? %>
58   <h2>Start Election</h2>
59
60   <% if @election.start_blockers.length > 0 %>
61     <p>Your vote cannot be started for the following reasons:</p>
62     <ul>
63     <% for reason in @election.start_blockers %>
64     <li><%= reason %></li>
65     <% end %>
66     </ul>
67   <% else %>
68     <p>Please check everything carefully on this page before starting this
69     vote. Once you begin the vote, you will <em>not</em> be able to add or
70     change candidates, modify the voting lists, or change the end
71     time.</p>
72
73     <p>When you begin the vote, the following will happen:</p>
74
75     <ul>
76     <li>The vote will be "frozen" so that further edits to the
77         candidate list and voting list cannot occur.</li>
78     <li>All voters will be emailed notifying them that the vote has
79         begun and of their unique login token.</li>
80     </ul>
81
82     <%= button_to 'Start Election!', :action => 'start_election', :id => @election.id %>
83   <% end %>
84
85 <% end %>

Benjamin Mako Hill || Want to submit a patch?