diff --git a/Gemfile.lock b/Gemfile.lock index 77f77a7bd..ce5d48de6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM autoprefixer-rails (6.3.1) execjs json - bcrypt (3.1.11) + bcrypt (3.1.12) better_errors (2.4.0) coderay (>= 1.0.0) erubi (>= 1.0.0) @@ -113,14 +113,14 @@ GEM columnize (0.9.0) concurrent-ruby (1.0.5) connection_pool (2.2.1) - crass (1.0.3) + crass (1.0.4) dalli (2.7.2) database_cleaner (1.6.2) debug_inspector (0.0.3) - devise (4.4.1) + devise (4.4.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 4.1.0, < 5.2) + railties (>= 4.1.0, < 6.0) responders warden (~> 1.2.3) diff-lcs (1.3) @@ -241,7 +241,7 @@ GEM public_suffix (2.0.5) pundit (0.3.0) activesupport (>= 3.0.0) - rack (1.6.9) + rack (1.6.10) rack-protection (2.0.1) rack rack-test (0.6.3) @@ -280,7 +280,7 @@ GEM thor (>= 0.18.1, < 2.0) rainbow (3.0.0) raindrops (0.16.0) - rake (12.3.0) + rake (12.3.1) ransack (1.8.6) actionpack (>= 3.0) activerecord (>= 3.0) @@ -289,8 +289,9 @@ GEM polyamorous (~> 1.3.2) rdiscount (2.1.7.1) redis (4.0.1) - responders (2.0.2) - railties (>= 4.2.0.alpha, < 5) + responders (2.4.0) + actionpack (>= 4.2.0, < 5.3) + railties (>= 4.2.0, < 5.3) rest-client (2.0.1) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) @@ -364,7 +365,7 @@ GEM sshkit (1.8.1) net-scp (>= 1.1.2) net-ssh (>= 2.8.0) - thor (0.19.4) + thor (0.20.0) thread_safe (0.3.6) tilt (2.0.8) ttfunk (1.5.1) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index c135e8ef0..40aa4efdb 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -294,38 +294,11 @@ ul.statistics li{ } /*flash*/ -.alert > p, .alert > ul { +.alert > ul { + list-style: none; padding-left: 1.5rem; } -.alert-error { - background-color: #f2dede; - border-color: #eed3d7; - color: #b94a48; - text-align: left; - } - -.alert-alert { - background-color: #f2dede; - border-color: #eed3d7; - color: #b94a48; - text-align: left; - } - -.alert-success { - background-color: #dff0d8; - border-color: #d6e9c6; - color: #468847; - text-align: left; - } - -.alert-notice { - background-color: #dff0d8; - border-color: #d6e9c6; - color: #468847; - text-align: left; -} - // if not navbar hidden datepicker in small windows .ui-datepicker{ z-index: 1000 !important; diff --git a/app/helpers/messages_helper.rb b/app/helpers/messages_helper.rb new file mode 100644 index 000000000..18a2aea43 --- /dev/null +++ b/app/helpers/messages_helper.rb @@ -0,0 +1,13 @@ +module MessagesHelper + def alert_class(alert) + if alert == 'error' || alert == 'alert' + 'alert-danger' + elsif alert == 'success' + 'alert-success' + elsif alert == 'notice' + 'alert-info' + else + 'alert-info' + end + end +end diff --git a/app/models/user.rb b/app/models/user.rb index 4a75173ad..b3e7d3252 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -8,7 +8,8 @@ class User < ActiveRecord::Base :rememberable, :confirmable, :lockable, - :trackable + :trackable, + :timeoutable ] GENDERS = %w[male female] diff --git a/app/views/layouts/_messages.html.erb b/app/views/layouts/_messages.html.erb index 2884e0e91..b5e081551 100644 --- a/app/views/layouts/_messages.html.erb +++ b/app/views/layouts/_messages.html.erb @@ -1,5 +1,7 @@ <% flash.each do |key, value| %> -
+ <% next if key == 'timedout' %> + +