数据获取及展示
This commit is contained in:
parent
0a9224d036
commit
27e755a0a9
|
@ -77,6 +77,7 @@ class PullRequestsController < ApplicationController
|
|||
|
||||
# 获取某次请求的改动
|
||||
def pull_request_changes
|
||||
@type = 2
|
||||
@changes = @g.merge_request_changes(@project.gpid, params[:id])
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<% @changes.each do |changes| %>
|
||||
<div class="showing-changes-row fontGrey2" style="width:730px; margin:0 -10px;">Showing <a href="javascript:void(0)" class="linkGrey3 fb" id="changed-files">3 changed files</a> with <span class="c_green fb">3 additions</span> and <span class="c_red fb">3 deletions</span>
|
||||
<ol class="mt10" id="changed-files-detail">
|
||||
<li><a href="javascript:void(0)" class="linkGrey3">app/views/organizations/_org_course_homework.html.erb</a> </li>
|
||||
|
@ -30,3 +31,4 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<%= render :partial => "pull_requests/pull_request_container" %>
|
||||
<% render :partial => "pull_requests/new" %>
|
||||
<%= render :partial => "pull_requests/new" %>
|
|
@ -0,0 +1 @@
|
|||
$("#merge_record_1").html('<%= render :partial => "pull_requests/pull_request_changes" %>');
|
|
@ -19,9 +19,11 @@
|
|||
<div class="new-merge-wrap" id="merge_record_0">
|
||||
<%= render :partial => "pull_requests/pull_request_commits" %>
|
||||
</div>
|
||||
<% if @type == 2 %>
|
||||
<div id="merge_record_1" class="undis">
|
||||
<%= render :partial => "pull_requests/pull_request_changes" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$("#mergeShow").parent().css("width","730px");
|
||||
|
|
Loading…
Reference in New Issue