/pool_versions: add '»' drilldown links.

Add '»' drilldown links for pool names, users, and post ids.
This commit is contained in:
evazion
2019-09-08 23:28:02 -05:00
parent 964a073ec3
commit 8198c610cc
5 changed files with 39 additions and 27 deletions

View File

@@ -1,19 +0,0 @@
module PoolVersionsHelper
def pool_version_diff(pool_version, previous = nil, options = {})
html = ""
diff = pool_version.build_diff(previous)
html << diff[:added_post_ids].map do |post_id|
'<ins><a href="/posts/' + post_id.to_s + '">' + post_id.to_s + '</a></ins>'
end.join(" ")
html << " "
html << diff[:removed_post_ids].map do |post_id|
'<del><a href="/posts/' + post_id.to_s + '">' + post_id.to_s + '</a></del>'
end.join(" ")
return html.html_safe
end
end