Merge pull request #2864 from r888888888/upload_tags_report

Implement #2863: basic upload tags change report
This commit is contained in:
Albert Yi
2017-02-28 15:28:40 -08:00
committed by GitHub
5 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
module UploadTagsReportHelper
def diff_to_current(report)
html = []
report.added_tags_array.each do |tag|
html << '<ins>+' + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</ins>'
end
report.removed_tags_array.each do |tag|
html << '<del>-' + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</del>'
end
return html.join(" ").html_safe
end
end