2016-11-25 11:32:45 +08:00
|
|
|
|
<% if @request.state == "closed" %>
|
2016-11-25 15:15:29 +08:00
|
|
|
|
<div class="alert alert-orange mb15 ">
|
|
|
|
|
该请求已被关闭
|
|
|
|
|
</div>
|
2016-11-25 11:32:45 +08:00
|
|
|
|
<% elsif @commits_count == 0 %>
|
2016-11-25 15:15:29 +08:00
|
|
|
|
<div class="alert alert-orange mb15 ">
|
|
|
|
|
项目分支 <%= @request.source_branch %> 和 <%= @request.target_branch %> 似乎没有差异,请将新改动提交至源分支或者切换到其它目标分支
|
|
|
|
|
</div>
|
2016-12-15 17:03:59 +08:00
|
|
|
|
<% elsif @request.try(:merge_status) == "cannot_be_merged" %>
|
|
|
|
|
<div class="alert alert-orange mb15 ">
|
|
|
|
|
Pull Request中存在冲突,请先解决冲突或者手动进行合并。
|
|
|
|
|
</div>
|
2016-11-25 11:32:45 +08:00
|
|
|
|
<% else %>
|
|
|
|
|
<% if is_project_manager?(User.current.id, @project.id) %>
|
|
|
|
|
<div class="alert alert-orange mb15 ">
|
2016-12-13 13:33:55 +08:00
|
|
|
|
在管理员接受后,将由系统自动合并。
|
|
|
|
|
<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %></a>
|
2016-11-25 11:32:45 +08:00
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|