Merge branch 'rep_quality' of https://git.trustie.net/jacknudt/trustieforge into rep_quality
This commit is contained in:
commit
6f1b7f827e
4
Gemfile
4
Gemfile
|
@ -50,10 +50,10 @@ gem 'elasticsearch-model'
|
|||
gem 'elasticsearch-rails'
|
||||
|
||||
#rails 3.2.22.2 bug
|
||||
gem "test-unit", "~>3.0"
|
||||
# gem "test-unit", "~>3.0"
|
||||
|
||||
### profile
|
||||
gem 'oneapm_rpm'
|
||||
# gem 'oneapm_rpm'
|
||||
|
||||
group :development do
|
||||
gem 'grape-swagger'
|
||||
|
|
|
@ -1,19 +1,16 @@
|
|||
<div id="pull_request_new_form">
|
||||
<div id="create_pull_request_error">
|
||||
<%= render :partial => "pull_requests/error_message" %>
|
||||
</div>
|
||||
|
||||
<div id="new-merge-request" class="new-merge-request">
|
||||
<div 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" %>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#new-merge-request").parent().css("width","730px");
|
||||
$("#pull_request_new_form").parent().css("width","730px");
|
||||
|
||||
$("#changed-files").toggle(function(){
|
||||
$("#changed-files-detail").show();
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
<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"><%= format_date(commit.created_at) %></span>
|
||||
<!--<p class="mt10 fontGrey2">1次提交</p>-->
|
||||
<p class="mt10 fontGrey2"><%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于<%= time_tag(commit.created_at) %>前</p>
|
||||
</div>
|
||||
<div class="merge-commit-detail">
|
||||
<span class="fontGrey3 fb"><%= commit.title %></span>
|
||||
<p class="mt10 fontGrey2"><%= link_to commit.author_name, user_path(get_user_by_mail(commit.author_email)), :class => "link-blue" %>创建于24小时前</p>
|
||||
|
||||
</div>
|
||||
<div class="merge-commit-code">
|
||||
<span class="fontGrey3">
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<div id="mergeShow" class="f14 fontGrey2 merge-show">
|
||||
<span class="mr10 open-status">待处理</span><span class="mr10">合并请求</span> 由<%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %>于<%= time_tag(@request.created_at) %>提交 · 最后编辑时间<%= time_tag(@request.updated_at) %>
|
||||
<!--<a href="javascript:void(0);" class="BlueCirBtnMini fr mt5">编辑</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="new-merge-row b_grey"><strong><%= @request.title %></strong><p class="mt10"><%= @request.description %></p></div>
|
||||
<% if @commits_count == 0 && @changes_count == 0 %>
|
||||
<div class="mt10 mb15">
|
||||
请求将 <span class="fontGrey3 fb"><%= @request.source_branch %></span> 合并至 <span class="fontGrey3 fb"><%= @request.target_branch %></span>
|
||||
<div class="merge-commit-option mt15">
|
||||
<span class="fontGrey3 fb" style="font-size:13px;"><img src="/images/warning.png" width="16" class="mr5 mt2 fl"><%= @request.source_branch %>没有新内容可以合并至<%= @request.target_branch %></span><br />
|
||||
<p class="fontGrey2 mt5">请将新改动提交至源分支或者切换到其它目标分支</p>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="mt10 mb15">
|
||||
请求将 <span class="fontGrey3 fb"><%= @request.source_branch %></span> 合并至 <span class="fontGrey3 fb"><%= @request.target_branch %></span>
|
||||
<div class="merge-commit-option mt15">
|
||||
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="merge-record" style="border-top:1px solid #ddd;">
|
||||
<li><%= link_to "提交<span class='project-number-dot'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %></li>
|
||||
<li><%= link_to "改动<span class='project-number-dot'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => 2), :remote => true %></li>
|
||||
</ul>
|
||||
<div class="new-merge-row b_grey fontGrey2"><span class="ml10"> 根据最近提交时间排列</span></div>
|
||||
<div id="merge_record_0">
|
||||
<%= render :partial => "pull_requests/pull_request_commits" %>
|
||||
</div>
|
||||
<div id="merge_record_1" class="undis">
|
||||
<%= render :partial => "pull_requests/pull_request_changes" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<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>
|
|
@ -1,2 +1,3 @@
|
|||
<%= render :partial => "pull_requests/pull_request_container" %>
|
||||
<%= render :partial => "pull_requests/new" %>
|
||||
|
||||
|
|
|
@ -1,48 +1,2 @@
|
|||
<%= 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> 由<%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "link-blue" %>于<%= time_tag(@request.created_at) %>提交 · 最后编辑时间<%= time_tag(@request.updated_at) %>
|
||||
<!--<a href="javascript:void(0);" class="BlueCirBtnMini fr mt5">编辑</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="new-merge-row b_grey"><strong><%= @request.title %></strong><p class="mt10"><%= @request.description %></p></div>
|
||||
<div class="mt10 mb15">
|
||||
请求将 <span class="fontGrey3 fb"><%= @request.source_branch %></span> 合并至 <span class="fontGrey3 fb"><%= @request.target_branch %></span>
|
||||
<div class="merge-commit-option mt15">
|
||||
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %>
|
||||
</div>
|
||||
<div class="merge-commit-option mt15">
|
||||
<span class="fontGrey3 fb" style="font-size:13px;"><img src="/images/warning.png" width="16" class="mr5 mt2 fl">dev_huang没有新内容可以合并至develop</span><br />
|
||||
<p class="fontGrey2 mt5">请将新改动提交至源分支或者切换到其它目标分支</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="merge-record" style="border-top:1px solid #ddd;">
|
||||
<li><%= link_to "提交<span class='project-number-dot'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => 1), :remote => true, :class => "active" %></li>
|
||||
<li><%= link_to "改动<span class='project-number-dot'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => 2), :remote => true %></li>
|
||||
</ul>
|
||||
<div class="new-merge-row b_grey fontGrey2"><span class="ml10"> 根据最近提交时间排列</span></div>
|
||||
<div id="merge_record_0">
|
||||
<%= render :partial => "pull_requests/pull_request_commits" %>
|
||||
</div>
|
||||
<div id="merge_record_1" class="undis">
|
||||
<%= render :partial => "pull_requests/pull_request_changes" %>
|
||||
</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>
|
||||
<%= render :partial => "pull_requests/show" %>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
$("#pull_request_new_form").html('<%= escape_javascript(render :partial => "pull_requests/show") %>');
|
Loading…
Reference in New Issue