diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/request/_classify.rhtml | 15 | ||||
-rw-r--r-- | app/views/request/_correspondence.rhtml | 10 | ||||
-rw-r--r-- | app/views/request/classify.rhtml | 15 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 22 |
4 files changed, 39 insertions, 23 deletions
diff --git a/app/views/request/_classify.rhtml b/app/views/request/_classify.rhtml new file mode 100644 index 000000000..cf27d734c --- /dev/null +++ b/app/views/request/_classify.rhtml @@ -0,0 +1,15 @@ +<% form_for(:incoming_message, @info_request ) do |f| %> + <h2>Got what you wanted?</h2> + <p>Does this response contain any of the information that you requested?</p> + <p> + <%= radio_button "incoming_message", "contains_information", "true" %> + <label for="incoming_message_contains_information_true">Yes, this response contains some or all of the information that I requested.</label> + <br> + <%= radio_button "incoming_message", "contains_information", "false" %> + <label for="incoming_message_contains_information_false">No, this response does not contain any of the information.</label> + </p> + + <%= submit_tag "Update" %> + +<% end %> + diff --git a/app/views/request/_correspondence.rhtml b/app/views/request/_correspondence.rhtml index 80f92c50a..ea7ca4e6c 100644 --- a/app/views/request/_correspondence.rhtml +++ b/app/views/request/_correspondence.rhtml @@ -28,8 +28,16 @@ <%= incoming_message.mail.friendly_from %> of <% end %> <%= public_body_link(@info_request.public_body) %> - wrote a reply on <strong><%= simple_date(incoming_message.sent_at) + <% if incoming_message.contains_information %> + sent some <strong>useful information</strong> + <% else %> + replied + <% end %> + on <strong><%= simple_date(incoming_message.sent_at) %></strong> + <% if not incoming_message.user_classified %> + — please <%= link_to "classify this response", classify_request_url(:incoming_message_id => incoming_message.id) %> + <% end %> </p> <% else %> <% raise "Unknown correspondence type " + correspondence.class.to_s %> diff --git a/app/views/request/classify.rhtml b/app/views/request/classify.rhtml index c6ce42d14..15789858e 100644 --- a/app/views/request/classify.rhtml +++ b/app/views/request/classify.rhtml @@ -10,20 +10,7 @@ <% if not @incoming_message.user_classified %> <div id="classify_action"> - <% form_for(:incoming_message, @info_request ) do |f| %> - <h2>Got what you wanted?</h2> - <p>Does this response contain any of the information that you requested?</p> - <p> - <%= radio_button "incoming_message", "contains_information", "true" %> - <label for="incoming_message_contains_information_true">Yes, this response contains some or all of the information that I requested.</label> - <br> - <%= radio_button "incoming_message", "contains_information", "false" %> - <label for="incoming_message_contains_information_false">No, this response does not contain any of the information.</label> - </p> - - <%= submit_tag "Update" %> - - <% end %> + <%= render :partial => 'classify' %> <div> <% end %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index 83e183c81..99ba55d11 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -11,18 +11,24 @@ <p id="request_status"> <% if @status == 'awaiting' %> - Currently <strong>waiting for a response</strong> from <%= public_body_link(@info_request.public_body) %> + Currently <strong>waiting for a response</strong> from <%= public_body_link(@info_request.public_body) %> <% elsif @status == 'overdue' %> - Currently <strong>overdue a response</strong> from <%= - public_body_link(@info_request.public_body) %>. Under section blah of the - Freedom of Information Act 2000 responses must be made within 20 working days. + Currently <strong>overdue a response</strong> from <%= + public_body_link(@info_request.public_body) %>. Under section blah of the + Freedom of Information Act 2000 responses must be made within 20 working days. <% elsif @status == 'information' %> - The request was at least partly <strong>successful</strong>. + The request was at least partly <strong>successful</strong>. <% elsif @status == 'none' %> - The request is <strong>not (yet) successful</strong>. + The request is <strong>not (yet) successful</strong>. <% elsif @status == 'unknown' %> - <strong>Response received</strong>, but <%= user_link(@info_request.user) %> has not yet reported if it was - successful or a rejection. + <strong><%= MySociety::Format.fancy_pluralize(@info_request.incoming_messages.size, 'Response', 'responses') %> + received</strong>, + but <%= user_link(@info_request.user) %> has not yet reported whether + <%= @info_request.incoming_messages.size == 1 ? 'it' : 'they' %> + contained useful information or not. + + If you are <%= user_link(@info_request.user) %>, please classify them below. + <!-- This will be useful here too: @info_request.unclassified_responses --> <% else %> <% raise "unknown status " + $status %> <% end %> |