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] %> <% display = (flash[:notice] || flash[:alert] || flash[:warning]) ? 'block' : 'none' %>
<div class="alert alert-success alert-dismissible"> <div id="flash" style="display: <%= display %>;">
<button class="close" data-dismiss="alert" type=button><span>&times;</span></button> <% type = (flash[:notice]) ? 'bg-success' : 'bg-danger' %>
<% if flash[:notice].respond_to?(:join) %> <% type = 'bg-warning' if flash[:warning] %>
<p><%= flash[:notice].join('<br>').html_safe %></p> <div class="<%= type %> alert">
<% else %> <%= flash[:notice] || flash[:alert] || flash[:warning] %>
<p><%= flash[:notice] %></p>
<% end %>
</div> </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> </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> </div>
</nav> </nav>
<div class="container"> <div class="container">
<%= render 'shared/flash' %> <%= render 'flash_messages' %>
<%= yield %> <%= yield %>
</div> </div>
<footer class="footer"> <footer class="footer">