aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request/_describe_state.rhtml
blob: a91231ae8504398125f3fe3925170c2d4e7330c2 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<% if @is_owning_user %>

    <% form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %>
        <h2>What best describes the status of this request now?</h2>

        <hr> <!------------------------------------------------>

        <% if @info_request.described_state != 'internal_review' %>
            <div>
                <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %>
                <label for="waiting_response<%=id_suffix%>">I'm still <strong>waiting</strong> for my information
                <small>(maybe you got an acknowledgement)</small></label>
            </div>
        <% end %>
        <% if @info_request.described_state == 'internal_review' %>
            <div>
                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>">I'm still <strong>waiting</strong> for the internal review</label>
            </div>
        <% end %>

        <% if @info_request.described_state != 'internal_review' %>
            <div>
                <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %>
                <label for="waiting_clarification<%=id_suffix%>">I've been asked to <strong>clarify</strong> my request</label>
            </div>
        <% end %>

        <% if @update_status && @info_request.described_state != 'internal_review' %>
            <div>
                <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %>
                <label for="internal_review<%=id_suffix%>">I'm waiting for an <strong>internal review</strong> response</label>
            </div>
        <% end %>
        
        <div>
            <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %>
            <label for="gone_postal<%=id_suffix%>">They are going to reply <strong>by post</strong></label>
        </div>

        <hr> <!------------------------------------------------>

        <% if @info_request.described_state == 'internal_review' %>
            <p>The <strong>review has finished</strong> and overall:</p>
        <% end %>

        <div>
            <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %>
            <label for="not_held<%=id_suffix%>">They do <strong>not have</strong> the information <small>(maybe they say who does)</small></label>
        </div>
        <div>
            <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %>
            <label for="partially_successful<%=id_suffix%>">I've received <strong>some of the information</strong> </label>
        </div>
        <div>
            <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %>
            <label for="successful<%=id_suffix%>">I've received <strong>all the information</strong> </label>
        </div>
        <div>
            <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %>
            <label for="rejected<%=id_suffix%>">My request has been <strong>refused</strong></label>
        </div>

        <hr> <!------------------------------------------------>

        <div>
           <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %>
            <label for="error_message<%=id_suffix%>">
            I've received an <strong>error message</strong> 
            </label>
        </div>

        <% if @update_status %>
          <div>
             <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
              <label for="error_message<%=id_suffix%>">
              This request <strong>requires administrator attention</strong> 
              </label>
          </div>
        
          <div>
             <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %>
              <label for="user_withdrawn<%=id_suffix%>">
              I would like to <strong>withdraw this request</strong> 
              </label>
          </div>
        <% end %>
        
        <hr>

        <p>
        <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %>
        <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %>
        <%= submit_tag "Submit status" %> (and we'll suggest <strong>what to do next</strong>)
        </p>
    <% end %>
<% 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
    information or not 
        &ndash;
    if you are
        <%= user_link(@info_request.user) %>,
    please 
        <%= link_to "sign in", signin_url(:r => request.request_uri) %>
    and let everyone know.    
<% end %>