diff options
author | francis <francis> | 2008-03-24 10:40:26 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-24 10:40:26 +0000 |
commit | cd4557441a508e44c747163e24a74450c047cfdb (patch) | |
tree | 182e1ce8aee303475081bafa1781f007d70f5b33 | |
parent | 5dccf065dbff50587d2c235eeac28ed98e87d53e (diff) |
Show requests that have been unclassified for two weeks on admin page
-rw-r--r-- | app/controllers/admin_controller.rb | 3 | ||||
-rw-r--r-- | app/views/admin/index.rhtml | 26 | ||||
-rw-r--r-- | todo.txt | 1 |
3 files changed, 24 insertions, 6 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e3becac38..2844bde29 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: admin_controller.rb,v 1.5 2008-03-17 11:20:12 francis Exp $ +# $Id: admin_controller.rb,v 1.6 2008-03-24 10:40:26 francis Exp $ class AdminController < ApplicationController layout "admin" @@ -18,6 +18,7 @@ class AdminController < ApplicationController # Tasks to do @requires_admin_requests = InfoRequest.find(:all, :conditions => ["described_state = 'requires_admin'"]) @blank_contacts = PublicBody.find(:all, :conditions => ["request_email = ''"]) + @two_week_old_unclassified = InfoRequest.find(:all, :conditions => [ "awaiting_description and info_requests.updated_at < ?", Time.now() - 2.weeks ]) # Recent events @events_title = "Events in last week" diff --git a/app/views/admin/index.rhtml b/app/views/admin/index.rhtml index 116d38500..cf5e9aff4 100644 --- a/app/views/admin/index.rhtml +++ b/app/views/admin/index.rhtml @@ -8,18 +8,30 @@ <li><%=@user_count%> users</li> </ul> +<hr> + <% if @requires_admin_requests.size > 0 %> - <h2>Requests requiring admin attention</h2> + <h3>Requests requiring admin attention</h3> + + <ul> + <% for @request in @requires_admin_requests %> + <li><%= link_to h(@request.title), "request/show/" + @request.id.to_s %></li> + <% end %> + </ul> +<% end %> + +<% if @two_week_old_unclassified.size > 0 %> + <h3>Still unclassified two weeks after response</h3> <ul> - <% for @requires_admin_request in @requires_admin_requests %> - <li><%= link_to h(@requires_admin_request.title), main_url(request_url(@requires_admin_request)) %></li> + <% for @request in @two_week_old_unclassified %> + <li><%= link_to h(@request.title), "request/show/" + @request.id.to_s %></li> <% end %> </ul> <% end %> <% if @blank_contacts.size > 0 %> - <h2>Public bodies with missing contact details</h2> + <h3>Public bodies with missing contact details</h3> <ul> <% for @blank_contact in @blank_contacts %> <li><%= link_to h(@blank_contact.name), "body/show/" + @blank_contact.id.to_s %></li> @@ -27,6 +39,12 @@ </ul> <% end %> +<% if @requires_admin_requests.size == 0 and @two_week_old_unclassified.size == 0 and @blank_contacts.size == 0 %> + No pending administration required. +<% end %> + +<hr> + <h2><%=h @events_title%></h2> <p><a href="?">Week</a> @@ -27,7 +27,6 @@ BAILII - relationship with law courts, robots.txt ? Next ==== -Send email to tell admins something isn't classified Send email to remind people to clarify Search and replace text "FOI" and "Freedom of Information" out the way more |