diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/request/_request_listing.rhtml | 21 | ||||
-rw-r--r-- | app/views/request/_sidebar_request_listing.rhtml | 16 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 6 |
3 files changed, 23 insertions, 20 deletions
diff --git a/app/views/request/_request_listing.rhtml b/app/views/request/_request_listing.rhtml index 623ccf535..4c31f470a 100644 --- a/app/views/request/_request_listing.rhtml +++ b/app/views/request/_request_listing.rhtml @@ -1,5 +1,4 @@ <% for info_request in info_requests %> - <% status = info_request.calculate_status %> <p class="request_listing"> <%= request_link(info_request) %> @@ -9,25 +8,7 @@ <span class="request_listing_bottomline"> <strong> - <% if info_request.awaiting_description %> - Awaiting classification. - <% elsif status == 'waiting_response' %> - Awaiting response. - <% elsif status == 'waiting_response_overdue' %> - Response overdue. - <% elsif status == 'partially_successful' %> - Partially successful. - <% elsif status == 'rejected' %> - Rejected. - <% elsif status == 'successful' %> - Successful. - <% elsif status == 'waiting_clarification' %> - Waiting clarification. - <% elsif status == 'requires_admin' %> - Unusual response. - <% else %> - <% raise "unknown status " + status %> - <% end %> + <%= info_request.display_status %> </strong> Requested from <%= public_body_link(info_request.public_body) %> diff --git a/app/views/request/_sidebar_request_listing.rhtml b/app/views/request/_sidebar_request_listing.rhtml new file mode 100644 index 000000000..b18075549 --- /dev/null +++ b/app/views/request/_sidebar_request_listing.rhtml @@ -0,0 +1,16 @@ +<% for info_request in info_requests %> + <p class="request_listing"> + <%= request_link(info_request) %> + + <br> + <%=h excerpt(info_request.initial_request_text, "", 300) %> + <br> + + <span class="request_listing_bottomline"> + <strong> + <%= info_request.display_status %> + </strong> + Requested on <%= simple_date(info_request.created_at) %>. + </span> + </p> +<% end %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index 46dadce89..e98aabb70 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -64,6 +64,12 @@ </div> <div id="request_sidebar"> + <% if @info_requests_same_user_same_body.size > 0 %> + <h2>Some other requests made by + <%= user_link(@info_request.user) %> to <%= public_body_link(@info_request.public_body) %></h2> + <%= render :partial => 'sidebar_request_listing', :locals => { :info_requests => @info_requests_same_user_same_body } %> + <% end %> + <!--<h2>Juicy stuff will be here</h2> <p>For now it is just padding to make the messages on the left narrower, so I can see what the formatting is like. |