数据获取及展示
This commit is contained in:
parent
0a9224d036
commit
27e755a0a9
|
@ -77,6 +77,7 @@ class PullRequestsController < ApplicationController
|
||||||
|
|
||||||
# 获取某次请求的改动
|
# 获取某次请求的改动
|
||||||
def pull_request_changes
|
def pull_request_changes
|
||||||
|
@type = 2
|
||||||
@changes = @g.merge_request_changes(@project.gpid, params[:id])
|
@changes = @g.merge_request_changes(@project.gpid, params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,34 @@
|
||||||
<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>
|
<% @changes.each do |changes| %>
|
||||||
<ol class="mt10" id="changed-files-detail">
|
<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>
|
||||||
<li><a href="javascript:void(0)" class="linkGrey3">app/views/organizations/_org_course_homework.html.erb</a> </li>
|
<ol class="mt10" id="changed-files-detail">
|
||||||
<li><a href="javascript:void(0)" class="linkGrey3">app/views/users/_course_homework.html.erb</a> </li>
|
<li><a href="javascript:void(0)" class="linkGrey3">app/views/organizations/_org_course_homework.html.erb</a> </li>
|
||||||
<li><a href="javascript:void(0)" class="linkGrey3">app/views/users/_user_homework_detail.html.erb</a> </li>
|
<li><a href="javascript:void(0)" class="linkGrey3">app/views/users/_course_homework.html.erb</a> </li>
|
||||||
</ol>
|
<li><a href="javascript:void(0)" class="linkGrey3">app/views/users/_user_homework_detail.html.erb</a> </li>
|
||||||
</div>
|
</ol>
|
||||||
<div class="showing-changes-row fontGrey2" style="width:730px; margin:0 -10px;"><a href="javascript:void(0)" class="linkGrey3"><img src="/images/vlicon/file.png" width="18" height="20" style="vertical-align:middle;" class="mr5" />app/views/organizations/_org_course_homework.html.erb</a></div>
|
</div>
|
||||||
<div class="showing-changes-detail" style="width:750px; margin:0 -10px;">
|
<div class="showing-changes-row fontGrey2" style="width:730px; margin:0 -10px;"><a href="javascript:void(0)" class="linkGrey3"><img src="/images/vlicon/file.png" width="18" height="20" style="vertical-align:middle;" class="mr5" />app/views/organizations/_org_course_homework.html.erb</a></div>
|
||||||
<table class="changes-detail-chart">
|
<div class="showing-changes-detail" style="width:750px; margin:0 -10px;">
|
||||||
<tr>
|
<table class="changes-detail-chart">
|
||||||
<td class="diff-line-number fontGrey2">99</td>
|
<tr>
|
||||||
<td class="diff-line-number fontGrey2">99</td>
|
<td class="diff-line-number fontGrey2">99</td>
|
||||||
<td class="fontGrey2 p10"><% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %></td>
|
<td class="diff-line-number fontGrey2">99</td>
|
||||||
</tr>
|
<td class="fontGrey2 p10"><% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="diff-line-number fontGrey2">100</td>
|
<tr>
|
||||||
<td class="diff-line-number fontGrey2">100</td>
|
<td class="diff-line-number fontGrey2">100</td>
|
||||||
<td class="fontGrey2 p10"><div class="mt10"></td>
|
<td class="diff-line-number fontGrey2">100</td>
|
||||||
</tr>
|
<td class="fontGrey2 p10"><div class="mt10"></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td class="diff-line-number fontGrey2 number-line-old">111</td>
|
<tr>
|
||||||
<td class="diff-line-number fontGrey2 number-line-old"></td>
|
<td class="diff-line-number fontGrey2 number-line-old">111</td>
|
||||||
<td class="fontGrey2 p10 code-line-old">- <div class="fl mr5 fontGrey3"></td>
|
<td class="diff-line-number fontGrey2 number-line-old"></td>
|
||||||
</tr>
|
<td class="fontGrey2 p10 code-line-old">- <div class="fl mr5 fontGrey3"></td>
|
||||||
<tr class="code-line-new">
|
</tr>
|
||||||
<td class="diff-line-number fontGrey2 number-line-new"></td>
|
<tr class="code-line-new">
|
||||||
<td class="diff-line-number fontGrey2 number-line-new">111</td>
|
<td class="diff-line-number fontGrey2 number-line-new"></td>
|
||||||
<td class="fontGrey2 p10 code-line-new">+ <div class="fl mr20 fontGrey3 w80"></td>
|
<td class="diff-line-number fontGrey2 number-line-new">111</td>
|
||||||
</tr>
|
<td class="fontGrey2 p10 code-line-new">+ <div class="fl mr20 fontGrey3 w80"></td>
|
||||||
</table>
|
</tr>
|
||||||
</div>
|
</table>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<%= render :partial => "pull_requests/pull_request_container" %>
|
<%= 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">
|
<div class="new-merge-wrap" id="merge_record_0">
|
||||||
<%= render :partial => "pull_requests/pull_request_commits" %>
|
<%= render :partial => "pull_requests/pull_request_commits" %>
|
||||||
</div>
|
</div>
|
||||||
<div id="merge_record_1" class="undis">
|
<% if @type == 2 %>
|
||||||
<%= render :partial => "pull_requests/pull_request_changes" %>
|
<div id="merge_record_1" class="undis">
|
||||||
</div>
|
<%= render :partial => "pull_requests/pull_request_changes" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$("#mergeShow").parent().css("width","730px");
|
$("#mergeShow").parent().css("width","730px");
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="commit-row-info">
|
<div class="commit-row-info">
|
||||||
<% if !user_commit_rep(changeset.author_email).nil? %>
|
<% if !user_commit_rep(changeset.author_email).nil? %>
|
||||||
<a class="commit-author-link has_tooltip"> <span class="commit-author-name">
|
<a class="commit-author-link has_tooltip"> <span class="commit-author-name">
|
||||||
<%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
<%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
||||||
<%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %></span></a>提交于
|
<%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %></span></a>提交于
|
||||||
<div class="committed_ago">
|
<div class="committed_ago">
|
||||||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %>前 </time>
|
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %>前 </time>
|
||||||
|
|
Loading…
Reference in New Issue