aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/request/_after_actions.rhtml28
-rw-r--r--app/views/request/_describe_state.rhtml34
-rw-r--r--app/views/request/_sidebar.rhtml36
-rw-r--r--app/views/request/show.rhtml67
4 files changed, 93 insertions, 72 deletions
diff --git a/app/views/request/_after_actions.rhtml b/app/views/request/_after_actions.rhtml
new file mode 100644
index 000000000..aa6411453
--- /dev/null
+++ b/app/views/request/_after_actions.rhtml
@@ -0,0 +1,28 @@
+<div id="after_actions">
+
+ <h2>Things to do with this request</h2>
+
+ <div id="anyone_actions">
+ <%= link_to "Add an annotation", new_comment_url(:url_title => @info_request.url_title) %> (to help
+ the requester or others)
+ </div>
+
+ <div id="owner_actions">
+ <strong><%=h @info_request.user.name %> only:</strong>
+ <% if @last_response.nil? %>
+ <%= link_to "Send follow up to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %>
+ <% else %>
+ <%= link_to "Reply to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %>
+ <% end %>
+ |
+ <%= link_to "Update the status of this request", request_url(@info_request, :update_status => 1) %>
+ |
+ <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>
+ </div>
+
+ <div id="public_body_actions">
+ <strong><%=h @info_request.public_body.name %> only:</strong>
+ <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %>
+ </div>
+
+</div> \ No newline at end of file
diff --git a/app/views/request/_describe_state.rhtml b/app/views/request/_describe_state.rhtml
index d6e24c453..8b3ac2cf3 100644
--- a/app/views/request/_describe_state.rhtml
+++ b/app/views/request/_describe_state.rhtml
@@ -1,4 +1,5 @@
-<% if @is_owning_user || @requires_admin_describe %>
+<% 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>
@@ -25,6 +26,13 @@
</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>
@@ -61,14 +69,22 @@
I've received an <strong>error message</strong>
</label>
</div>
-<!-- <div>
- <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %>
- <label for="requires_admin<%=id_suffix%>">
- <strong>None</strong> of the above
- </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>
diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml
new file mode 100644
index 000000000..0cb9207d8
--- /dev/null
+++ b/app/views/request/_sidebar.rhtml
@@ -0,0 +1,36 @@
+<div id="request_sidebar">
+ <h2>Track this request</h2>
+ <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>
+
+ <h2>Act on what you've learnt</h2>
+ <div class="act_link">
+ <%= link_to '<img src="/images/writetothem.png" alt="" class="rss">', "http://www.writetothem.com"%>
+ <%= link_to 'Write to your politician', "http://www.writetothem.com"%>
+ </div>
+ <div class="act_link">
+ <%= link_to '<img src="/images/pledgebank.png" alt="" class="rss">', "http://www.pledgebank.com"%>
+ <%= link_to 'Pledge with others', "http://www.pledgebank.com"%>
+ </div>
+ <div class="act_link">
+ <%= link_to '<img src="/images/petitions.png" alt="" class="rss">', "http://petitions.number10.gov.uk"%>
+ <%= link_to 'Petition the PM', "http://petitions.number10.gov.uk"%>
+ </div>
+ <div class="act_link">
+ <%= link_to '<img src="/images/wordpress.png" alt="" class="rss">', "http://wordpress.com/"%>
+ <%= link_to 'Start your own blog', "http://wordpress.com/"%>
+ </div>
+
+ <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>
+ <h2>Similar requests</h2>
+ <% for result in @xapian_similar.results %>
+ <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
+ <% end %>
+ <% if @xapian_similar_more %>
+ <p><%= link_to "More similar requests", request_similar_url(@info_request) %></p>
+ <% end %>
+ <!-- Important terms: <%= @xapian_similar.important_terms.join(" ") %> -->
+ <% end %>
+
+ <p><a href="/help/about#commercial">Are you the owner of
+ any commercial copyright on this page?</a></p>
+</div> \ No newline at end of file
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index b86b92800..fa9c8f4a7 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -1,48 +1,12 @@
<% @title = h(@info_request.title) %>
-<% if @info_request.awaiting_description || @requires_admin_describe %>
+<% if @update_status || @info_request.awaiting_description %>
<div class="describe_state_form" id="describe_state_form_1">
<%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %>
</div>
<% end %>
-<div id="request_sidebar">
- <h2>Track this request</h2>
- <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>
-
- <h2>Act on what you've learnt</h2>
- <div class="act_link">
- <%= link_to '<img src="/images/writetothem.png" alt="" class="rss">', "http://www.writetothem.com"%>
- <%= link_to 'Write to your politician', "http://www.writetothem.com"%>
- </div>
- <div class="act_link">
- <%= link_to '<img src="/images/pledgebank.png" alt="" class="rss">', "http://www.pledgebank.com"%>
- <%= link_to 'Pledge with others', "http://www.pledgebank.com"%>
- </div>
- <div class="act_link">
- <%= link_to '<img src="/images/petitions.png" alt="" class="rss">', "http://petitions.number10.gov.uk"%>
- <%= link_to 'Petition the PM', "http://petitions.number10.gov.uk"%>
- </div>
- <div class="act_link">
- <%= link_to '<img src="/images/wordpress.png" alt="" class="rss">', "http://wordpress.com/"%>
- <%= link_to 'Start your own blog', "http://wordpress.com/"%>
- </div>
-
- <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>
- <h2>Similar requests</h2>
- <% for result in @xapian_similar.results %>
- <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
- <% end %>
- <% if @xapian_similar_more %>
- <p><%= link_to "More similar requests", request_similar_url(@info_request) %></p>
- <% end %>
- <!-- Important terms: <%= @xapian_similar.important_terms.join(" ") %> -->
- <% end %>
-
- <p><a href="/help/about#commercial">Are you the owner of
- any commercial copyright on this page?</a></p>
-</div>
-
+<%= render :partial => 'sidebar' %>
<div id="request_main">
<h1><%=@title%></h1>
@@ -98,7 +62,7 @@
<% if @is_owning_user %>
<%=h @info_request.public_body.name %> is <strong>waiting for your clarification</strong>.
Please
- <%= link_to "send a follow up message", show_response_url(:id => @info_request.id, :incoming_message_id => @info_request.get_last_response.id) + "#followup" %>.
+ <%= 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
@@ -133,29 +97,6 @@
</div>
<% end %>
- <div id="after_actions">
- <h2>Things to do with this request</h2>
-
- <p>
- <%= link_to "Add an annotation", new_comment_url(:url_title => @info_request.url_title) %> (to help
- the requester or others)
- </p>
-
- <p>
- <strong><%=h @info_request.user.name %> only:</strong>
- <% if @last_response.nil? %>
- <%= link_to "Send follow up to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %>
- <% else %>
- <%= link_to "Reply to " + RequestMailer.name_for_followup(@info_request, @last_response), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %>
- <% end %>
- |
- <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>
-
- <br>
-
- <strong><%=h @info_request.public_body.name %> only:</strong>
- <%= link_to "Respond to request", upload_response_url(:url_title => @info_request.url_title) %>
- </p>
- </div>
+ <%= render :partial => 'after_actions' %>
</div>