]> projects.mako.cc - selectricity-live/blobdiff - app/views/embed/full_vote.rhtml
made the license clear
[selectricity-live] / app / views / embed / full_vote.rhtml
index 69eed9cc4bb4780d7b043a3c00689225b4a206a9..919b442c34af6fb88a8b3c7235149ac8f56c602a 100644 (file)
@@ -1,29 +1,24 @@
-<div id="header">
+<div id="header" style="background-image:url(<%if @top_bar%>
+                                               <%=url_for @top_bar.public_filename%>)
+                                               <% else %>
+                                               /images/embed_basic_bg.png)
+                                               <% end %>">
 <%= 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" height="<%=(@election.candidates.length + 2)*53 %>px">
 <%= 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" 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 %>
-       <%end%>
        
        
+       <%= render :partial => '/embed/backdrop' %>
        <ul id="rankings-list">
        <ul id="rankings-list">
-               
-               
-               
       <% @voter.vote.rankings.each do |ranking| %>
                <li class="ranking" id="ranking_<%= ranking.candidate.id %>">
                        <img alt="<%= white_list ranking.candidate.name %>"
                  src="<% if ranking.candidate.picture -%>
                       <%= url_for ranking.candidate.picture.public_filename(:thumb) -%>
       <% @voter.vote.rankings.each do |ranking| %>
                <li class="ranking" id="ranking_<%= ranking.candidate.id %>">
                        <img alt="<%= white_list ranking.candidate.name %>"
                  src="<% if ranking.candidate.picture -%>
                       <%= url_for ranking.candidate.picture.public_filename(:thumb) -%>
-                     <%- else -%>
+                                         <% elsif @default_image %>
+                                         <%= url_for @default_image.public_filename %>
+                      <%- else -%>
                      /images/default_icon.png
                      <%- end %>" />
                        <p class="ranking-info">
                      /images/default_icon.png
                      <%- end %>" />
                        <p class="ranking-info">
@@ -36,7 +31,9 @@
        <div style="clear:both;"></div>
        
        <div id="voting-bottom" style="
        <div style="clear:both;"></div>
        
        <div id="voting-bottom" style="
-       <% if @election.candidates.length%2 == 0 %>
+       <% if @bottom_bar %>
+       background-image:url(<%= url_for @bottom_bar.public_filename %>)
+       <% elsif @election.candidates.length%2 == 0 %>
        background-image:url(/images/bottom_dark.png)
        <%else%>
        background-image:url(/images/bottom_light.png)
        background-image:url(/images/bottom_dark.png)
        <%else%>
        background-image:url(/images/bottom_light.png)

Benjamin Mako Hill || Want to submit a patch?