From b293481da8ceca245beba9506522483cceca0d9b Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 28 Jul 2014 22:29:58 -0500 Subject: [PATCH] Style flash and error notices as card notifications --- app/views/layouts/_notices.html.erb | 15 --------------- app/views/layouts/_sidebar.html.erb | 22 ++++++++++++++++++++-- app/views/layouts/application.html.erb | 1 - 3 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 app/views/layouts/_notices.html.erb diff --git a/app/views/layouts/_notices.html.erb b/app/views/layouts/_notices.html.erb deleted file mode 100644 index d8872f0b..00000000 --- a/app/views/layouts/_notices.html.erb +++ /dev/null @@ -1,15 +0,0 @@ -<% if flash[:notice] %> -
-
- <%= flash[:notice] %> -
-
-<% end %> - -<% if flash[:alert] %> -
-
- <%= flash[:alert] %> -
-
-<% end %> diff --git a/app/views/layouts/_sidebar.html.erb b/app/views/layouts/_sidebar.html.erb index af602c7a..9dc93dbd 100644 --- a/app/views/layouts/_sidebar.html.erb +++ b/app/views/layouts/_sidebar.html.erb @@ -1,6 +1,24 @@ -<% if session[:user] %> +<% if flash[:notice] %> +
+
+
+ <%= flash[:notice] %> +
+
+
+<% end %> -<% else %> +<% if flash[:alert] %> +
+
+
+ <%= flash[:alert] %> +
+
+
+<% end %> + +<% unless session[:user] %>

Get started instantly

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 4de89598..b995211f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -14,7 +14,6 @@ <%= render 'layouts/anon_notice' %> <%= render 'layouts/noscript_notice' %>
- <%= render 'layouts/notices' %>