]> projects.mako.cc - selectricity-live/blobdiff - app/views/embed/full_vote.rhtml
added numbering back to embeddables, should count correctly no matter how many candid...
[selectricity-live] / app / views / embed / full_vote.rhtml
index 70a6825283a5fad7993e1e9de25eb462e1de8aa7..89e384ca9d5c1885b6dd8ee2dff5bb56ae81c7fa 100644 (file)
@@ -1,8 +1,22 @@
 <div id="header">
-<img id="header_icon" src="/images/embed_header_icon.png" />
-<h2>Vote Now</h2>
+<%= link_to '<img id="header_icon" src="/images/embed_header_icon.png" />',
+            {:controller => 'front'}, {:target => "_parent"} %><h2>Vote Now</h2>
 </div>
-<div id="voting-box">
+
+<div id="voting-box" height="<%=(@election.candidates.length + 2)*53 %>px">
+       <%@election.candidates.length.times do |count|%>
+               <% if (count%2)==0%>
+                       <img src="/images/widget_dark.png" 
+                       style="position:absolute;top:<%=(count+1)*53%>px;">
+                       <% else %>
+                       <img src="/images/widget_light.png" 
+                       style="position:absolute;top:<%=(count+1)*53%>px">
+               <% end %>
+               <p class="position"
+               style="position:absolute;top:<%=(10+(count+1)*53)%>px;left:10px">
+                       <%=count+1%>
+               </p>
+       <%end%>
        
        <ul id="rankings-list">
       <% @voter.vote.rankings.each do |ranking| %>
        
        <div style="clear:both;"></div>
        
-       <div id="voting-bottom">
+       <div id="voting-bottom" style="
+       <% if @election.candidates.length%2 == 0 %>
+       background-image:url(/images/bottom_dark.png)
+       <%else%>
+       background-image:url(/images/bottom_light.png)
+       <%end%>" >
                <div id="container">
                        <a href="<%= url_for :action => :confirm, :id => @password, :embed => 'true' %>"><h2 id="submit_vote_button">Submit Vote</h2></a>
-                       <p><b>Drag and drop</b> to rank your favorite videos</p>
+                       <p><b>Drag and drop</b> to rank the choices.</p>
                </div>
        </div>
 </div>

Benjamin Mako Hill || Want to submit a patch?