Truncate comments on changeset list.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1900 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-09-22 19:50:10 +00:00
parent fbf2646426
commit 9131cdf6b9
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -22,6 +22,12 @@ module RepositoriesHelper
txt.to_s[0,8]
end
def truncate_at_line_break(text, length = 255)
if text
text.gsub(%r{^(.{#{length}}[^\n]*)\n.+$}m, '\\1...')
end
end
def render_properties(properties)
unless properties.nil? || properties.empty?
content = ''