diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb index 71d736bdf..00259ee4f 100644 --- a/app/controllers/pull_requests_controller.rb +++ b/app/controllers/pull_requests_controller.rb @@ -291,6 +291,9 @@ class PullRequestsController < ApplicationController @type = params[:type] @changes = @g.merge_request_changes(@project.gpid, params[:id]).try(:changes) + + + @changes_count = @changes.count @limit = 10 @is_remote = true diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index ce03962e1..f932748af 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -586,6 +586,7 @@ update diff = OpenStruct.new(diff) @diff_file = Trustie::Gitlab::Diff::File.new(diff) + @commit_details = @g.commit(@project.gpid, params[:changeset]) render :layout => 'base_projects' end diff --git a/app/views/pull_requests/_pull_request_changes.html.erb b/app/views/pull_requests/_pull_request_changes.html.erb index 897cb9659..d64a65772 100644 --- a/app/views/pull_requests/_pull_request_changes.html.erb +++ b/app/views/pull_requests/_pull_request_changes.html.erb @@ -16,7 +16,30 @@
<%= line_old.center(4) %> | -<%= last_line.center(4) %> | -<%= line.text %> | +
+ <%= type == "match" ? "..." : line_old.center(4) %> + | ++ <%= type == "match" ? "..." : last_line.center(4) %> + | +" >
+ <%= line.text.html_safe %>+ |
<%= old_line.to_s.center(4) %> | -<%= new_line.to_s.center(4) %> | -<%= line.text %> | +
+ <%= old_line.to_s.center(4) %> + | ++ <%= new_line.to_s.center(4) %> + | +
+ <%= line.text.html_safe %>+ |