migrate login rjs to erb and reformat features

This commit is contained in:
Reinier Balt 2010-11-10 17:34:28 +01:00
parent 05b3b7cebc
commit 520e45fe6b
17 changed files with 137 additions and 152 deletions

View file

@ -0,0 +1 @@
window.location.href = '<%= login_path %>';

View file

@ -1 +0,0 @@
page.redirect_to :controller => 'login', :action => 'login'

View file

@ -0,0 +1,9 @@
<% if @session_expired
theHtml = content_tag(
:div,
t('login.session_time_out', :link => link_to(t('login.log_in_again'), :controller => "login", :action => "login")),
:"class" => "warning")
-%>
$('div#navcontainer').remove();
$('div#content').html('<%=theHtml%>');
<% end -%>

View file

@ -1,9 +0,0 @@
if @session_expired
page << "console.log('expired');"
page << "$('div#navcontainer').hide();"
page << "theHtml = \'<div class=\"warning\">" +
t('login.session_time_out', :link => link_to(
t('login.log_in_again'), :controller => "login", :action => "login"),
"class" => "warning")
page << "$('div#content').html(theHtml);"
end