# HG changeset patch # User jittat # Date 2008-01-17 01:52:20 # Node ID 1828434e55cd47303ddfb56ff412872995712dcc # Parent 13e6672bec4dbdccf3ca3657b1423d0b4571450b change login page, always redirect index to login git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@9 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -6,6 +6,7 @@ :redirect_to => { :action => :index } def index + redirect_to :action => 'login' end def login diff --git a/app/views/main/index.rhtml b/app/views/main/index.rhtml deleted file mode 100644 --- a/app/views/main/index.rhtml +++ /dev/null @@ -1,5 +0,0 @@ -

Grader

- -Welcome... first you need to -<%= link_to 'login', :controller => 'main', :action => 'login' %> -to see problem list. diff --git a/app/views/main/login.rhtml b/app/views/main/login.rhtml --- a/app/views/main/login.rhtml +++ b/app/views/main/login.rhtml @@ -1,4 +1,7 @@ -

Login

+

Grader

+ +Welcome back!
+Please login to see the problem list.

<% if flash[:notice] %>
@@ -6,6 +9,7 @@
<% end %> +
<% form_tag :controller => 'login', :action => 'login' do %> @@ -17,3 +21,5 @@
<%= submit_tag 'Login' %> <% end %> +
+ diff --git a/config/routes.rb b/config/routes.rb --- a/config/routes.rb +++ b/config/routes.rb @@ -11,7 +11,7 @@ # You can have the root of your site routed by hooking up '' # -- just remember to delete public/index.html. - map.connect '', :controller => 'main' + map.connect '', :controller => 'main', :action => 'login' # Allow downloading Web Service WSDL as a file with an extension # instead of a file named 'wsdl'