@@ -20,18 +20,13 class AuthSourcesController < ApplicationController | |||
|
20 | 20 | |
|
21 | 21 | before_filter :require_admin |
|
22 | 22 | |
|
23 | def index | |
|
24 | list | |
|
25 | render :action => 'list' unless request.xhr? | |
|
26 | end | |
|
27 | ||
|
28 | 23 | # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) |
|
29 | 24 | verify :method => :post, :only => [ :destroy, :create, :update ], |
|
30 | 25 | :redirect_to => { :action => :list } |
|
31 | 26 | |
|
32 |
def |
|
|
27 | def index | |
|
33 | 28 | @auth_source_pages, @auth_sources = paginate :auth_sources, :per_page => 10 |
|
34 |
render :action => " |
|
|
29 | render :action => "index", :layout => false if request.xhr? | |
|
35 | 30 | end |
|
36 | 31 | |
|
37 | 32 | def new |
@@ -42,7 +37,7 class AuthSourcesController < ApplicationController | |||
|
42 | 37 | @auth_source = AuthSourceLdap.new(params[:auth_source]) |
|
43 | 38 | if @auth_source.save |
|
44 | 39 | flash[:notice] = l(:notice_successful_create) |
|
45 |
redirect_to :action => ' |
|
|
40 | redirect_to :action => 'index' | |
|
46 | 41 | else |
|
47 | 42 | render :action => 'new' |
|
48 | 43 | end |
@@ -56,7 +51,7 class AuthSourcesController < ApplicationController | |||
|
56 | 51 | @auth_source = AuthSource.find(params[:id]) |
|
57 | 52 | if @auth_source.update_attributes(params[:auth_source]) |
|
58 | 53 | flash[:notice] = l(:notice_successful_update) |
|
59 |
redirect_to :action => ' |
|
|
54 | redirect_to :action => 'index' | |
|
60 | 55 | else |
|
61 | 56 | render :action => 'edit' |
|
62 | 57 | end |
@@ -70,7 +65,7 class AuthSourcesController < ApplicationController | |||
|
70 | 65 | rescue => text |
|
71 | 66 | flash[:error] = "Unable to connect (#{text})" |
|
72 | 67 | end |
|
73 |
redirect_to :action => ' |
|
|
68 | redirect_to :action => 'index' | |
|
74 | 69 | end |
|
75 | 70 | |
|
76 | 71 | def destroy |
@@ -79,6 +74,6 class AuthSourcesController < ApplicationController | |||
|
79 | 74 | @auth_source.destroy |
|
80 | 75 | flash[:notice] = l(:notice_successful_delete) |
|
81 | 76 | end |
|
82 |
redirect_to :action => ' |
|
|
77 | redirect_to :action => 'index' | |
|
83 | 78 | end |
|
84 | 79 | end |
|
1 | NO CONTENT: file renamed from app/views/auth_sources/list.rhtml to app/views/auth_sources/index.html.erb |
@@ -20,7 +20,7 | |||
|
20 | 20 | </div> |
|
21 | 21 | |
|
22 | 22 | <div style="float:right;"> |
|
23 |
<%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => ' |
|
|
23 | <%= link_to l(:label_ldap_authentication), :controller => 'auth_sources', :action => 'index' %> | |
|
24 | 24 | </div> |
|
25 | 25 | |
|
26 | 26 | <%= submit_tag l(:button_save) %> |
General Comments 0
You need to be logged in to leave comments.
Login now