ref: refs/heads/master
commit 03db80fbe33d9b8ef47e9d06f520b1c84b59cc8e
Author: Martin Kudlvasr
Date: Wed Nov 11 18:19:28 2009 +0100
fix bnc#554452 Basic setup workflow starts with an error message
So now basesystem goes directly to the first module.
---
.../app/controllers/controlpanel_controller.rb | 15 ++++-----------
.../test/functional/basesystem_controller_test.rb | 4 +---
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/webclient/app/controllers/controlpanel_controller.rb b/webclient/app/controllers/controlpanel_controller.rb
index b4cfc23..bb88a63 100644
--- a/webclient/app/controllers/controlpanel_controller.rb
+++ b/webclient/app/controllers/controlpanel_controller.rb
@@ -81,11 +81,9 @@ class ControlpanelController < ApplicationController
steps = session[:wizard_steps].split ","
if session[:wizard_current] != steps.first
session[:wizard_current] = steps[steps.index(session[:wizard_current])-1]
- redirect_to get_redirect_hash(session[:wizard_current])
- else
- #back from first module return to basesystem screen
- redirect_to :action => :basesystem
+ # no else, "Back" from first module redirects to first module again
end
+ redirect_to get_redirect_hash(session[:wizard_current])
end
# when triggered by button/link from basesystem, shows current module from session
@@ -93,11 +91,6 @@ class ControlpanelController < ApplicationController
redirect_to get_redirect_hash(session[:wizard_current])
end
- # display some message, that setup is not completed and that by clicking button
- # you start setting up the system
- def basesystem
- end
-
protected
# reads the shortcuts and returns the
@@ -146,7 +139,7 @@ class ControlpanelController < ApplicationController
# session variable is used to find out, if basic system module is needed
return false if session[:wizard_current] == FINAL_STEP
# basic system setup in progress => redirect to current module
- redirect_to :action => :basesystem
+ redirect_to get_redirect_hash(session[:wizard_current])
return true
else
proxy = YaST::ServiceResource.proxy_for 'org.opensuse.yast.modules.basesystem'
@@ -164,7 +157,7 @@ class ControlpanelController < ApplicationController
decoded_steps = basesystem.steps.collect { |step| step.action ? "#{step.controller}:#{step.action}" : "#{step.controller}" }
session[:wizard_steps] = decoded_steps.join(",")
session[:wizard_current] = decoded_steps.first
- redirect_to :action => :basesystem
+ redirect_to get_redirect_hash(session[:wizard_current])
return true
end
end
diff --git a/webclient/test/functional/basesystem_controller_test.rb b/webclient/test/functional/basesystem_controller_test.rb
index 45f74a9..8d52c45 100644
--- a/webclient/test/functional/basesystem_controller_test.rb
+++ b/webclient/test/functional/basesystem_controller_test.rb
@@ -57,11 +57,9 @@ class BasesystemControllerTest < ActionController::TestCase
test "basesystem start" do
@result.finish = false
get :index
- assert_redirected_to :action => :basesystem
+ assert_redirected_to "/systemtime"
assert_not_nil session[:wizard_current]
assert_not_nil session[:wizard_steps]
- get :basesystem
- assert_response :success
end
test "basesystem ensure wizard" do
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org