Merge branch 'rep_quality' of https://git.trustie.net/jacknudt/trustieforge into rep_quality
Conflicts: app/views/pull_requests/_show.html.erb
This commit is contained in:
commit
9eb084c3bd
|
@ -13,7 +13,8 @@
|
|||
<!--<select name="source_branch" value="source_branch" class="ml30 fontGrey3 fb fl"><option>master</option><option>develop</option><option>rep_quality</option></select>-->
|
||||
<div class="cl mb10"></div>
|
||||
<div class="merge-option-name fl" style="padding:5px 0">目标分支</div>
|
||||
<%= select_tag :branch, options_for_select(@rev), :name => "target_branch", :value => "target_branch", :class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;" %>
|
||||
<%= select_tag :branch, options_for_select(@rev), :name => "target_branch", :value => "target_branch", :class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetProject" %>
|
||||
<%= select_tag :branch, options_for_select(@rev), :name => "target_branch", :value => "target_branch", :class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetBranch" %>
|
||||
<!--<select name="target_branch" value="source_branch" class="ml30 fontGrey3 fb fl"><option>master</option><option>hjq_course</option><option>hjq_beidou</option><option>develop</option><option>dev_huang</option></select>-->
|
||||
<div class="cl"></div>
|
||||
<p class="fl ml100 mt10"><a href="javascript:void(0);" class="fr linkGrey2">修改分支</a></p>
|
||||
|
@ -50,4 +51,10 @@
|
|||
$("#pull_request_form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
//切换项目时,替换分支
|
||||
$("#targetProject").change(function(){
|
||||
var defaultBranch = $("#targetBranch option:first-child").val();
|
||||
$("#targetBranch").val(defaultBranch);
|
||||
});
|
||||
</script>
|
|
@ -9,27 +9,21 @@
|
|||
<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 %>
|
||||
<% if @request.state == "merged" %>
|
||||
|
||||
|
||||
6666
|
||||
<% 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), :remote => true, :class => "BlueCirBtn" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<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">
|
||||
<% if @commits_count == 0 && @changes_count == 0 %>
|
||||
<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>
|
||||
<% else %>
|
||||
<% if @request.state == "merged" %>
|
||||
<span class="fontGrey3 fb" style="font-size:13px;"><a href="javascript:void(0);" class="link-blue"> Hjqreturn</a>于两小时前合并</span><br />
|
||||
<p class="fontGrey2 mt5">改动已合并至<%= @request.target_branch %></p>
|
||||
<% else %>
|
||||
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn" %>
|
||||
<% end %>
|
||||
</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>
|
||||
|
|
Loading…
Reference in New Issue