scinote-web/app/views/shared/_flash_alerts.html.erb
2020-01-21 15:21:40 +01:00

23 lines
1.2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id="notifications">
<% if flash[:success] %>
<div id="alert-flash" class="alert alert-success alert-dismissable alert-floating">
<span class="fas fa-check-circle"></span>
<span class="message"><%= sanitize_input(flash[:success]) %></span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<% end %>
<% if notice %>
<div id="alert-flash" class="alert alert-info alert-dismissable alert-floating">
<span class="fas fa-info-circle"></span>
<span class="message"><%= notice %></span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<% end %>
<% if alert and !alert.empty? or flash[:error]%>
<div id="alert-flash" class="alert alert-danger alert-dismissable alert-floating">
<span class="fas fa-exclamation-triangle"></span>
<span class="message"><%= alert || sanitize_input(flash[:error]) %></span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<% end %>
</div>