pull request 添加一些判断

This commit is contained in:
huang 2016-10-27 10:10:06 +08:00
parent 0e15ac00be
commit 03bfbf777a
1 changed files with 18 additions and 3 deletions

View File

@ -25,9 +25,24 @@
</div> </div>
</div> </div>
</div> </div>
<% if @request.state == "merged" %>
<div class="alert alert-orange mb15 ">
改动已合并至 <%= @request.target_branch %> 分支
</div>
<% else %>
<% if is_project_manager?(User.current.id, @project.id) %>
<% if @request.state == "closed" %>
该请求已被关闭
<% else %>
<div class="alert alert-orange mb15 "> <div class="alert alert-orange mb15 ">
在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %></a> 在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %></a>
</div> </div>
<% end %>
<% end %>
<% end %>
<div class="new_roadmap_conbox mb10" > <div class="new_roadmap_conbox mb10" >
<div class=" clear"> <div class=" clear">
<ul class="new_roadmap_nav fl" > <ul class="new_roadmap_nav fl" >