aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2008-07-14 12:07:56 +0000
committerfrancis <francis>2008-07-14 12:07:56 +0000
commitd6beb5721cb2a11d495db8335236b6d82a26efd6 (patch)
treeae09a7be08a4d472cdeab6ad47b304cd4a72a34d
parenta54139b140f0674d7450c57b37c6a9cfe0382719 (diff)
Now we remind after 1 week, only put in admin after 10 days
-rw-r--r--app/controllers/admin_controller.rb4
-rw-r--r--app/views/admin/index.rhtml8
2 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 148853168..15bdf2cd8 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.17 2008-07-08 09:41:04 francis Exp $
+# $Id: admin_controller.rb,v 1.18 2008-07-14 12:07:56 francis Exp $
class AdminController < ApplicationController
layout "admin"
@@ -21,7 +21,7 @@ class AdminController < ApplicationController
last_event_time_clause = '(select created_at from info_request_events where info_request_events.info_request_id = info_requests.id order by created_at desc limit 1)'
@requires_admin_requests = InfoRequest.find(:all, :select => '*, ' + last_event_time_clause + ' as last_event_time', :conditions => ["described_state = 'requires_admin'"], :order => "last_event_time")
@blank_contacts = PublicBody.find(:all, :conditions => ["request_email = ''"], :order => "updated_at")
- @one_week_old_unclassified = InfoRequest.find(:all, :select => '*, ' + last_event_time_clause + ' as last_event_time', :conditions => [ "awaiting_description and " + last_event_time_clause + " < ? and prominence != 'backpage'", Time.now() - 1.weeks ], :order => "last_event_time")
+ @ten_days_old_unclassified = InfoRequest.find(:all, :select => '*, ' + last_event_time_clause + ' as last_event_time', :conditions => [ "awaiting_description and " + last_event_time_clause + " < ? and prominence != 'backpage'", Time.now() - 10.days ], :order => "last_event_time")
@holding_pen_messages = InfoRequest.holding_pen_request.incoming_messages
end
diff --git a/app/views/admin/index.rhtml b/app/views/admin/index.rhtml
index 4fee48736..5dd999e44 100644
--- a/app/views/admin/index.rhtml
+++ b/app/views/admin/index.rhtml
@@ -27,11 +27,11 @@
<% end %>
-<% if @one_week_old_unclassified.size > 0 %>
- <h3>Classify responses that are still unclassified one week after response (<%=@one_week_old_unclassified.size%> total)</h3>
+<% if @ten_days_old_unclassified.size > 0 %>
+ <h3>Classify responses that are still unclassified ten days after response (<%=@ten_days_old_unclassified.size%> total)</h3>
<ul>
- <% for @request in @one_week_old_unclassified %>
+ <% for @request in @ten_days_old_unclassified %>
<li>
<%= link_to h(@request.title), "request/show/" + @request.id.to_s %>
(<%=simple_date(@request.get_last_event.created_at)%>)
@@ -65,7 +65,7 @@
</ul>
<% end %>
-<% if @requires_admin_requests.size == 0 and @one_week_old_unclassified.size == 0 and @blank_contacts.size == 0 %>
+<% if @requires_admin_requests.size == 0 and @ten_days_old_unclassified.size == 0 and @blank_contacts.size == 0 %>
<p>No pending administration required.</p>
<% end %>