X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/c65b1e11059c5cf510b54c785d4a246215058f70..80ba04e050870cc01835cb1cc93bfd6645efcecd:/app/views/election/show.rhtml diff --git a/app/views/election/show.rhtml b/app/views/election/show.rhtml index 0051861..fe522aa 100644 --- a/app/views/election/show.rhtml +++ b/app/views/election/show.rhtml @@ -1,5 +1,7 @@ -<% %> -

Vote Information

+
+ Election Overview + +
<% if @election.active? %>
Vote is in currently in progress. Return to @@ -7,10 +9,13 @@ <% elsif @election.done? %>
Election is finished. <%= link_to "View results", :action => 'results', :id => @election.id %>.
+<% else %> +

+ <%= link_to "Edit General Information", + :action => 'edit_general_information', :id => @election.id %> +

<% end %> -

Overview

-

Summary

@@ -23,39 +28,71 @@ <%= h(@election.description) %>
-

End Date

+

Additional Information

-
-<%= @election.enddate %> -
+ -<% unless @election.candidates.empty? %> - <%= render :partial => 'candidate_list' %> - <% unless @election.active %> -

<%= link_to "Add, remove, or edit candidates.", :action => 'edit_candidates', :id => @election.id %>

- <% end %> -<% else %> -

There are currently no candidates registered. <%= link_to "Add some!", :action => 'edit_candidates', :id => @election.id unless @election.active %>

+
+ Candidates + +
+ + +<% if not (@election.active? or @election.done?) %> +

+ <%= link_to "Edit Candidates", + :action => 'edit_candidates', :id => @election.id %>

<% end %> -

Voters

-<% unless @election.voters.empty? %> - <%= render :partial => 'voter_list' %> - <%= link_to "Add or remove voters.", :action => 'edit_voters', :id => @election.id unless @election.active %>

+<% if @election.candidates.empty? %> +

There are currently no candidates registered. + <%= link_to "Add some!", :action => 'edit_candidates', :id => @election.id %> +

<% else %> -

There are currently no voters registered. <%= link_to "Add some!", :action => 'edit_voters', :id => @election.id unless @election.active %>

+ <%= render :partial => 'candidate_list' %> <% end %> -<% unless @election.active %> -

Start Election

+
+ Voters + +
+ +<% if not (@election.active? or @election.done?) %> +

+ <%= link_to "Change Voters/Options", + :action => 'edit_voters', :id => @election.id %>

+<% end %> + +<% if not @election.authenticated? %> +

This election is open the public.

+<% elsif @election.voters.empty? %> +

There are currently no voters registered. + <%= link_to "Add some!", :action => 'edit_voters', + :id => @election.id %>

+<% else %> + <%= render :partial => 'voter_list' %> +

<%= link_to "Add or remove voters.", :action => 'edit_voters', + :id => @election.id unless @election.active? or @election.done? %> +

+<% end %> + +<% if not (@election.active? or @election.done?) %> + +
+ Start Election + +
<% if @election.start_blockers.length > 0 %>

Your vote cannot be started for the following reasons:

@@ -65,7 +102,7 @@ <% end %> <% else %> -

Please check eveything carefully on this page before starting this +

Please check everything carefully on this page before starting this vote. Once you begin the vote, you will not be able to add or change candidates, modify the voting lists, or change the end time.

@@ -75,11 +112,27 @@ <%= button_to 'Start Election!', :action => 'start_election', :id => @election.id %> <% end %> +<% elsif @election.embeddable? %> + +
+ Embedding + +
+ + +

To embed your election, copy and paste the following code into your +homepage:

+ +
<%= h("") %>
+ <% end %>