This patch isn't necessarily meant to go into product, but I'm
sending it out for review.

If this is going to make it into the codebase, we should certainly
make the file location configurable, and remove the marker comments.
---
 src/app/controllers/user_sessions_controller.rb |   11 +++++++++
 src/app/stylesheets/login.scss                  |   28 +++++++++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/src/app/controllers/user_sessions_controller.rb 
b/src/app/controllers/user_sessions_controller.rb
index b0bb661..6cde8b2 100644
--- a/src/app/controllers/user_sessions_controller.rb
+++ b/src/app/controllers/user_sessions_controller.rb
@@ -20,6 +20,7 @@
 class UserSessionsController < ApplicationController
   before_filter :require_no_user, :only => [:new, :create]
   before_filter :require_user, :only => :destroy
+  before_filter :global_notice # mawagner - MOTD patch change
   layout 'converge-ui/login_layout'
 
   def new
@@ -59,4 +60,14 @@ class UserSessionsController < ApplicationController
     logout
     redirect_to login_url
   end
+
+  # mawagner - MOTD patch change
+  # Remember to remove reference on line 23 of this file
+  def global_notice
+    # Check for our message file:
+    message = File.read('/etc/aeolus-conductor/motd.html') rescue nil
+    @motd = message.html_safe if message.present?
+  end
+  # mawagner - end MOTD patch change
+
 end
diff --git a/src/app/stylesheets/login.scss b/src/app/stylesheets/login.scss
index 00f4893..608f398 100644
--- a/src/app/stylesheets/login.scss
+++ b/src/app/stylesheets/login.scss
@@ -5,6 +5,34 @@
 article{
   aside img{ margin-left: 15px; }
 
+  // mawagner - MOTD patch
+  #motd {
+    @include box-sizing(border-box);
+    @include border-radius(7px);
+    border: 1px solid #ddd;
+    margin: 40px 0 0 0;
+    @include background-image(linear-gradient(top, rgba(255, 255, 255, 0) 40%, 
$login_base-color 120%));
+    @include box-shadow($login_base-color 0px 12px 15px -8px);
+    padding: 20px 20px 20px 20px;
+    color: rgba(black, 0.48);
+
+    &:before {
+      content: "";
+      display: block;
+      width: 16px;
+      height: 16px;
+      position: absolute;
+      background: image-url("flash_warning_icon.png") no-repeat 0 0;
+    }
+
+    p {
+      padding-left: 30px;
+      margin: 0;
+      position: relative;
+    }
+  }
+  // end mawagner - MOTD patch
+
   #notifications{
     position: relative;
 
-- 
1.7.7.6

Reply via email to