From 43bc704468dfdb41ae8bbdfc3f2ada24810bd006 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Wed, 15 Aug 2012 15:55:29 +0800 Subject: [PATCH] Error popup only shows on flash[:error] --- app/controllers/pages_controller.rb | 2 +- app/views/layouts/page_layout.html.erb | 6 ++---- .../panel/announcement/widget/bulletins/_index.html.erb | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index f1d307f45..bfc4f403b 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -78,7 +78,7 @@ class PagesController < ApplicationController protected def save_from_no_lang_for_page if @item.nil? or !@item.enabled_for_lang(I18n.locale.to_s) - flash[:notice] = t('sys.module_page_lang_not_support') + flash[:error] = t('sys.module_page_lang_not_support') redirect_to '/' return true else diff --git a/app/views/layouts/page_layout.html.erb b/app/views/layouts/page_layout.html.erb index ae73e59d0..b8894891e 100644 --- a/app/views/layouts/page_layout.html.erb +++ b/app/views/layouts/page_layout.html.erb @@ -13,12 +13,10 @@ <%= yield %> - <% if !flash.empty? %> + <% if flash[:error] %>