Implement basic upload tags change report
This commit is contained in:
12
app/helpers/upload_tags_report_helper.rb
Normal file
12
app/helpers/upload_tags_report_helper.rb
Normal 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
|
||||
Reference in New Issue
Block a user