# -*- encoding : utf-8 -*- module DiffHelper def render_diff(diff, diff_counter) diff_display ||= Diff::Display::Unified.new(diff.diff) path = if @pull "#{polymorphic_path [@project, @pull]}/diff" elsif @commit "#{commit_path @project, @commit}" end #res = "" res = "
#{link_to stat.filename.rtruncate(120), "#{path}#diff-#{ind}"} | " res << "" res << I18n.t("layout.projects.inline_changes_count", :count => stat.additions + stat.deletions).strip + " (" + I18n.t("layout.projects.inline_additions_count", :count => stat.additions).strip + ", " + I18n.t("layout.projects.inline_deletions_count", :count => stat.deletions).strip + ")" res << " | " end res << "