aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/user_controller.rb7
-rw-r--r--app/views/track/_tracking_links.rhtml14
-rw-r--r--app/views/user/show.rhtml28
3 files changed, 38 insertions, 11 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index a50a21bca..e69b47c29 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user_controller.rb,v 1.59 2008-09-14 01:47:47 francis Exp $
+# $Id: user_controller.rb,v 1.60 2008-09-21 23:53:50 francis Exp $
class UserController < ApplicationController
# Show page about a user
@@ -43,6 +43,11 @@ class UserController < ApplicationController
@track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily'], :order => 'created_at desc')
@track_things_grouped = @track_things.group_by(&:track_type_description)
end
+
+ # Requests you need to describe
+ if @is_you
+ @undescribed_requests = @display_user.get_undescribed_requests
+ end
end
# Login form
diff --git a/app/views/track/_tracking_links.rhtml b/app/views/track/_tracking_links.rhtml
index c026ea407..c078d6db7 100644
--- a/app/views/track/_tracking_links.rhtml
+++ b/app/views/track/_tracking_links.rhtml
@@ -8,12 +8,14 @@
<% if own_request %>
<p>This is your own request, so you will be automatically emailed when new responses arrive.</p>
<% elsif existing_track %>
- <% form_tag({:controller => 'track', :action => 'update', :track_id => existing_track.id}, :class => "feed_form_" + location) do %>
- <%= track_thing.params[:verb_on_page_already] %>
- <%= hidden_field_tag 'track_medium', "delete" %>
- <%= hidden_field_tag 'r', request.request_uri %>
- <%= submit_tag "unsubscribe" %>
- <% end %>
+ <% form_tag({:controller => 'track', :action => 'update', :track_id => existing_track.id}, :class => "feed_form_" + location) do %>
+ <p>
+ <%= track_thing.params[:verb_on_page_already] %>
+ <%= hidden_field_tag 'track_medium', "delete" %>
+ <%= hidden_field_tag 'r', request.request_uri %>
+ <%= submit_tag "unsubscribe" %>
+ </p>
+ <% end %>
<% else %>
<div class="feed_link feed_link_<%=location%>">
<%= link_to '<img src="/images/email-16.png" alt="">', do_track_url(track_thing) %>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 4e756b614..f21a9d0d5 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -7,6 +7,24 @@
<% end %>
<% end%>
+<% if @is_you && @undescribed_requests.size > 0 %>
+ <div class="undescribed_requests">
+ <p>Please <strong>go to the following requests</strong>, and let us
+ know if there was information in the recent responses to them.</p>
+ <ul>
+ <% for undescribed_request in @undescribed_requests %>
+ <li><%=request_link(undescribed_request)%></li>
+ <% end %>
+ </ul>
+ <p>
+ Thanks very much - this will help others find useful stuff. We'll
+ also, if you need it, give advice on what to do next about your
+ requests.
+ </p>
+ </div>
+<% end %>
+
+
<div id="request_sidebar">
<h2>Track this person</h2>
<%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
@@ -50,10 +68,12 @@
<% for track_thing in track_things %>
<li>
<% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %>
- <%= track_thing.params[:list_description] %>
- <%= hidden_field_tag 'track_medium', "delete" %>
- <%= hidden_field_tag 'r', request.request_uri %>
- <%= submit_tag "unsubscribe" %>
+ <div>
+ <%= track_thing.params[:list_description] %>
+ <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
+ <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
+ <%= submit_tag "unsubscribe" %>
+ </div>
<% end %>
<!-- (<%= link_to "view latest updates", :controller => 'general', :action => 'search', :query => track_thing.track_query %>) -->
</li>