diff --git a/app/controllers/pull_requests_controller.rb b/app/controllers/pull_requests_controller.rb index 9eb870b92..808459665 100644 --- a/app/controllers/pull_requests_controller.rb +++ b/app/controllers/pull_requests_controller.rb @@ -77,6 +77,7 @@ class PullRequestsController < ApplicationController # 获取某次请求的改动 def pull_request_changes + @type = 2 @changes = @g.merge_request_changes(@project.gpid, params[:id]) end diff --git a/app/views/pull_requests/_pull_request_changes.html.erb b/app/views/pull_requests/_pull_request_changes.html.erb index 465e985b9..b1abe1383 100644 --- a/app/views/pull_requests/_pull_request_changes.html.erb +++ b/app/views/pull_requests/_pull_request_changes.html.erb @@ -1,32 +1,34 @@ -
Showing 3 changed files with 3 additions and 3 deletions -
    -
  1. app/views/organizations/_org_course_homework.html.erb
  2. -
  3. app/views/users/_course_homework.html.erb
  4. -
  5. app/views/users/_user_homework_detail.html.erb
  6. -
-
-
app/views/organizations/_org_course_homework.html.erb
-
- - - - - - - - - - - - - - - - - - - - - -
9999<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
100100<div class="mt10">
111- <div class="fl mr5 fontGrey3">
111+ <div class="fl mr20 fontGrey3 w80">
-
\ No newline at end of file +<% @changes.each do |changes| %> +
Showing 3 changed files with 3 additions and 3 deletions +
    +
  1. app/views/organizations/_org_course_homework.html.erb
  2. +
  3. app/views/users/_course_homework.html.erb
  4. +
  5. app/views/users/_user_homework_detail.html.erb
  6. +
+
+
app/views/organizations/_org_course_homework.html.erb
+
+ + + + + + + + + + + + + + + + + + + + + +
9999<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
100100<div class="mt10">
111- <div class="fl mr5 fontGrey3">
111+ <div class="fl mr20 fontGrey3 w80">
+
+<% end %> diff --git a/app/views/pull_requests/new.html.erb b/app/views/pull_requests/new.html.erb index e77c2d364..47ba66f09 100644 --- a/app/views/pull_requests/new.html.erb +++ b/app/views/pull_requests/new.html.erb @@ -1,2 +1,2 @@ <%= render :partial => "pull_requests/pull_request_container" %> -<% render :partial => "pull_requests/new" %> \ No newline at end of file +<%= render :partial => "pull_requests/new" %> \ No newline at end of file diff --git a/app/views/pull_requests/pull_request_changes.js.erb b/app/views/pull_requests/pull_request_changes.js.erb index e69de29bb..10374c213 100644 --- a/app/views/pull_requests/pull_request_changes.js.erb +++ b/app/views/pull_requests/pull_request_changes.js.erb @@ -0,0 +1 @@ +$("#merge_record_1").html('<%= render :partial => "pull_requests/pull_request_changes" %>'); \ No newline at end of file diff --git a/app/views/pull_requests/show.html.erb b/app/views/pull_requests/show.html.erb index e8beb3e0d..c7e52b8d5 100644 --- a/app/views/pull_requests/show.html.erb +++ b/app/views/pull_requests/show.html.erb @@ -19,9 +19,11 @@
<%= render :partial => "pull_requests/pull_request_commits" %>
-
- <%= render :partial => "pull_requests/pull_request_changes" %> -
+<% if @type == 2 %> +
+ <%= render :partial => "pull_requests/pull_request_changes" %> +
+<% end %>