diff options
Diffstat (limited to 'lib/views/request/_followup.html.erb')
-rw-r--r-- | lib/views/request/_followup.html.erb | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/lib/views/request/_followup.html.erb b/lib/views/request/_followup.html.erb new file mode 100644 index 0000000..4ee6413 --- /dev/null +++ b/lib/views/request/_followup.html.erb @@ -0,0 +1,149 @@ +<div id="followup"> + <% if (incoming_message.nil? || !incoming_message.valid_to_reply_to?) + # TRANSLATORS: This phrase completes the following sentences: + # Request an internal review from... + # Send a public follow up message to... + # Send a public reply to... + # Don't want to address your message 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 {{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 {{person_or_body}}', :person_or_body => name_for_followup) %> + </h2> + <% else %> + <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_path(: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_path(:id => @info_request.id, :incoming_message_id => nil)) %></li> + <% end %> + <% else %> + <li><%= link_to name, show_response_path(:id => @info_request.id, :incoming_message_id => id)%></li> + <% end %> + <% else %> + <li><%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_path(:id => @info_request.id, :incoming_message_id => nil)) %></li> + <% end %> + <% end %> + +<% end %> +</ul> +</div> +<% end %> + <% if @info_request.allow_new_responses_from == 'nobody' %> + + <p><%= + # TRANSLATORS: "Follow ups" in this context means further + # messages sent by the requester to the authority after + # the initial request + _('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 %> + <% if @internal_review %> + <p> + <%= _('If you are dissatisfied by the response you got from + the public authority, you have the right to + complain (<a href="{{url}}">details</a>).', :url => "http://foiwiki.com/foiwiki/index.php/Internal_reviews".html_safe) %> + </p> + <% end %> + + <p> + <%= _('Please <strong>only</strong> write messages directly relating to your request {{request_link}}. If you would like to ask for information that was not in your original request, then <a href="{{new_request_link}}">file a new request</a>.', :request_link=>request_link(@info_request), :new_request_link => new_request_to_body_url(:url_name => @info_request.public_body.url_name)) %> + </p> + + <% status = @info_request.calculate_status %> + <% if status == 'waiting_response_overdue' %> + <p><%= _('The response to your request has been <strong>delayed</strong>. You can say that, + by law, the authority should normally have responded + <strong>promptly</strong> and') %> + <% if @info_request.public_body.is_school? %> + <%= _('in term time') %> + <% end %> + <%= _('by <strong>{{date}}</strong>',:date=>simple_date(@info_request.date_response_required_by)) %> + (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). + </p> + <% elsif status == 'waiting_response_very_overdue' %> + <p> + <%= _('The response to your request is <strong>long overdue</strong>. You can say that, by + law, under all circumstances, the authority should have responded + by now') %> (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). + </p> + <% end %> + + <%= form_for(@outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %> + <p> + <%= o.text_area :body, :rows => 15, :cols => 55 %> + </p> + + <% if @internal_review %> + <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %> + <% else %> + <!-- <h3><%= _('What are you doing?') %></h3> --> + + <% if !@outgoing_message.errors[:what_doing_dummy].nil? %> + <!--<div class="fieldWithErrors"> --> + <div> + <% else %> + <div> + <% end %> + <!-- + <div> + <%= radio_button "outgoing_message", "what_doing", "new_information", :id => "new_information" %> + <label for="new_information"><%= _('I am asking for <strong>new information</strong>') %> </label> + </div> + --> + <!-- + <div> + <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %> + <label for="internal_review"><%= _('I am requesting an <strong>internal review</strong>') %> + <%= link_to _("what's that?"), "/help/unhappy" %> + </label> + </div> + --> + <!-- hiding this form away since its default, + quick hack to remove the feature --> + <div style="display: none"> + <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal", :checked => true %> + <label for="sort_normal"><%= _('<strong>Anything else</strong>, such as clarifying, prompting, thanking') %></label> + </div> + </div> + <% end %> + + <% if @internal_review %> + <p><%= _('Edit and add <strong>more details</strong> to the message above, + explaining why you are dissatisfied with their response.') %> + </p> + <% end %> + + <p> + <%= hidden_field_tag 'submitted_followup', 1 %> + <%= hidden_field_tag(:preview, 1 ) %> + <% if @internal_review_pass_on %> + <%= hidden_field_tag(:internal_review, 1 ) %> + <% end %> + <%= submit_tag _("Preview your message") %> + </p> + <% end %> + + <p> + <% if not @is_owning_user %> + (You will be asked to sign in as <%= user_link(@info_request.user) %>) + <% end %> + </p> + <% end %> + +</div> + |