Sha256: 36a43120cef61f55deca8dacf7105ab1b23c386242c9cc42ffaa3b17b6ce81dd

Contents?: true

Size: 539 Bytes

Versions: 25

Compression:

Stored size: 539 Bytes

Contents

<% flash_types_to_classes = { notice: 'alert-success', error: 'alert-danger', alert: 'alert-warning' } %>
<% [:notice, :error, :alert].each do |type| %>
  <% if flash[type] %>
    <div class="alert <%= flash_types_to_classes[type] rescue '' %>">
      <a class="close" data-dismiss="alert" href="#">&times;</a>
      <% if flash[type].respond_to? :join %>
        <%= flash[type].join("<br/>").html_safe %>
      <% else %>
        <%= flash[type].html_safe %>
      <% end %>
    </div>
    <% flash.delete(type) %>
  <% end %>
<% end %>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
sufia-6.7.0 app/views/_flash_msg.html.erb
sufia-6.6.1 app/views/_flash_msg.html.erb
sufia-6.6.0 app/views/_flash_msg.html.erb
sufia-6.5.0 app/views/_flash_msg.html.erb
sufia-6.4.0 app/views/_flash_msg.html.erb
sufia-6.3.0 app/views/_flash_msg.html.erb
sufia-6.2.0 app/views/_flash_msg.html.erb
sufia-6.1.0 app/views/_flash_msg.html.erb
sufia-5.0.0 app/views/_flash_msg.html.erb
sufia-6.0.0 app/views/_flash_msg.html.erb
sufia-6.0.0.rc4 app/views/_flash_msg.html.erb
sufia-6.0.0.rc3 app/views/_flash_msg.html.erb
sufia-5.0.0.rc1 app/views/_flash_msg.html.erb
sufia-6.0.0.rc2 app/views/_flash_msg.html.erb
sufia-6.0.0.rc1 app/views/_flash_msg.html.erb
sufia-4.3.1 app/views/_flash_msg.html.erb
sufia-6.0.0.beta1 app/views/_flash_msg.html.erb
sufia-4.2.0 app/views/_flash_msg.html.erb
sufia-4.1.0 app/views/_flash_msg.html.erb
sufia-4.0.1 app/views/_flash_msg.html.erb