aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJody McIntyre <scjody@modernduck.com>2014-09-17 15:37:22 -0400
committerLouise Crow <louise.crow@gmail.com>2015-04-27 16:49:52 +0100
commit6a695ee68e002c47eb39d205e69b2e539be933bc (patch)
tree9346c61abc9dea8e8c94a51273a71c282b49c3ad /app/views
parent4b04aa47335edbe7ce9e64bd939da9fd8623eff0 (diff)
Add controller for non-logged in "voting"
Diffstat (limited to 'app/views')
-rw-r--r--app/views/request/widget.html.erb18
1 files changed, 13 insertions, 5 deletions
diff --git a/app/views/request/widget.html.erb b/app/views/request/widget.html.erb
index a196f40de..462170400 100644
--- a/app/views/request/widget.html.erb
+++ b/app/views/request/widget.html.erb
@@ -68,11 +68,19 @@
</div>
</a>
<% else %>
- <a href="<%= url_for do_track_path(@track_thing) %>" target="_blank">
- <div id="alawidget-button">
- <%= _('I also want to know!') %>
- </div>
- </a>
+ <% if @user %>
+ <a href="<%= url_for do_track_path(@track_thing) %>" target="_blank">
+ <div id="alawidget-button">
+ <%= _('I also want to know!') %>
+ </div>
+ </a>
+ <% else %>
+ <a href="<%= url_for :controller => 'track', :action => 'widget_vote', :info_request_id => @info_request %>" target="_blank">
+ <div id="alawidget-button">
+ <%= _('I also want to know!') %>
+ </div>
+ </a>
+ <% end %>
<% end %>
</div>
</div>