aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/request')
-rw-r--r--app/views/request/_after_actions.rhtml2
-rw-r--r--app/views/request/_correspondence.rhtml2
-rw-r--r--app/views/request/_describe_state.rhtml4
-rw-r--r--app/views/request/show.rhtml8
-rw-r--r--app/views/request/show_response.rhtml12
-rw-r--r--app/views/request/upload_response.rhtml67
6 files changed, 52 insertions, 43 deletions
diff --git a/app/views/request/_after_actions.rhtml b/app/views/request/_after_actions.rhtml
index 205b738de..02ed7c849 100644
--- a/app/views/request/_after_actions.rhtml
+++ b/app/views/request/_after_actions.rhtml
@@ -20,7 +20,7 @@
</div>
<div id="owner_actions">
- <strong><%= _('{{info_request_user_name}} only:',:info_request_user_name=>h(@info_request.user.name)) %></strong>
+ <strong><%= _('{{info_request_user_name}} only:',:info_request_user_name=>h(@info_request.user_name)) %></strong>
<ul>
<li>
diff --git a/app/views/request/_correspondence.rhtml b/app/views/request/_correspondence.rhtml
index 9a198ad7d..36257991b 100644
--- a/app/views/request/_correspondence.rhtml
+++ b/app/views/request/_correspondence.rhtml
@@ -33,7 +33,7 @@ elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type)
<div class="outgoing correspondence" id="outgoing-<%=outgoing_message.id.to_s%>">
<h2>
- <%= _("From:") %> <%=h @info_request.user.name %><br>
+ <%= _("From:") %> <%=h @info_request.user_name %><br>
<br><%= simple_date(info_request_event.created_at) %>
</h2>
diff --git a/app/views/request/_describe_state.rhtml b/app/views/request/_describe_state.rhtml
index 71699835c..5b6004e81 100644
--- a/app/views/request/_describe_state.rhtml
+++ b/app/views/request/_describe_state.rhtml
@@ -104,9 +104,11 @@
<% elsif @old_unclassified %>
<%= render :partial => 'other_describe_state', :locals => {:id_suffix => id_suffix } %>
<% else %>
-<%= _('We don\'t know whether the most recent response to this request contains
+ <% if !@info_request.is_external? %>
+ <%= _('We don\'t know whether the most recent response to this request contains
information or not
&ndash;
if you are {{user_link}} please <a href="{{url}}">sign in</a> and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.request_uri)) %>
+ <% end %>
<% end %>
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index 27ad0700e..a7760ab19 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -27,7 +27,7 @@
<div id="left_column">
<h1><%=h(@info_request.title)%></h1>
- <% if @info_request.user.profile_photo %>
+ <% if !@info_request.is_external? && @info_request.user.profile_photo %>
<p class="user_photo_on_request">
<img src="<%= get_profile_photo_url(:url_name => @info_request.user.url_name) %>" alt="">
</p>
@@ -43,7 +43,7 @@
:public_body_link => public_body_link(@info_request.public_body),
:public_body_admin_url => public_body_admin_url(@info_request.public_body)) %>
<% else %>
- <%= _('{{user}} made this {{law_used_full}} request',:user=>user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
+ <%= _('{{user}} made this {{law_used_full}} request',:user=>@info_request.user.nil? ? @info_request.user_name : user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
<%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
<% end %>
</p>
@@ -61,7 +61,7 @@
<%= _('and update the status accordingly. Perhaps <strong>you</strong> might like to help out by doing that?') %>
<% else %>
<%= _('We\'re waiting for') %>
- <%= user_link(@info_request.user) %> <%= _('to read') %>
+ <%= user_link_for_request(@info_request) %> <%= _('to read') %>
<%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %>
<%= _('and update the status.') %>
<% end %>
@@ -104,7 +104,7 @@
<%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>.
<% else %>
<%= _('The request is <strong>waiting for clarification</strong>.') %>
- <%= _('If you are {{user_link}}, please',:user_link=>user_link(@info_request.user)) %>
+ <%= _('If you are {{user_link}}, please',:user_link=>user_link_for_request(@info_request)) %>
<%= link_to _("sign in"), signin_url(:r => request.request_uri) %> <%= _('to send a follow up message.') %>
<% end %>
<% elsif @status == 'gone_postal' %>
diff --git a/app/views/request/show_response.rhtml b/app/views/request/show_response.rhtml
index d8647d1ec..c40b37c3b 100644
--- a/app/views/request/show_response.rhtml
+++ b/app/views/request/show_response.rhtml
@@ -1,9 +1,9 @@
<% if @incoming_message.nil? %>
- <% @title = "Send follow up to '" + h(@info_request.title) + "'" %>
+ <% @title = _("Send follow up to '{{title}}'", :title => h(@info_request.title)) %>
<% elsif @incoming_message.recently_arrived %>
- <% @title = "New response to '" + h(@info_request.title) + "'" %>
+ <% @title = _("New response to '{{title}}'", :title => h(@info_request.title)) %>
<% else %>
- <% @title = "Response to '" + h(@info_request.title) + "'" %>
+ <% @title = _("Response to '{{title}}'", :title => h(@info_request.title)) %>
<% end %>
<%= foi_error_messages_for :incoming_message, :outgoing_message %>
@@ -34,11 +34,11 @@
<%= _('You want to <strong>give your postal address</strong> to the authority in private.') %>
</dt>
<dd>
- <%= _('To do that please send a private email to ') %><%=h(@postal_email_name)%>
+ <%= _('To do that please send a private email to ') %><%=h(@postal_email_name)%>
&lt;<%=link_to h(@postal_email), "mailto:" + @postal_email%>&gt;
<%= _('containing your postal address, and asking them to reply to this request.
Or you could phone them.') %>
-
+
<%= _('When you receive the paper response, please help
others find out what it says:') %>
<ul>
@@ -68,7 +68,7 @@
<h2>Response to <%=h(@info_request.law_used_short)%> request '<%= request_link @info_request %>'</h2>
<% end %>
<% end %>
-
+
<% if @incoming_message.nil? %>
<%= render :partial => 'correspondence', :locals => { :info_request_event => @info_request.get_last_outgoing_event, :incoming_message => nil } %>
<% else %>
diff --git a/app/views/request/upload_response.rhtml b/app/views/request/upload_response.rhtml
index 38c3db268..0de96c5f3 100644
--- a/app/views/request/upload_response.rhtml
+++ b/app/views/request/upload_response.rhtml
@@ -1,45 +1,52 @@
-<% @title = "Respond to the FOI request '" + h(@info_request.title) + "' made by " + h(@info_request.user.name) %>
+<% @title = "Respond to the FOI request '" + h(@info_request.title) + "' made by " + h(@info_request.user_name) %>
-<%= foi_error_messages_for :comment %>
+<% if @info_request.is_external? %>
-<h1><%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %></h1>
+ <h1><%= _('This request was not made via {{site_name}}', :site_name => site_name) %></h1>
+ <p><%= _('Sorry - you cannot respond to this request via {{site_name}}, because this is a copy of the request originally at {{link_to_original_request}}.', :site_name => site_name, :link_to_original_request => link_to(@info_request.external_url, @info_request.external_url)) %></p>
-<p>
- <%= _('Your response will <strong>appear on the Internet</strong>, <a href="%s">read why</a> and answers to other questions.')% [help_officers_path] %>
-</p>
+<% else %>
-<h2><%= _('Respond by email')%></h2>
+ <%= foi_error_messages_for :comment %>
-<p><%= _('You should have received a copy of the request by email, and you can respond
-by <strong>simply replying</strong> to that email. For your convenience, here is the address:')%>
-<a href="mailto:<%=h @info_request.incoming_email%>"><%=h @info_request.incoming_email%></a>.
-<%= _('You may <strong>include attachments</strong>. If you would like to attach a
-file too large for email, use the form below.')%>
-</p>
+ <h1><%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %></h1>
+ <p>
+ <%= _('Your response will <strong>appear on the Internet</strong>, <a href="%s">read why</a> and answers to other questions.')% [help_officers_path] %>
+ </p>
-<h2><%= _('Respond using the web')%></h2>
+ <h2><%= _('Respond by email')%></h2>
-<p><%= _('Enter your response below. You may attach one file (use email, or
-<a href="%s">contact us</a> if you need more).')% [help_contact_path] %></p>
+ <p><%= _('You should have received a copy of the request by email, and you can respond
+ by <strong>simply replying</strong> to that email. For your convenience, here is the address:')%>
+ <a href="mailto:<%=h @info_request.incoming_email%>"><%=h @info_request.incoming_email%></a>.
+ <%= _('You may <strong>include attachments</strong>. If you would like to attach a
+ file too large for email, use the form below.')%>
+ </p>
-<% form_tag '', :id => 'upload_response_form', :multipart => true do %>
- <p>
- <label class="form_label" for="body"><% _('Response:')%></label>
- <%= text_area_tag :body, "", :rows => 10, :cols => 55 %>
- </p>
- <p>
- <label class="form_label" for="file_1"><% _('Attachment (optional):')%></label>
- <%= file_field_tag :file_1, :size => 35 %>
- </p>
+ <h2><%= _('Respond using the web')%></h2>
- <p>
- <%= hidden_field_tag 'submitted_upload_response', 1 %>
- <%= submit_tag "Upload FOI response" %>
- <%= _(' (<strong>patience</strong>, especially for large files, it may take a while!)')%>
- </p>
+ <p><%= _('Enter your response below. You may attach one file (use email, or
+ <a href="%s">contact us</a> if you need more).')% [help_contact_path] %></p>
+ <% form_tag '', :id => 'upload_response_form', :multipart => true do %>
+ <p>
+ <label class="form_label" for="body"><% _('Response:')%></label>
+ <%= text_area_tag :body, "", :rows => 10, :cols => 55 %>
+ </p>
+
+ <p>
+ <label class="form_label" for="file_1"><% _('Attachment (optional):')%></label>
+ <%= file_field_tag :file_1, :size => 35 %>
+ </p>
+
+ <p>
+ <%= hidden_field_tag 'submitted_upload_response', 1 %>
+ <%= submit_tag "Upload FOI response" %>
+ <%= _(' (<strong>patience</strong>, especially for large files, it may take a while!)')%>
+ </p>
+ <% end %>
<% end %>