aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/request')
-rw-r--r--app/views/request/_sidebar.rhtml2
-rw-r--r--app/views/request/_wall_listing.rhtml30
2 files changed, 32 insertions, 0 deletions
diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml
index c0708a36a..bca142fa9 100644
--- a/app/views/request/_sidebar.rhtml
+++ b/app/views/request/_sidebar.rhtml
@@ -1,9 +1,11 @@
<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 %>
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>
+