mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-18 07:05:28 +01:00
migrate login rjs to erb and reformat features
This commit is contained in:
parent
05b3b7cebc
commit
520e45fe6b
17 changed files with 137 additions and 152 deletions
1
app/views/login/_redirect_to_login.js.erb
Normal file
1
app/views/login/_redirect_to_login.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
window.location.href = '<%= login_path %>';
|
||||
|
|
@ -1 +0,0 @@
|
|||
page.redirect_to :controller => 'login', :action => 'login'
|
||||
9
app/views/login/check_expiry.js.erb
Normal file
9
app/views/login/check_expiry.js.erb
Normal 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 -%>
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue