diff options
Diffstat (limited to 'app/views/request/_followup.rhtml')
-rw-r--r-- | app/views/request/_followup.rhtml | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml index a15f2912d..4de2ce853 100644 --- a/app/views/request/_followup.rhtml +++ b/app/views/request/_followup.rhtml @@ -1,17 +1,47 @@ +<style> + p.event_actions { + display: none; + } +</style> <div id="followup"> - + <% if (incoming_message.nil? || !incoming_message.valid_to_reply_to?) + name_for_followup = _("the main FOI contact at {{public_body}}", :public_body => h(OutgoingMailer.name_for_followup(@info_request, nil))) + else + name_for_followup = h(OutgoingMailer.name_for_followup(@info_request, incoming_message)) + end %> <% if @internal_review %> - <h1><%= _('Request an internal review from') %> <%=h OutgoingMailer.name_for_followup(@info_request, nil) %> + <h1><%= _('Request an internal review from {{person_or_body}}', :person_or_body => name_for_followup) %> </h1> <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %> - <h2><%= _('Send a public follow up message to') %> <%=h OutgoingMailer.name_for_followup(@info_request, nil) %> + <h2><%= _('Send a public follow up message to {{person_or_body}}', :person_or_body => name_for_followup) %> </h2> <% else %> - <h2><%= _('Send a public reply to') %> - <%=h OutgoingMailer.name_for_followup(@info_request, incoming_message) %> + <h2><%= _('Send a public reply to {{person_or_body}}', :person_or_body => name_for_followup) %> </h2> <% end %> +<% if @info_request.who_can_followup_to(incoming_message).count > 0 %> +<div id="other_recipients"> + <%= _("Don't want to address your message to {{person_or_body}}? You can also write to:", :person_or_body => name_for_followup) %> + <ul> +<% @info_request.who_can_followup_to(incoming_message).each do |name, email, id| %> + <% if id.nil? && !incoming_message.nil? && incoming_message.valid_to_reply_to? %> + <li><%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %></li> + <% else %> + <% if !id.nil? %> + <% if @info_request.public_body.request_email == email %> + <% if !incoming_message.nil? %> + <li><%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %></li> + <% end %> + <% else %> + <li><%= link_to name, show_response_url(:id => @info_request.id, :incoming_message_id => id)%></li> + <% end %> + <% end %> + <% end %> +<% end %> +</ul> +</div> +<% end %> <% if @info_request.allow_new_responses_from == 'nobody' %> <p><%= _('Follow ups and new responses to this request have been stopped to prevent spam. Please <a href="{{url}}">contact us</a> if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %></p> <% else %> |