Merge pull request #901 from internetee/registry-893

Registry 893
This commit is contained in:
Timo Võhmar 2018-06-26 17:55:26 +03:00 committed by GitHub
commit e37647477c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 66 additions and 82 deletions

View file

@ -1,24 +1,8 @@
<% if flash[:notice] %>
<div class="alert alert-success alert-dismissible">
<button class="close" data-dismiss="alert" type=button><span>&times;</span></button>
<% if flash[:notice].respond_to?(:join) %>
<p><%= flash[:notice].join('<br>').html_safe %></p>
<% else %>
<p><%= flash[:notice] %></p>
<% end %>
<% display = (flash[:notice] || flash[:alert] || flash[:warning]) ? 'block' : 'none' %>
<div id="flash" style="display: <%= display %>;">
<% type = (flash[:notice]) ? 'bg-success' : 'bg-danger' %>
<% type = 'bg-warning' if flash[:warning] %>
<div class="<%= type %> alert">
<%= flash[:notice] || flash[:alert] || flash[:warning] %>
</div>
<% end %>
<% if flash[:alert] %>
<div class="alert alert-danger alert-dismissible">
<button class="close" data-dismiss="alert" type=button><span>&times;</span></button>
<p><%= flash[:alert] %></p>
</div>
<% end %>
<% if flash[:info] %>
<div class="alert alert-info alert-dismissible">
<button class="close" data-dismiss="alert" type=button><span>&times;</span></button>
<p><%= flash[:info] %></p>
</div>
<% end %>

View file

@ -65,7 +65,7 @@
</div>
</nav>
<div class="container">
<%= render 'shared/flash' %>
<%= render 'flash_messages' %>
<%= yield %>
</div>
<footer class="footer">