1. PullRequest后面加入请求数目
This commit is contained in:
parent
3e38b09219
commit
41ab10410f
|
@ -925,6 +925,12 @@ module ApplicationHelper
|
|||
s.html_safe
|
||||
end
|
||||
|
||||
# 计算Pull Request的请求数目
|
||||
def pull_request_count project
|
||||
g = Gitlab.client
|
||||
g.merge_requests(project.gpid).count
|
||||
end
|
||||
|
||||
#项目成员列表复选框生成
|
||||
def project_member_check_box_tags_ex name, principals
|
||||
s = ''
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<% if allow_pull_request(@project) > 0 && allow_show_pull_request(@project) > 0 %>
|
||||
<div class="subNav">
|
||||
<%= link_to "Pull Requests", project_pull_requests_path(@project), :class => "f14 c_blue02" %>
|
||||
<%= link_to "(#{pull_request_count(@project)})", project_pull_requests_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+新建请求", new_project_pull_request_path(:project_id => @project.id), :class => "subnav_green" %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue