TrestleAdmin/trestle

View on GitHub
app/views/trestle/flash/_alert.html.erb

Summary

Maintainability
Test Coverage
<div class="alert alert-dismissable <%= html_class %>" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>

  <%= icon %>

  <div class="alert-content">
    <% if alert[:title] %>
      <h3><%= alert[:title] %></h3>
    <% end %>

    <% if alert[:message] %>
      <p><%= alert[:message] %></p>
    <% end %>

    <%= yield if block_given? %>
  </div>
</div>