diff options
-rw-r--r-- | app/controllers/admin_controller.rb | 10 | ||||
-rw-r--r-- | app/views/admin/timeline.rhtml | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index a7b2f244f..67cd5fac8 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.13 2008-04-17 10:38:38 francis Exp $ +# $Id: admin_controller.rb,v 1.14 2008-04-18 15:11:13 francis Exp $ class AdminController < ApplicationController layout "admin" @@ -25,8 +25,12 @@ class AdminController < ApplicationController def timeline # Recent events - @events_title = "Events in last week" - date_back_to = Time.now - 1.week + @events_title = "Events in last two days" + date_back_to = Time.now - 2.days + if params[:week] + @events_title = "Events in last week" + date_back_to = Time.now - 1.week + end if params[:month] @events_title = "Events in last month" date_back_to = Time.now - 1.month diff --git a/app/views/admin/timeline.rhtml b/app/views/admin/timeline.rhtml index 4ae3f5018..cf5b3762e 100644 --- a/app/views/admin/timeline.rhtml +++ b/app/views/admin/timeline.rhtml @@ -2,7 +2,9 @@ <h1><%=h @events_title%></h1> -<p><a href="?">Week</a> +<p> +<a href="?">Two days</a> +| <a href="?week=1">Week</a> | <a href="?month=1">Month</a> | <a href="?all=1">All time</a></p> |