mailr/themes/olive/views/layouts/_flash.html.erb
2011-09-29 21:16:40 +02:00

17 lines
404 B
Plaintext
Executable file

<% 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 %>