mailr/themes/olive/views/layouts/_flash.html.erb

17 lines
404 B
Plaintext
Raw Normal View History

2011-09-16 22:21:57 +02:00
<% if not flash.size.zero? %>
<div class="flash">
<% flash.each do |key, msg| %>
<% unless msg.blank? %>
<% if msg.class.eql?(Hash) %>
<% f = content_tag :p, msg[:title] %>
<% f += content_tag :p, msg[:info], :class=> "info" %>
<% else %>
<% f = content_tag :p, msg %>
<% end %>
<%= content_tag(:div,f, :class => "message #{key.to_s}" )%>
<%= flash[key.to_sym]='' %>
<% end %>
<% end %>
</div>
<% end %>