aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-06-29 12:42:46 +0100
committerGareth Rees <gareth@mysociety.org>2015-06-29 12:42:46 +0100
commit6b038291717c8afd8d1125bee644a92f81feb13c (patch)
tree6d71d9c4498e1f97edef0c5d2ae2af2e9f3df955
parent3e9bc1a54ada31474a6bed10d38b95cd277d3712 (diff)
Show already tracking confirmation
If a WidgetVote exists for the user’s widget_vote cookie, show them that they have already voted for the request. Use the link to the track path so that a TrackThing gets created if they sign up/sign in.
-rw-r--r--app/views/widgets/show.html.erb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/widgets/show.html.erb b/app/views/widgets/show.html.erb
index 07c7b1908..44437cc9c 100644
--- a/app/views/widgets/show.html.erb
+++ b/app/views/widgets/show.html.erb
@@ -30,6 +30,12 @@
<%= _('You are tracking this request') %>
</div>
</a>
+ <% elsif @tracking_cookie %>
+ <%= link_to track_request_url(:url_title => @info_request.url_title, :feed => 'track') do %>
+ <div class="alaveteli-widget__button alaveteli-widget__button--down">
+ <%= _('You are tracking this request') %>
+ </div>
+ <% end %>
<% else %>
<% if @user %>
<a href="<%= url_for do_track_path(@track_thing) %>" target="_blank">