forked from helma/opentox-toxcreate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote branch 'helma/development' into development
- Loading branch information
Showing
6 changed files
with
93 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
.input | ||
|
||
%p | ||
Please login as guest or user. You can create a user account at | ||
= link_to "www.opentox.org/join_form .", "http://www.opentox.org/join_form" | ||
- if !logged_in() | ||
%form{ :action => url_for('/login'), :method => "post" } | ||
%fieldset | ||
%label{:for => 'username'} Username: | ||
%input{:type => 'text', :name => 'username', :id => 'username', :size => '50'} | ||
%br | ||
%label{:for => 'password'} Password: | ||
%input{:type => 'password', :name => 'password', :id => 'password', :size => '50'} | ||
%input{ :type => "submit", :value => "Login"} | ||
= link_to "Cancel", '/login' | ||
- if session[:username] == "guest" | ||
.login_notice | ||
You are currently logged in as | ||
%b guest | ||
and your models can be modified or deleted by other guests. | ||
To control models permissions you can | ||
log in with your | ||
%a{:href => "http://www.opentox.org"} OpenTox | ||
username/password below. If have no | ||
%a{:href => "http://www.opentox.org"} OpenTox | ||
account yet you can | ||
%a{:href => "http://www.opentox.org/join_form"} register here. | ||
- else | ||
%p | ||
Change | ||
%a{:href => "http://www.opentox.org"} OpenTox | ||
account: | ||
|
||
-# if !logged_in() | ||
%form{ :action => url_for('/login'), :method => "post" } | ||
%fieldset | ||
%label{:for => 'username'} Username: | ||
%input{:type => 'text', :name => 'username', :id => 'username', :size => '50'} | ||
%br | ||
%label{:for => 'password'} Password: | ||
%input{:type => 'password', :name => 'password', :id => 'password', :size => '50'} | ||
%input{ :type => "submit", :value => "Login"} | ||
= link_to "Cancel", '/login' | ||
- if session[:username] != "guest" | ||
%br | ||
or login with guest-account: | ||
%form{ :action => url_for('/login'), :method => "post" } | ||
%input{:type => 'hidden', :name => 'username', :id => 'username', :value => "guest"} | ||
%input{:type => 'hidden', :name => 'password', :id => 'password', :value => "guest"} | ||
%input{ :type => "submit", :value => "Login as guest"} | ||
- else | ||
-# else | ||
%form{ :action => url_for('/logout'), :method => "post" } | ||
%p | ||
You are logged in as user: | ||
-#%p | ||
You are logged in as: | ||
%b= session[:username] | ||
- if LOGGER.level == Logger::DEBUG | ||
-# if LOGGER.level == Logger::DEBUG | ||
%br | ||
= session[:subjectid] | ||
%input{ :type => "submit", :value => "Logout"} | ||
%input{ :type => "submit", :value => "Switch user"} | ||
= link_to "Cancel", '/login' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters