From c148a8a14558538bb405f25fe94e72e44ad2f9a9 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 13 May 2015 16:24:46 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=A7=81=E6=9C=89=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E5=85=A8=E4=BC=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layouts/_base_development_group.html.erb | 22 +++++++++++++------ .../settings/_new_repositories.html.erb | 2 +- app/views/repositories/show.html.erb | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/app/views/layouts/_base_development_group.html.erb b/app/views/layouts/_base_development_group.html.erb index 49719fbd5..6d6e0eed1 100644 --- a/app/views/layouts/_base_development_group.html.erb +++ b/app/views/layouts/_base_development_group.html.erb @@ -39,13 +39,21 @@ <% end %> <%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %> - <% unless @project.hidden_repo || @project.enabled_modules.where("name = 'repository'").empty? || @project.repositories.count == 0 %> - - <% end %> - + <% unless @project.enabled_modules.where("name = 'repository'").empty? || @project.repositories.count == 0 %> + <% if @project.hidden_repo || !@project.is_public? %> + <% if User.current.member_of?(@project) %> + + <% end %> + <% else %> + + <% end %> + <% end %>