diff options
author | francis <francis> | 2008-05-16 18:28:06 +0000 |
---|---|---|
committer | francis <francis> | 2008-05-16 18:28:06 +0000 |
commit | e1e621112a368fa988cccbac7e87a2895289d0cc (patch) | |
tree | 2e70fa57662e933d7e051a5e556d4eefc88e57a1 /app/controllers/admin_track_controller.rb | |
parent | b1e0245a3bf496248aa1991f3e8d1947b3702772 (diff) |
Show tracks in admin interface.
Diffstat (limited to 'app/controllers/admin_track_controller.rb')
-rw-r--r-- | app/controllers/admin_track_controller.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/controllers/admin_track_controller.rb b/app/controllers/admin_track_controller.rb new file mode 100644 index 000000000..fee2911b3 --- /dev/null +++ b/app/controllers/admin_track_controller.rb @@ -0,0 +1,25 @@ +# app/controllers/admin_track_controller.rb: +# Show email alerts / RSS feeds from admin interface. +# +# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. +# Email: francis@mysociety.org; WWW: http://www.mysociety.org/ +# +# $Id: admin_track_controller.rb,v 1.1 2008-05-16 18:28:07 francis Exp $ + +class AdminTrackController < ApplicationController + layout "admin" + before_filter :assign_http_auth_user + + def list + @query = params[:query] + @admin_tracks = TrackThing.paginate :order => "created_at desc", :page => params[:page], :per_page => 100, + :conditions => @query.nil? ? nil : ["track_query ilike '%'||?||'%'", @query ] + end + + def show + @track_thing = TrackThing.find(params[:id]) + end + + private + +end |