diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/request/_correspondence.rhtml | 5 | ||||
-rw-r--r-- | app/views/request/_followup.rhtml | 20 | ||||
-rw-r--r-- | app/views/request/show_response.rhtml | 18 | ||||
-rw-r--r-- | app/views/request_mailer/overdue_alert.rhtml | 13 |
4 files changed, 43 insertions, 13 deletions
diff --git a/app/views/request/_correspondence.rhtml b/app/views/request/_correspondence.rhtml index d8b8887a8..336f909e2 100644 --- a/app/views/request/_correspondence.rhtml +++ b/app/views/request/_correspondence.rhtml @@ -45,7 +45,7 @@ <% elsif outgoing_message.message_type == 'followup' %> <% if outgoing_message.status == 'sent' %> wrote to - <% if !outgoing_message.incoming_message_followup.safe_mail_from.nil? %> + <% if !outgoing_message.incoming_message_followup.nil? && !outgoing_message.incoming_message_followup.safe_mail_from.nil? %> <%= outgoing_message.incoming_message_followup.safe_mail_from %> of <% end %> <%= public_body_link(@info_request.public_body) %> @@ -56,7 +56,8 @@ <% end %> <% else raise "unknown outgoing_message.message_type" %> <% end %> - </p> + (<%= link_to "send follow up", show_response_no_followup_url(:id => outgoing_message.info_request.id, :incoming_message_id => nil) + "#show_response_followup" %>) + </p> <% elsif info_request_event.event_type == 'resent' %> <p class="event_plain"> Sent to <%= public_body_link(@info_request.public_body) %> diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml index 3f6f5322d..a84da3214 100644 --- a/app/views/request/_followup.rhtml +++ b/app/views/request/_followup.rhtml @@ -1,13 +1,19 @@ <div id="followup"> - <h2>Send a follow up message - <% if !incoming_message.safe_mail_from.nil? %> - to <%= incoming_message.safe_mail_from %> - <% end %> - </h2> + <% if incoming_message.nil? %> + <h2>Send a follow up message + to '<%=h @info_request.public_body.name %>' + </h2> + <% else %> + <h2>Send a follow up message + <% if !incoming_message.safe_mail_from.nil? %> + to <%= incoming_message.safe_mail_from %> + <% end %> + </h2> + <% end %> - <p>Use this if the public body has asked for clarification of - your request.</p> + <p>Use this to tell the public body something, such as to clarify + your request, or if they are late responding.</p> <% form_for(:outgoing_message, @outgoing_message) do |o| %> <p> diff --git a/app/views/request/show_response.rhtml b/app/views/request/show_response.rhtml index 461639046..77d03214d 100644 --- a/app/views/request/show_response.rhtml +++ b/app/views/request/show_response.rhtml @@ -1,4 +1,6 @@ -<% if @incoming_message.recently_arrived %> +<% if @incoming_message.nil? %> + <% @title = "Send follow up to '" + h(@info_request.title) + "'" %> +<% elsif @incoming_message.recently_arrived %> <% @title = "New response to '" + h(@info_request.title) + "'" %> <% else %> <% @title = "Response to '" + h(@info_request.title) + "'" %> @@ -8,20 +10,28 @@ <div id="show_response_view"> <% if @is_owning_user %> - <% if @incoming_message.recently_arrived %> + <% if @incoming_message.nil? %> + <h2>Your last message sent for request '<%= request_link @info_request %>'</h2> + <% elsif @incoming_message.recently_arrived %> <h2>New response to your request '<%= request_link @info_request %>'</h2> <% else %> <h2>Response to your request '<%= request_link @info_request %>'</h2> <% end %> <% else %> - <% if @incoming_message.recently_arrived %> + <% if @incoming_message.nil? %> + <h2>Last message sent for FOI request '<%= request_link @info_request %>'</h2> + <% elsif @incoming_message.recently_arrived %> <h2>New response to FOI request '<%= request_link @info_request %>'</h2> <% else %> <h2>Response to FOI request '<%= request_link @info_request %>'</h2> <% end %> <% end %> - <%= render :partial => 'correspondence', :locals => { :info_request_event => nil, :incoming_message => @incoming_message } %> + <% if @incoming_message.nil? %> + <%= render :partial => 'correspondence', :locals => { :info_request_event => @info_request.get_last_outgoing_event, :incoming_message => nil } %> + <% else %> + <%= render :partial => 'correspondence', :locals => { :info_request_event => nil, :incoming_message => @incoming_message } %> + <% end %> <div id="show_response_followup"> <%= render :partial => 'followup', :locals => { :incoming_message => @incoming_message } %> diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.rhtml new file mode 100644 index 000000000..2a0847220 --- /dev/null +++ b/app/views/request_mailer/overdue_alert.rhtml @@ -0,0 +1,13 @@ +<%= @info_request.public_body.name %> are late. + +They have not replied to your FOI request '<%= @info_request.title %>' within +the 20 working days they are allowed by law. + +Click on the link below to send a message to <%= @info_request.public_body.name +%> reminding them to reply to your request. + +<%=@url%> + +-- the foi.mysociety.org team + + |