added support for results for full elections
[selectricity] / app / views / common / _result_box.rhtml
diff --git a/app/views/common/_result_box.rhtml b/app/views/common/_result_box.rhtml
new file mode 100644 (file)
index 0000000..528885d
--- /dev/null
@@ -0,0 +1,19 @@
+<div id="<%= method %>_result" class="resultbox"<%= ' style="display: none;"' unless @election.election_method == method %>>
+<div class="normal-header">
+  <span class="header"><%= ELECTION_TYPES[method]%> </span>
+  <span class="subheader">
+  <% if @election.election_method == method %>
+    Selected Method
+  <% else %>
+    Alternative Method 
+  <% end %></span>
+</div>
+
+<% unless @election.election_method == method -%>
+<%= render :partial => 'common/result', :object => @results[method]%>
+<% end -%>
+<%= render :partial => 'common/methodinfo_' + method,
+           :object => @results[method] %>
+
+</div>
+

Benjamin Mako Hill || Want to submit a patch?