diff --git a/app/controllers/auth_sources_controller.rb b/app/controllers/auth_sources_controller.rb index 0f5fba1410b3fb35a9517b872df2c72850e468a2..eaedb5ba3cff9951c59e9bdbdc05bc3710b87763 100644 --- a/app/controllers/auth_sources_controller.rb +++ b/app/controllers/auth_sources_controller.rb @@ -20,18 +20,13 @@ class AuthSourcesController < ApplicationController before_filter :require_admin - def index - list - render :action => 'list' unless request.xhr? - end - # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destroy, :create, :update ], :redirect_to => { :action => :list } - def list + def index @auth_source_pages, @auth_sources = paginate :auth_sources, :per_page => 10 - render :action => "list", :layout => false if request.xhr? + render :action => "index", :layout => false if request.xhr? end def new @@ -42,7 +37,7 @@ class AuthSourcesController < ApplicationController @auth_source = AuthSourceLdap.new(params[:auth_source]) if @auth_source.save flash[:notice] = l(:notice_successful_create) - redirect_to :action => 'list' + redirect_to :action => 'index' else render :action => 'new' end @@ -56,7 +51,7 @@ class AuthSourcesController < ApplicationController @auth_source = AuthSource.find(params[:id]) if @auth_source.update_attributes(params[:auth_source]) flash[:notice] = l(:notice_successful_update) - redirect_to :action => 'list' + redirect_to :action => 'index' else render :action => 'edit' end @@ -70,7 +65,7 @@ class AuthSourcesController < ApplicationController rescue => text flash[:error] = "Unable to connect (#{text})" end - redirect_to :action => 'list' + redirect_to :action => 'index' end def destroy @@ -79,6 +74,6 @@ class AuthSourcesController < ApplicationController @auth_source.destroy flash[:notice] = l(:notice_successful_delete) end - redirect_to :action => 'list' + redirect_to :action => 'index' end end diff --git a/app/views/auth_sources/list.rhtml b/app/views/auth_sources/index.html.erb similarity index 100% rename from app/views/auth_sources/list.rhtml rename to app/views/auth_sources/index.html.erb diff --git a/app/views/settings/_authentication.rhtml b/app/views/settings/_authentication.rhtml index eb51ee9f6afa8d1db5edc0680d49d4247b1057ea..81814bba334cb28ff2e13a56983d8459ff48dc63 100644 --- a/app/views/settings/_authentication.rhtml +++ b/app/views/settings/_authentication.rhtml @@ -20,7 +20,7 @@ </div> <div style="float:right;"> - <%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => 'list' %> + <%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => 'index' %> </div> <%= submit_tag l(:button_save) %>