added first full working version of embeddable elections
[selectricity-live] / app / views / embed / results.rhtml
diff --git a/app/views/embed/results.rhtml b/app/views/embed/results.rhtml
new file mode 100644 (file)
index 0000000..b9b1eb4
--- /dev/null
@@ -0,0 +1,36 @@
+<div id="header">
+<img id="header_icon" src="/images/embed_header_icon.png" />
+<h2>Current Standings</h2>
+</div>
+<div id="voting-box">
+       
+       <ul id="rankings-list">
+      <% @election.ssd_result.ranked_candidates.flatten.each do |ranking_id| %>
+       <% ranking = @candidates[ranking_id] %>
+               <li class="ranking" id="ranking_<%= ranking.id %>">
+                       <img alt="<%= white_list ranking.name %>"
+                 src="<% if ranking.picture -%>
+                      <%= url_for ranking.picture.public_filename(:thumb) -%>
+                     <%- else -%>
+                     /images/default_icon.png
+                     <%- end %>" />
+                       <p class="ranking-info">
+            <strong><%= white_list ranking.name %></strong><br />
+            <%= white_list ranking.description %></p>
+               </li>
+      <% end %>
+       </ul>
+       
+       <div style="clear:both;"></div>
+       
+       <div id="results-bottom">
+               <div id="container">
+                <a href="<%= votepassword_url :urlpassword => "open." + @voter.election.id.to_s, 'embed' => 'true' %>"><h2>Results</h2></a>
+                       
+            <p>Your vote was recorded correctly.</p>
+
+               </div>
+       </div>
+</div>
+
+

Benjamin Mako Hill || Want to submit a patch?