update notification

This commit is contained in:
Aung Myo
2017-10-26 13:49:15 +06:30
parent fe6d8a4be0
commit 15604fea2c
8 changed files with 110 additions and 56 deletions

View File

@@ -47,14 +47,22 @@
<!-- Main Content -->
<section class="content">
<% flash.each do |type, message| %>
<div class="alert-danger fade in">
<button class="close" aria-hidden="true" data-dismiss="alert" type="button">×</button>
<% if !flash["errors"]%>
<%=message%>
<% end %>
</div>
<% flash.each do |type, message| %>
<% if !flash["errors"]%>
<%
if type == "notice"
color = "alert-success"
elsif type == "error"
color = "alert-danger"
else
color = "bg-black"
end
%>
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p>
<% end %>
<% end %>
<%= yield %>
</section>

View File

@@ -47,7 +47,20 @@
</section>
<!-- Main Content -->
<section class="content">
<section class="content">
<% flash.each do |type, message| %>
<% if type == "notice"
color = "alert-success"
elsif type == "error"
color = "alert-danger"
else
color = "bg-black"
end %>
<p id="notify_message" class="hidden" data-placement-from="top" data-message="<%=message%>" data-placement-align="center"
data-animate-enter="" data-animate-exit="" data-color-name="<%=color%>" >
</p>
<% end %>
<%= yield %>
</section>
</body>