aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/admin_general_controller.rb7
-rw-r--r--app/controllers/general_controller.rb6
-rw-r--r--app/views/admin_general/admin.coffee (renamed from app/views/general/admin.coffee)0
-rw-r--r--app/views/admin_general/admin.js (renamed from app/views/general/admin.js)0
-rw-r--r--app/views/admin_general/admin_js.erb (renamed from app/views/general/admin_js.erb)0
-rw-r--r--config/routes.rb4
6 files changed, 8 insertions, 9 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb
index 81c34a3b3..800678787 100644
--- a/app/controllers/admin_general_controller.rb
+++ b/app/controllers/admin_general_controller.rb
@@ -5,6 +5,8 @@
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
class AdminGeneralController < AdminController
+ skip_before_filter :authenticate, :only => :admin_js
+
def index
# ensure we have a trailing slash
current_uri = request.env['REQUEST_URI']
@@ -139,5 +141,10 @@ class AdminGeneralController < AdminController
@github_origin = "https://github.com/#{repo}/tree/"
@request_env = request.env
end
+
+ # TODO: Remove this when support for proxy admin interface is removed
+ def admin_js
+ render :layout => false, :content_type => "application/javascript"
+ end
end
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb
index d34f75a72..f6a46458e 100644
--- a/app/controllers/general_controller.rb
+++ b/app/controllers/general_controller.rb
@@ -229,11 +229,5 @@ class GeneralController < ApplicationController
@locale = self.locale_from_params()
render(:layout => false, :content_type => 'text/css')
end
-
- # For merged adminbootstraptheme
- # TODO: Remove this ugly hack
- def admin_js
- render :layout => false, :content_type => "application/javascript"
- end
end
diff --git a/app/views/general/admin.coffee b/app/views/admin_general/admin.coffee
index 407ef3e3d..407ef3e3d 100644
--- a/app/views/general/admin.coffee
+++ b/app/views/admin_general/admin.coffee
diff --git a/app/views/general/admin.js b/app/views/admin_general/admin.js
index c4c44dff0..c4c44dff0 100644
--- a/app/views/general/admin.js
+++ b/app/views/admin_general/admin.js
diff --git a/app/views/general/admin_js.erb b/app/views/admin_general/admin_js.erb
index c4c44dff0..c4c44dff0 100644
--- a/app/views/general/admin_js.erb
+++ b/app/views/admin_general/admin_js.erb
diff --git a/config/routes.rb b/config/routes.rb
index 4e9cbc052..c0e79f2cd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -32,9 +32,6 @@ ActionController::Routing::Routes.draw do |map|
general.advanced_search '/advancedsearch', :action => 'search_redirect', :advanced => true
general.random_request '/random', :action => 'random_request'
-
- # Add a route for admin.js to the general controller
- general.admin_js '/admin/javascripts/admin.js', :action => 'admin_js'
end
map.with_options :controller => 'request' do |request|
@@ -188,6 +185,7 @@ ActionController::Routing::Routes.draw do |map|
admin.admin_timeline '/admin/timeline', :action => 'timeline'
admin.admin_debug '/admin/debug', :action => 'debug'
admin.admin_stats '/admin/stats', :action => 'stats'
+ admin.admin_js '/admin/javascripts/admin.js', :action => 'admin_js'
end
map.with_options :controller => 'admin_request' do |admin|