From c12af3c5c33e1eebb24a173323fa1ed4b7e30255 Mon Sep 17 00:00:00 2001 From: gorm Date: Mon, 25 May 2015 17:58:00 +0200 Subject: Turn off the internal_review feature - Doesnt make sense in Norway, or not sure what sense it makes --- lib/views/request/_followup.html.erb | 146 +++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 lib/views/request/_followup.html.erb (limited to 'lib') diff --git a/lib/views/request/_followup.html.erb b/lib/views/request/_followup.html.erb new file mode 100644 index 0000000..f2f9806 --- /dev/null +++ b/lib/views/request/_followup.html.erb @@ -0,0 +1,146 @@ +
+ <% 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 %> +

<%= _('Request an internal review from {{person_or_body}}', :person_or_body => name_for_followup) %> +

+ <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %> +

<%= _('Send a public follow up message to {{person_or_body}}', :person_or_body => name_for_followup) %> +

+ <% else %> +

<%= _('Send a public reply to {{person_or_body}}', :person_or_body => name_for_followup) %> +

+ <% end %> +<% if @info_request.who_can_followup_to(incoming_message).count > 0 %> +
+ <%= _("Don't want to address your message to {{person_or_body}}? You can also write to:", :person_or_body => name_for_followup) %> +
    +<% @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? %> +
  • <%= 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)) %>
  • + <% else %> + <% if !id.nil? %> + <% if @info_request.public_body.request_email == email %> + <% if !incoming_message.nil? %> +
  • <%= 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)) %>
  • + <% end %> + <% else %> +
  • <%= link_to name, show_response_path(:id => @info_request.id, :incoming_message_id => id)%>
  • + <% end %> + <% else %> +
  • <%= 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)) %>
  • + <% end %> + <% end %> + +<% end %> +
+
+<% end %> + <% if @info_request.allow_new_responses_from == 'nobody' %> + +

<%= + # 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 contact us if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %>

+ <% else %> + <% if @internal_review %> +

+ <%= _('If you are dissatisfied by the response you got from + the public authority, you have the right to + complain (details).', :url => "http://foiwiki.com/foiwiki/index.php/Internal_reviews".html_safe) %> +

+ <% end %> + +

+ <%= _('Please only 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 file a new request.', :request_link=>request_link(@info_request), :new_request_link => new_request_to_body_url(:url_name => @info_request.public_body.url_name)) %> +

+ + <% status = @info_request.calculate_status %> + <% if status == 'waiting_response_overdue' %> +

<%= _('The response to your request has been delayed. You can say that, + by law, the authority should normally have responded + promptly and') %> + <% if @info_request.public_body.is_school? %> + <%= _('in term time') %> + <% end %> + <%= _('by {{date}}',:date=>simple_date(@info_request.date_response_required_by)) %> + (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). +

+ <% elsif status == 'waiting_response_very_overdue' %> +

+ <%= _('The response to your request is long overdue. You can say that, by + law, under all circumstances, the authority should have responded + by now') %> (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). +

+ <% 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| %> +

+ <%= o.text_area :body, :rows => 15, :cols => 55 %> +

+ + <% if @internal_review %> + <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %> + <% else %> + + + <% if !@outgoing_message.errors[:what_doing_dummy].nil? %> +
+ <% else %> +
+ <% end %> + + +
+ <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal", :checked => true %> + +
+
+ <% end %> + + <% if @internal_review %> +

<%= _('Edit and add more details to the message above, + explaining why you are dissatisfied with their response.') %> +

+ <% end %> + +

+ <%= 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") %> +

+ <% end %> + +

+ <% if not @is_owning_user %> + (You will be asked to sign in as <%= user_link(@info_request.user) %>) + <% end %> +

+ <% end %> + +
+ -- cgit v1.2.3