aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/request')
-rw-r--r--app/views/request/_sidebar.rhtml13
-rw-r--r--app/views/request/_wall_listing.rhtml30
-rw-r--r--app/views/request/show.rhtml12
3 files changed, 52 insertions, 3 deletions
diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml
index 758387b09..bca142fa9 100644
--- a/app/views/request/_sidebar.rhtml
+++ b/app/views/request/_sidebar.rhtml
@@ -1,10 +1,21 @@
<div id="right_column">
+ <div id="follow_box">
<h2><%= _('Follow this request') %></h2>
<% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %>
<p><%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %></p>
<%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>
-
+ </div>
+ <% if @info_request.described_state != "attention_requested" %>
+ <h2><%= _('Offensive? Unsuitable?') %></h2>
+ <% if @info_request.attention_requested %>
+ <p><%= ('The site administrators have reviewed this request and consider it to be suitable for the website.') %></p>
+ <% else %>
+ <p><%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (<a href="/help/about">read more</a>).') %>
+ <p><%= ('If you believe this request is not suitable, you can report it for attention by the site administrators') %></p>
+ <%= link_to _("Report this request"), report_path, :class => "link_button_green" %>
+ <% end %>
+ <% end %>
<h2><%= _("Act on what you've learnt") %></h2>
<div class="act_link">
diff --git a/app/views/request/_wall_listing.rhtml b/app/views/request/_wall_listing.rhtml
new file mode 100644
index 000000000..9cde234c0
--- /dev/null
+++ b/app/views/request/_wall_listing.rhtml
@@ -0,0 +1,30 @@
+<% if @highlight_words.nil?
+ @highlight_words = []
+end %>
+
+<div class="request_listing">
+ <div class="request_left">
+ <div class="requester">
+ <% if event.event_type == 'sent' %>
+ <%= _('A new request, <em><a href="{{request_url}}">{{request_title}}</a></em>, was sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>user_link_absolute(info_request.user),:date=>simple_date(event.created_at),:request_url=>request_url(info_request),:request_title=>info_request.title) %>
+ <% elsif event.event_type == 'followup_sent' %>
+ <%= _('A <a href="{{request_url}}">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>user_link_absolute(info_request.user),:date=>simple_date(event.created_at),:request_url=>outgoing_message_url(event.outgoing_message),:request_title=>info_request.title) %>
+ <% elsif event.event_type == 'response' %>
+ <%= _('A <a href="{{request_url}}">response</a> to <em>{{request_title}}</em> was sent by {{public_body_name}} to {{info_request_user}} on {{date}}. The request status is: {{request_status}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>user_link_absolute(info_request.user),:date=>simple_date(event.created_at),:request_url=>incoming_message_url(event.incoming_message_selective_columns("incoming_messages.id")),:request_title=>info_request.title,:request_status=>info_request.display_status) %>
+ <% elsif event.event_type == 'comment' %>
+ <%= _('An <a href="{{request_url}}">annotation</a> to <em>{{request_title}}</em> was made by {{event_comment_user}} on {{date}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>user_link_absolute(info_request.user),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at),:request_url=>comment_url(event.comment),:request_title=>info_request.title) %>
+ <% else %>
+ <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search?
+ However, it can happen that we see other types of event transiently here in the period
+ between a change being made and the update-xapian-index job being run. %>
+ <!-- Event of type '<%= event.event_type %>', id=<%= event.id %> -->
+ <% end %>
+ </div>
+ </div>
+ <div class="request_right">
+ <span class="desc">
+ <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %>
+ </span>
+ </div>
+</div>
+
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index c5d040fb7..27ad0700e 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -1,4 +1,6 @@
-<% @title = "#{h(@info_request.title)} - a Freedom of Information request to #{h(@info_request.public_body.name)}" %>
+<% @title = _("{{title}} - a Freedom of Information request to {{public_body}}",
+ :title => h(@info_request.title),
+ :public_body => (@info_request.public_body.name)) %>
<% if @info_request.prominence == 'hidden' %>
<p id="hidden_request">
@@ -72,7 +74,7 @@
<%= _('normally') %>
<% end %>
<%= _('no later than') %> <strong><%= simple_date(@info_request.date_response_required_by) %></strong>
- (<%= link_to "details", "/help/requesting#quickly_response" %>).
+ (<%= link_to _("details"), "/help/requesting#quickly_response" %>).
<% elsif @status == 'waiting_response_overdue' %>
<%= _('Response to this request is <strong>delayed</strong>.') %>
<%= _('By law, {{public_body_link}} should normally have responded <strong>promptly</strong> and',:public_body_link=>public_body_link(@info_request.public_body)) %>
@@ -116,6 +118,12 @@
<% elsif @status == 'user_withdrawn' %>
<%= _('This request has been <strong>withdrawn</strong> by the person who made it.
There may be an explanation in the correspondence below.') %>
+ <% elsif @status == 'attention_requested' %>
+ <%= _('This request has been <strong>reported</strong> as needing administrator attention (perhaps because it is vexatious, or a request for personal information)') %>
+ <% elsif @status == 'vexatious' %>
+ <%= _('This request has been <strong>hidden</strong> from the site, because an administrator considers it vexatious') %>
+ <% elsif @status == 'not_foi' %>
+ <%= _('This request has been <strong>hidden</strong> from the site, because an administrator considers it not to be an FOI request') %>
<% else %>
<%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %>
<% end %>