diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 4009000ed..bfeda25e4 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -886,14 +886,14 @@ module ApplicationHelper
# 项目版本库可见权限判断:
# modules中设置可见
# 版本库存在
- # 版本库设置了隐藏则仅仅项目成员可见(hidden_repo:1 隐藏版本库)
+ # 版本库设置了隐藏则仅仅项目成员或超级管理员可见(hidden_repo:1 隐藏版本库)
# return -> true 可见
def visible_repository?(project)
repository = Repository.where(:project_id => project.id, :type => "Repository::Gitlab").first
if project.enabled_modules.where("name = 'repository'").empty? || repository.nil?
result = false
else
- result = (project.hidden_repo && !User.current.member_of?(project)) ? false : true
+ result = (project.hidden_repo && !User.current.admin && !User.current.member_of?(project)) ? false : true
end
end
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb
index 8424dd403..8f3630d29 100644
--- a/app/helpers/watchers_helper.rb
+++ b/app/helpers/watchers_helper.rb
@@ -366,10 +366,10 @@ module WatchersHelper
def store_project_link project_id, user_id
collected = Member.where(:project_id => project_id, :user_id => user_id).first.try(:is_collect)
- text = collected == 1 ? l(:label_project_collect) : l(:label_project_collect_cancel)
+ text = collected == 1 ? l(:label_project_collect_cancel) : l(:label_project_collect)
url = store_mine_project_path(project_id)
method = 'post'
- link = link_to(text, url, :remote => true, :method => method, :id => "#{project_id}", :class => "pro_new_topbtn_left fl", :title => "点击将其从个人主页的项目列表中移除")
+ link = link_to(text, url, :remote => true, :method => method, :id => "#{project_id}", :class => "pro_new_topbtn_left fl", :title => "#{collected == 1 ? '点击将其从个人主页的项目列表中移除' : '点击将其添加至人主页的项目列表中'}")
# link.html_safe
end
diff --git a/app/views/layouts/_base_project_top.html.erb b/app/views/layouts/_base_project_top.html.erb
index 222998a73..e5a5480f1 100644
--- a/app/views/layouts/_base_project_top.html.erb
+++ b/app/views/layouts/_base_project_top.html.erb
@@ -3,7 +3,6 @@
<% project_acts = ForgeActivity.where("project_id = ?", @project.id).count %>
<% raodmaps = Version.where("project_id = ?", @project.id).count %>
<% project_score = @project.project_score %>
-<% project_modules = @project.enabled_modules.where("name = 'issue_tracking'") %>
<%# 更新访问数,刷新的时候更新访问次数 %>
<% update_visiti_count @project %>
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index f5a531565..069b2cc55 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -13,16 +13,6 @@
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
-
-
-
-
@@ -58,6 +48,16 @@
<%= call_hook :view_layouts_base_body_bottom %>