diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b095718..89bf732 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base @current_suser ||= StudentUser.find_by_auth_token!(cookies[:student_auth_token]) if cookies[:student_auth_token] - if @current_suser.lock? + if @current_suser and @current_suser.lock? @current_suser = false end diff --git a/app/controllers/student/topics_controller.rb b/app/controllers/student/topics_controller.rb index d880341..953e53c 100644 --- a/app/controllers/student/topics_controller.rb +++ b/app/controllers/student/topics_controller.rb @@ -1,6 +1,6 @@ # -*- encoding : utf-8 -*- class Student::TopicsController < ApplicationController - before_filter :auth_admin + before_filter :auth_suser layout "student" diff --git a/app/views/layouts/admin_auth.haml b/app/views/layouts/admin_auth.haml index ba7fce5..80b547b 100644 --- a/app/views/layouts/admin_auth.haml +++ b/app/views/layouts/admin_auth.haml @@ -7,14 +7,14 @@ %title Connection = csrf_meta_tags = stylesheet_link_tag :admin_auth + = javascript_include_tag :connexion %body - + :coffeescript + $ -> + $.backstretch("/login_background.jpg") #flashs= bootstrap_flash .form-signin= yield - = javascript_include_tag "application" - - - \ No newline at end of file + \ No newline at end of file