Skip to content
Snippets Groups Projects
Commit 532c7bd2 authored by farhatahmad's avatar farhatahmad Committed by Jesus Federico
Browse files

Refactored flash messages code (#372)

parent 5553a8ff
No related branches found
No related tags found
No related merge requests found
<%
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
# This program is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 3.0 of the License, or (at your option) any later
# version.
#
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License along
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<div class="alert alert-icon alert-danger text-center mb-0">
<%= yield %>
</div>
...@@ -15,12 +15,16 @@ ...@@ -15,12 +15,16 @@
<% flash.each do |key,value| %> <% flash.each do |key,value| %>
<% if key.eql? "success" %> <% if key.eql? "success" %>
<%= render "shared/success_banner" do %> <div class="alert alert-icon alert-success text-center mb-0">
<%= content_tag :div, value, class: "flash #{key} d-inline" %> <%= content_tag :div, value, class: "flash #{key} d-inline" %>
<% end %> </div>
<% elsif key.eql? "alert" %> <% elsif key.eql? "alert" %>
<%= render "shared/error_banner" do %> <div class="alert alert-icon alert-danger text-center mb-0">
<%= content_tag :div, value, class: "flash #{key} d-inline" %> <%= content_tag :div, value, class: "flash #{key} d-inline" %>
<% end %> </div>
<% elsif key.eql? "info" %>
<div class="alert alert-icon alert-info text-center mb-0">
<%= content_tag :div, value, class: "flash #{key} d-inline" %>
</div>
<% end %> <% end %>
<% end %> <% end %>
<%
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
# This program is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free Software
# Foundation; either version 3.0 of the License, or (at your option) any later
# version.
#
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public License along
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<div class="alert alert-icon alert-success text-center mb-0">
<%= yield %>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment