Merge branch 'rep_quality' of https://git.trustie.net/jacknudt/trustieforge into rep_quality

Conflicts:
	app/views/pull_requests/new.html.erb
This commit is contained in:
huang 2016-08-03 11:09:14 +08:00
commit 1cb6809bdf
5 changed files with 177 additions and 3 deletions

View File

@ -48,7 +48,7 @@ class PullRequestsController < ApplicationController
end end
def show def show
@request = @g.merge_request(@rpoject.gpid, id) #@request = @g.merge_request(@rpoject.gpid, id)
end end
# Accept a merge request. # Accept a merge request.

View File

@ -0,0 +1,3 @@
<script>
$("#RSide").before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>");
</script>

View File

@ -1,2 +1,83 @@
<%= render :partial => "pull_requests/new" %> <%= render :partial => "pull_requests/pull_request_container" %>
<div id="new-merge-request" class="new-merge-request">
<div class="f14 fontGrey3 fb mb10">新的合并请求</div>
<div>
<span class="fl fontGrey2">从 <span class="fontGrey3 fb">dev_huang</span> 合并至 <span class="fontGrey3 fb">master</span></span><a href="javascript:void(0);" class="fr linkGrey2">修改分支</a>
<div class="cl"></div>
</div>
</div>
<%= render :partial => "pull_requests/form" %>
<ul class="merge-record">
<li><a href="javascript:void(0);" class="active">提交<span class="project-number-dot">1</span></a></li>
<li><a href="javascript:void(0);">改动<span class="project-number-dot">1</span></a></li>
</ul>
<div class="new-merge-row b_grey fontGrey2"><span class="ml10"> 根据最近提交时间排列</span></div>
<div class="new-merge-wrap" id="merge_record_0">
<div class="merge-commit-time">
<img width="16" class="ui-datepicker-trigger mr15" style="cursor:default; margin-top:3px; margin-left:0;" /><span class="fontGrey3">2016-08-02</span>
<p class="mt10 fontGrey2">1次提交</p>
</div>
<div class="merge-commit-detail">
<span class="fontGrey3 fb">第一次提交</span>
<p class="mt10 fontGrey2">黄井泉创建于24小时前</p>
</div>
<div class="merge-commit-code">
<span class="fontGrey3">5202e2ef</span>
<p class="mt10"><a href="javascript:void(0);" class="link-blue">浏览文件</a></p>
</div>
<div class="cl"></div>
</div>
<div id="merge_record_1" class="undis">
<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>
<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/users/_user_homework_detail.html.erb</a> </li>
</ol>
</div>
<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 class="showing-changes-detail" style="width:750px; margin:0 -10px;">
<table class="changes-detail-chart">
<tr>
<td class="diff-line-number fontGrey2">99</td>
<td class="diff-line-number fontGrey2">99</td>
<td class="fontGrey2 p10">&lt;% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %&gt;</td>
</tr>
<tr>
<td class="diff-line-number fontGrey2">100</td>
<td class="diff-line-number fontGrey2">100</td>
<td class="fontGrey2 p10">&lt;div class="mt10"&gt;</td>
</tr>
<tr>
<td class="diff-line-number fontGrey2 number-line-old">111</td>
<td class="diff-line-number fontGrey2 number-line-old"></td>
<td class="fontGrey2 p10 code-line-old">- &lt;div class="fl mr5 fontGrey3"&gt;</td>
</tr>
<tr class="code-line-new">
<td class="diff-line-number fontGrey2 number-line-new"></td>
<td class="diff-line-number fontGrey2 number-line-new">111</td>
<td class="fontGrey2 p10 code-line-new">+ &lt;div class="fl mr20 fontGrey3 w80"&gt;</td>
</tr>
</table>
</div>
</div>
<script>
$("#new-merge-request").parent().css("width","730px");
$("#changed-files").toggle(function(){
$("#changed-files-detail").show();
},function(){
$("#changed-files-detail").hide();
});
$(".merge-record li a").click(function(){
$(".merge-record li a").removeClass("active");
$(this).addClass("active");
var index = $(".merge-record li a").index(this);
$("#merge_record_0, #merge_record_1").hide();
$("#merge_record_" + index).show();
});
</script>

View File

