aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2008-11-10 20:05:28 +0000
committerfrancis <francis>2008-11-10 20:05:28 +0000
commit4440d2fa2e600f26369096eadb5dccb9615fc20b (patch)
treebbe39b3332584f97d9b6e7bc9ab3801b570535c1
parent4e8a3bf80e1c52e10045c50057d43d29ae1940bc (diff)
Make link on first response arrived email not be login one, as people forward it about.
Make link on later ones go straight to top green box. Give ids to the green boxes.
-rw-r--r--app/models/request_mailer.rb14
-rw-r--r--app/views/request/show.rhtml4
-rw-r--r--spec/models/request_mailer_spec.rb1
-rw-r--r--todo.txt12
4 files changed, 17 insertions, 14 deletions
diff --git a/app/models/request_mailer.rb b/app/models/request_mailer.rb
index 7ed959e48..15d3043a0 100644
--- a/app/models/request_mailer.rb
+++ b/app/models/request_mailer.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: request_mailer.rb,v 1.65 2008-11-07 02:57:56 francis Exp $
+# $Id: request_mailer.rb,v 1.66 2008-11-10 20:05:28 francis Exp $
class RequestMailer < ApplicationMailer
@@ -112,11 +112,9 @@ class RequestMailer < ApplicationMailer
# Tell the requester that a new response has arrived
def new_response(info_request, incoming_message)
- post_redirect = PostRedirect.new(
- :uri => main_url(incoming_message_url(incoming_message)),
- :user_id => info_request.user.id)
- post_redirect.save!
- url = confirm_url(:email_token => post_redirect.email_token)
+ # Don't use login link here, just send actual URL. This is
+ # because people tend to forward these emails amongst themselves.
+ url = main_url(incoming_message_url(incoming_message))
@from = contact_from_name_and_email
@recipients = info_request.user.name_and_email
@@ -143,8 +141,10 @@ class RequestMailer < ApplicationMailer
# Tell the requester that they need to say if the new response
# contains info or not
def new_response_reminder_alert(info_request, incoming_message)
+ # Make a link going to the form to describe state, and which logs the
+ # user in.
post_redirect = PostRedirect.new(
- :uri => main_url(incoming_message_url(incoming_message)),
+ :uri => main_url(request_url(info_request)) + "#describe_state_form_1",
:user_id => info_request.user.id)
post_redirect.save!
url = confirm_url(:email_token => post_redirect.email_token)
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index 24532b2d4..5c4a9bfd2 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -1,7 +1,7 @@
<% @title = h(@info_request.title) %>
<% if @info_request.awaiting_description || @requires_admin_describe %>
- <div class="describe_state_form">
+ <div class="describe_state_form" id="describe_state_form_1">
<%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %>
</div>
<% end %>
@@ -117,7 +117,7 @@
<% end %>
<% if @info_request.awaiting_description %>
- <div class="describe_state_form">
+ <div class="describe_state_form" id="describe_state_form_2">
<%= render :partial => 'describe_state', :locals => { :id_suffix => "2" } %>
</div>
<% end %>
diff --git a/spec/models/request_mailer_spec.rb b/spec/models/request_mailer_spec.rb
index d7baf0719..84d3cad2e 100644
--- a/spec/models/request_mailer_spec.rb
+++ b/spec/models/request_mailer_spec.rb
@@ -16,6 +16,7 @@ describe RequestMailer, " when receiving incoming mail" do
deliveries = ActionMailer::Base.deliveries
deliveries.size.should == 1
+ mail = deliveries[0]
deliveries.clear
end
diff --git a/todo.txt b/todo.txt
index 4cf776119..c5eed1b7c 100644
--- a/todo.txt
+++ b/todo.txt
@@ -29,11 +29,6 @@ Let people change status at any point
Let admin users set things to internal review easily
-Make green box more visible when click reminder email link
-Check new wording in reminder email looks good
-Make the second and third reminder email for new responses go to the green bit
-Remove login link from first email
-
Make it so you definitely don't get alert for the annotation that you just made
The Issue document here doesn't load - need to decect word docs from file content.
@@ -97,9 +92,16 @@ When writing initial request you have to put your name in the letter to sign it,
but it only explains later about anonymous names, Hmmm.
+
Later
=====
+Should probably remove the weekend rule, and be sterner with authorities about
+what "received" means. See thread about staff_numbers_and_costs on team@ ad
+these two requests:
+http://www.whatdotheyknow.com/request/staff_numbers_and_costs
+http://www.whatdotheyknow.com/request/policy_regarding_body_scans#incoming-1100
+
Show similar requests after you have filed yours - maybe on preview too.
Consider putting the request email address in footer? So when