diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 3cec4cbc7..d0ec28317 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -837,11 +837,7 @@ module ApplicationHelper
return false if project.gpid.nil?
g = Gitlab.client
count = g.user_static(project.gpid, :rev => "master").count
- if User.current.member_of?(project) && count > 0
- true
- else
- false
- end
+ count
end
# 判断版本库是否初始为gitlab
diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb
index 82bcb5501..52f4e002a 100644
--- a/app/views/projects/_development_group.html.erb
+++ b/app/views/projects/_development_group.html.erb
@@ -40,12 +40,14 @@
<% end %>
-
- <%= link_to "Pull Requests", project_pull_requests_path(@project), :class => "f14 c_blue02" %>
- <% if allow_pull_request(@project) %>
- <%= link_to "+新建请求", new_project_pull_request_path(:project_id => @project.id), :class => "subnav_green" %>
- <% end %>
-
+<% if allow_pull_request(@project) %>
+
+ <%= link_to "Pull Requests", project_pull_requests_path(@project), :class => "f14 c_blue02" %>
+ <% if User.current.member_of?(@project) %>
+ <%= link_to "+新建请求", new_project_pull_request_path(:project_id => @project.id), :class => "subnav_green" %>
+ <% end %>
+
+<% end %>
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
<% if visible_repository?(@project) %>
diff --git a/app/views/pull_requests/index.html.erb b/app/views/pull_requests/index.html.erb
index f4fe0725e..2af67293f 100644
--- a/app/views/pull_requests/index.html.erb
+++ b/app/views/pull_requests/index.html.erb
@@ -3,7 +3,7 @@
<%= link_to "待处理#{@requests_opened_count}".html_safe, project_pull_requests_path(:type => "1"), :remote => true %>
<%= link_to "已处理#{@requests_merged_count}".html_safe, project_pull_requests_path(:type => "2"), :remote => true %>
<%= link_to "已关闭#{@requests_closed_count}".html_safe, project_pull_requests_path(:type => "3"), :remote => true %>
- <% if allow_pull_request(@project) %>
+ <% if allow_pull_request(@project) && User.current.member_of?(@project) %>
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "BlueCirBtn fr ml10 mt10", :style => "width:110px;" %>
<% end %>