aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request/details.rhtml
blob: 3cb2f5afedbdda29aa3cc0c3693faead4fd664bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<% @title = _("Details of request '") + h(@info_request.title) + "'" %>
<h1><%= _("Details of request '") + request_link(@info_request) + "'" %></h1>

<h2><%= _('Event history') %></h2>

<p><%= _('This table shows the technical details of the internal events that happened
to this request on {{site_name}}. This could be used to generate information about
the speed with which authorities respond to requests, the number of requests
which require a postal response and much more.', :site_name=>site_name) %>
</p>

<p><%= _('<strong>Caveat emptor!</strong> To use this data in an honourable way, you will need 
a good internal knowledge of user behaviour on {{site_name}}. How, 
why and by whom requests are categorised is not straightforward, and there will
be user error and ambiguity. You will also need to understand FOI law, and the
way authorities use it. Plus you\'ll need to be an elite statistician.  Please
<a href="{{contact_path}}">contact us</a> with questions.', :site_name=>site_name, :contact_path=>help_contact_path) %>
</p>

<% columns = ['id', 'event_type', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %>

<table>
  <tr>
  <% for column in @columns%>
    <th><%= column %></th>
  <% end %>
  <th>link</th>
  </tr>
  
<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %>
  <tr class="<%= cycle('odd', 'even') %>">
  <% for column in @columns %>
    <td>
      <%=h info_request_event.send(column) %>
    </td>
  <% end %>
  <td>
  <% if info_request_event.outgoing_message %>
    <%= link_to "outgoing", outgoing_message_path(info_request_event.outgoing_message) %>
  <% end %>
  <% if info_request_event.incoming_message %>
    <%= link_to "incoming", incoming_message_path(info_request_event.incoming_message) %>
  <% end %>
  </td>
  </tr>
<% end %>
</table>

<p>
<%= _('Here <strong>described</strong> means when a user selected a status for the request, and
the most recent event had its status updated to that value. <strong>calculated</strong> is then inferred by
{{site_name}} for intermediate events, which weren\'t given an explicit
description by a user. See the <a href="{{search_path}}">search tips</a> for description of the states.',
:site_name=>site_name, :search_path=>search_redirect_path) %>
</p>

<p>
<%= _('You can get this page in computer-readable format as part of the main JSON
page for the request.  See the <a href="{{api_path}}">API documentation</a>.', :api_path=>help_api_path) %>
</p>