Commit 2e436275 authored by jplang's avatar jplang

Moves flash messages rendering to a helper method.

git-svn-id: https://svn.redmine.org/redmine/trunk@2223 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 4e2d0c2f
......@@ -147,6 +147,15 @@ module ApplicationHelper
end
content
end
# Renders flash messages
def render_flash_messages
s = ''
flash.each do |k,v|
s << content_tag('div', v, :class => "flash #{k}")
end
s
end
# Truncates and returns the string as a single line
def truncate_single_line(string, *args)
......
......@@ -50,8 +50,7 @@
</div>
<div id="content">
<%= content_tag('div', flash[:error], :class => 'flash error') if flash[:error] %>
<%= content_tag('div', flash[:notice], :class => 'flash notice') if flash[:notice] %>
<%= render_flash_messages %>
<%= yield %>
</div>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment