Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (41 sloc) 0.969 kB
class FlowdockRenderer
include Redmine::I18n
include IssuesHelper
def notes_to_html(journal)
if journal && journal.notes
"<p>#{journal.notes}</p>"
else
""
end
end
def details_to_html(journal)
begin
html_list = journal_details(journal.details).map { |detail| "<li>#{detail}</li>" }
"<ul>#{html_list.join}</ul>"
rescue => ex
""
end
end
def wiki_diff_to_html(page)
begin
new_version = page.content.version
old_version = if new_version > 1
new_version - 1
else
nil
end
diff = page.diff(old_version, new_version)
"<pre>" +
diff.to_html.
gsub('class="diff_in"', 'style="background-color: #dfd"').
gsub('class="diff_out"', 'style="background-color: #fdd; color: #999"') +
"</pre>"
rescue => ex
""
end
end
protected
def journal_details(details)
details_to_strings(details, true)
end
end
Jump to Line
Something went wrong with that request. Please try again.