diff options
author | francis <francis> | 2008-09-22 13:57:44 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-22 13:57:44 +0000 |
commit | d9c37e5617235cfa4524f4493d4786d2b10ff8ca (patch) | |
tree | a29a332ebf9d32830a43b3c7a80fd092203e3bf2 | |
parent | 59a3b540f4b59a16c1fdb38c5f5f2192e9ebc786 (diff) |
Call follow ups replies again when they are replies.
Use better wording from Matthew for links for replies.
Add reply/follow up to last message as action in list of actions at bottom.
-rw-r--r-- | app/controllers/request_controller.rb | 5 | ||||
-rw-r--r-- | app/views/request/_correspondence.rhtml | 2 | ||||
-rw-r--r-- | app/views/request/_followup.rhtml | 2 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 7 |
4 files changed, 13 insertions, 3 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 9317c60e8..e38e733cc 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_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: request_controller.rb,v 1.111 2008-09-22 03:06:43 francis Exp $ +# $Id: request_controller.rb,v 1.112 2008-09-22 13:57:44 francis Exp $ class RequestController < ApplicationController @@ -39,6 +39,9 @@ class RequestController < ApplicationController # Track corresponding to this page @track_thing = TrackThing.create_track_for_request(@info_request) @feed_autodetect = [ { :url => do_track_url(@track_thing, 'feed'), :title => @track_thing.params[:title_in_rss] } ] + + # For send followup link at bottom + @last_response = @info_request.get_last_response end # Requests similar to this one diff --git a/app/views/request/_correspondence.rhtml b/app/views/request/_correspondence.rhtml index b2cec58f3..8679ce9ca 100644 --- a/app/views/request/_correspondence.rhtml +++ b/app/views/request/_correspondence.rhtml @@ -37,7 +37,7 @@ if not incoming_message.nil? <p class="event_actions"> <%= link_to "Link to this", incoming_message_url(incoming_message) %> | - <%= link_to "Send follow up", show_response_url(:id => incoming_message.info_request.id, :incoming_message_id => incoming_message.id) + "#followup" %> + <%= link_to "Reply to this message", show_response_url(:id => incoming_message.info_request.id, :incoming_message_id => incoming_message.id) + "#followup" %> </p> </div> <% diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml index bc6f85603..19150e93f 100644 --- a/app/views/request/_followup.rhtml +++ b/app/views/request/_followup.rhtml @@ -5,7 +5,7 @@ to '<%=h @info_request.public_body.name %>' </h2> <% else %> - <h2>Send a follow up message + <h2>Send a reply <% if !incoming_message.safe_mail_from.nil? %> to <%= incoming_message.safe_mail_from %> <% end %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index cab82f1b5..c244fabcc 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -112,6 +112,13 @@ <%= link_to "Add an annotation", new_comment_url(:url_title => @info_request.url_title) %> (to help the requester or others) <br> + <% if @last_response.nil? %> + <%= link_to "Send follow up to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %> + <% else %> + <%= link_to "Reply to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %> + <% end %> + (<%=h @info_request.user.name %> only) + <br> <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %> (FOI officers only) </div> |