Mostly worked on the candidate adding feature to include pictures and
[selectricity] / app / views / election / show.rhtml
index 954e480e4b9b2ac1c35340d135805483f5beb29e..f389059d72436e9539c391860d6e6f18b8674bfb 100644 (file)
@@ -1,18 +1,38 @@
 <% %>
 <h1>Information On <%= @election.name %></h1>
 
-<h2>Overview <%= link_to "edit", :action => 'edit', :id => @election.id %></h2> 
-
+<h2>Election Overview</h2> 
 <p><strong>Description</strong></p>
 
 <blockquote>
-<%= @election.description %>
+<%= h(@election.description) %>
 </blockquote>
 
-<h2>Candidates <%= link_to "edit", :action => 'edit_candidates', :id => @election.id %></h2> 
+<p><strong>Election End Date</strong></p>
+
+<blockquote>
+<%= @election.enddate %>
+</blockquote>
+
+<p><%= link_to "Edit election overview.", :action => 'edit', :id => @election.id %></p>
+
+<h2>Candidates</h2> 
+
+<% unless @election.candidates.empty? %>
+  <%= render :partial => 'candidate_list' %>
+  <p><%= link_to "Add, remove, or edit candidates.", :action => 'edit_candidates', :id => @election.id %></p>
+<% else %>
+  <p><em>There are currently no candidates registered for this election.
+  <%= link_to "Add some!", :action => 'edit_candidates', :id => @election.id %></em></p>
 
-<%= render :partial => 'candidate_list' %>
+<% end %>
 
-<h2>Voters <%= link_to "edit", :action => 'edit_voters', :id => @election.id %></h2>
+<h2>Voters</h2>
 
-<%= render :partial => 'voter_list' %>
+<% unless @election.voters.empty? %>
+  <%= render :partial => 'voter_list' %>
+<% else %>
+  <p><em>There are currently no voters registered for this election.
+  <%= link_to "Add some!", :action => 'edit_voters', :id => @election.id %></em></p>
+<% end %>

Benjamin Mako Hill || Want to submit a patch?