From c148a8a14558538bb405f25fe94e72e44ad2f9a9 Mon Sep 17 00:00:00 2001
From: huang
Date: Wed, 13 May 2015 16:24:46 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A7=81=E6=9C=89=E9=A1=B9=E7=9B=AE=E7=89=88?=
=?UTF-8?q?=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 %>
-
- <%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
-
(<%= @project.repositories.count %>)
-
- <% 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) %>
+
+ <%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
+
(<%= @project.repositories.count %>)
+
+ <% end %>
+ <% else %>
+
+ <%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
+
(<%= @project.repositories.count %>)
+
+ <% end %>
+ <% end %>
<%= l(:label_project_more) %>
diff --git a/app/views/projects/settings/_new_repositories.html.erb b/app/views/projects/settings/_new_repositories.html.erb
index c2606f791..6e0d74849 100644
--- a/app/views/projects/settings/_new_repositories.html.erb
+++ b/app/views/projects/settings/_new_repositories.html.erb
@@ -75,7 +75,7 @@
<% unless judge_main_repository(@project) %>
-
- <%= f.check_box :is_default, :label => "" %>
+ <%= f.check_box :is_default, :label => "", :no_label => true %>
<% end %>
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index 247e65554..1cb5942bf 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -112,8 +112,8 @@
<%= l(:label_latest_revision_plural) %>
<%= render :partial => 'revisions',
- :locals => {:project => @project, :path => @path,
- :revisions => @changesets, :entry => nil} %>
+ :locals => {:project => @project, :path => @path,
+ :revisions => @changesets, :entry => nil} %>
<% end %>
<% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)