From 4ffbe5e68fc724d3f2b4706d6dff65eb5b76fe41 Mon Sep 17 00:00:00 2001 From: Andrew Radev Date: Wed, 29 Apr 2015 11:52:58 +0200 Subject: [PATCH] Flash messages --- app/views/layouts/management.html.slim | 3 ++- app/views/layouts/management/_flash.html.slim | 9 +++++++++ app/views/management/conferences/edit.html.slim | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 app/views/layouts/management/_flash.html.slim diff --git a/app/views/layouts/management.html.slim b/app/views/layouts/management.html.slim index d81966a..0a2dd27 100644 --- a/app/views/layouts/management.html.slim +++ b/app/views/layouts/management.html.slim @@ -15,7 +15,8 @@ html = stylesheet_link_tag "management/application" = csrf_meta_tags body - = render partial: 'layouts/management/navigation' + = render 'layouts/management/navigation' main + = render 'layouts/management/flash' == yield = javascript_include_tag "management/application" diff --git a/app/views/layouts/management/_flash.html.slim b/app/views/layouts/management/_flash.html.slim new file mode 100644 index 0000000..b0658c5 --- /dev/null +++ b/app/views/layouts/management/_flash.html.slim @@ -0,0 +1,9 @@ +.row + .col-lg-12 + - if flash[:notice] + .alert.alert-success + = flash[:notice] + + - if flash[:alert] + .alert.alert-error + = flash[:alert] diff --git a/app/views/management/conferences/edit.html.slim b/app/views/management/conferences/edit.html.slim index 2b22db3..f9a147a 100644 --- a/app/views/management/conferences/edit.html.slim +++ b/app/views/management/conferences/edit.html.slim @@ -1,6 +1,7 @@ - content_for :title => t 'actions.edit.title', model: Conference.model_name.human = @conference.title + .row .col-lg-12 = render partial: 'form'