@ -0,0 +1,87 @@
<%= render :partial => "pull_requests/pull_request_container" %>
<div id="mergeShow" class="f14 fontGrey2 merge-show">
<span class="mr10 open-status">待处理</span><span class="mr10">合并请求</span> #1 · 由黄井泉于2小时前提交 · 最后编辑时间1小时前
<a href="javascript:void(0);" class="BlueCirBtnMini fr mt5">编辑</a>
<div class="cl"></div>
</div>
<div class="new-merge-row b_grey"><strong>请合并我的代码</strong><p class="mt10">Pull Request</p></div>
<div class="mt10 mb15">
请求将 <span class="fontGrey3 fb">rep_quality</span> 合并至 <span class="fontGrey3 fb">develop</span>
<div class="merge-commit-option mt15">
<a href="javascript:void(0);" class="BlueCirBtn">接受请求</a>
</div>
</div>
<ul class="merge-record" style="border-top:1px solid #ddd;">
<li><a href="javascript:void(0);" class="active">提交<span class="project-number-dot">1</span></a></li>
<li><a href="javascript:void(0);">改动<span class="project-number-dot">1</span></a></li>
</ul>
<div class="new-merge-row b_grey fontGrey2"><span class="ml10"> 根据最近提交时间排列</span></div>
<div class="new-merge-wrap" id="merge_record_0">
<div class="merge-commit-time">
<img width="16" class="ui-datepicker-trigger mr15" style="cursor:default; margin-top:3px; margin-left:0;" /><span class="fontGrey3">2016-08-02</span>
<p class="mt10 fontGrey2">1次提交</p>
</div>
<div class="merge-commit-detail">
<span class="fontGrey3 fb">第一次提交</span>
<p class="mt10 fontGrey2">黄井泉创建于24小时前</p>
</div>
<div class="merge-commit-code">
<span class="fontGrey3">5202e2ef</span>
<p class="mt10"><a href="javascript:void(0);" class="link-blue">浏览文件</a></p>
</div>
<div class="cl"></div>
</div>
<div id="merge_record_1" class="undis">
<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>
<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/users/_user_homework_detail.html.erb</a> </li>
</ol>
</div>
<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 class="showing-changes-detail" style="width:750px; margin:0 -10px;">
<table class="changes-detail-chart">
<tr>
<td class="diff-line-number fontGrey2">99</td>
<td class="diff-line-number fontGrey2">99</td>
<td class="fontGrey2 p10">&lt;% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %&gt;</td>
</tr>
<tr>
<td class="diff-line-number fontGrey2">100</td>
<td class="diff-line-number fontGrey2">100</td>
<td class="fontGrey2 p10">&lt;div class="mt10"&gt;</td>
</tr>
<tr>
<td class="diff-line-number fontGrey2 number-line-old">111</td>
<td class="diff-line-number fontGrey2 number-line-old"></td>
<td class="fontGrey2 p10 code-line-old">- &lt;div class="fl mr5 fontGrey3"&gt;</td>
</tr>
<tr class="code-line-new">
<td class="diff-line-number fontGrey2 number-line-new"></td>
<td class="diff-line-number fontGrey2 number-line-new">111</td>
<td class="fontGrey2 p10 code-line-new">+ &lt;div class="fl mr20 fontGrey3 w80"&gt;</td>
</tr>
</table>
</div>
</div>
<script>
$("#mergeShow").parent().css("width","730px");
$("#changed-files").toggle(function(){
$("#changed-files-detail").show();
},function(){
$("#changed-files-detail").hide();
});
$(".merge-record li a").click(function(){
$(".merge-record li a").removeClass("active");
$(this).addClass("active");
var index = $(".merge-record li a").index(this);
$("#merge_record_0, #merge_record_1").hide();
$("#merge_record_" + index).show();
});
</script>

View File

@ -538,3 +538,6 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
.merge-commit-time {width:200px; float:left;} .merge-commit-time {width:200px; float:left;}
.merge-commit-detail {width:380px; float:left;} .merge-commit-detail {width:380px; float:left;}
.merge-commit-code {width:150px; float:left; text-align:right;} .merge-commit-code {width:150px; float:left; text-align:right;}
.merge-show {margin:-10px -10px 0 -10px; padding:10px; line-height:36px; border-bottom:1px solid #ddd;}
.open-status {color:#fff; padding:0 16px; background-color:#3b94d6; border-radius:2px; display:inline-block;}
.merge-commit-option {padding:12px; border:1px solid #ddd; background-color:#f9f9f9; border-radius:2px;}