aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--public/stylesheets/main.css10
-rw-r--r--todo.txt4
5 files changed, 48 insertions, 15 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>
diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css
index 4297a17ba..b69849e7b 100644
--- a/public/stylesheets/main.css
+++ b/public/stylesheets/main.css
@@ -581,7 +581,7 @@ div.pagination { text-align: center; padding-top: 0.3em;}
}
/*-------------------- Content : action notice */
-#notice, .describe_state_form
+#notice, .describe_state_form, .undescribed_requests
{
color: #16C132;
font-size: 1.4em;
@@ -592,7 +592,7 @@ div.pagination { text-align: center; padding-top: 0.3em;}
background-color: #D5FFD8;
padding: 0.5em;
}
-.describe_state_form {
+.describe_state_form, .undescribed_requests {
font-weight: normal;
margin-bottom: 1em;
font-size: 1.0em;
@@ -600,10 +600,16 @@ div.pagination { text-align: center; padding-top: 0.3em;}
float: left;
width: 37em;
}
+.undescribed_requests {
+ clear: both;
+}
.requires_admin_details {
margin-left: 1.8em;
width: 35em;
}
+.single_user {
+ clear: left;
+}
/*---------------- content : request detail pages */
diff --git a/todo.txt b/todo.txt
index e68a7254f..d6de59fc4 100644
--- a/todo.txt
+++ b/todo.txt
@@ -11,8 +11,6 @@ Check foi backup
Next
====
-Put name at bottom of request if you are signed in (so don't send them in others names!)
-
Simple initial bulk request prevention (see Tony's mail on this)
This doesn't work:
http://www.whatdotheyknow.com/search/status:waiting_classification/
@@ -21,6 +19,8 @@ Don't let somebody file a new request if they haven't classified all existing on
"can't file while already logged in"?
- and *after* filing get them to go classify existing ones
+Put name at bottom of request if you are signed in (so don't send them in others names!)
+
Maybe move "send followup" into actions?
and make it so you can choose who to send followup to from dropdown
Maybe make it so you need to log in to send follow up (i.e. before)