版本库统计show权限统计
This commit is contained in:
parent
c87611dfec
commit
2a00c4ddd7
|
@ -320,7 +320,7 @@ class ProjectsController < ApplicationController
|
||||||
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public = ? and forge_act_type != ? ",@project,1, "Document").order("created_at desc").page(params['page'|| 1]).per(10);
|
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public = ? and forge_act_type != ? ",@project,1, "Document").order("created_at desc").page(params['page'|| 1]).per(10);
|
||||||
end
|
end
|
||||||
g = Gitlab.client
|
g = Gitlab.client
|
||||||
unless @project.gpid.nil?
|
unless @project.gpid.nil? || @project.project_score.changeset_num == 0
|
||||||
@static_total_per_user = g.rep_stats(@project.gpid)
|
@static_total_per_user = g.rep_stats(@project.gpid)
|
||||||
end
|
end
|
||||||
# 根据对应的请求,返回对应的数据
|
# 根据对应的请求,返回对应的数据
|
||||||
|
|
|
@ -29,12 +29,14 @@
|
||||||
<!--CONTENT LIST-->
|
<!--CONTENT LIST-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<% unless @project.gpid.nil? || @project.project_score.changeset_num == 0 %>
|
||||||
<div class="resources mt10">
|
<div class="resources mt10">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<%= render :partial => "rep_static" %>
|
<%= render :partial => "rep_static" %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= render :partial => "project_activities", :locals => {:forge_acts => @events_pages, :page => 0, :type => @type} %>
|
<%= render :partial => "project_activities", :locals => {:forge_acts => @events_pages, :page => 0, :type => @type} %>
|
||||||
</div>
|
</div>
|
|
@ -25,7 +25,7 @@
|
||||||
<textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" ><%= @repository.type.to_s=="Repository::Gitlab" ? @repos_url.to_s.lstrip : @repository.url %></textarea>
|
<textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" ><%= @repository.type.to_s=="Repository::Gitlab" ? @repos_url.to_s.lstrip : @repository.url %></textarea>
|
||||||
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a>
|
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a>
|
||||||
<div class="fl mt5 ml15">
|
<div class="fl mt5 ml15">
|
||||||
<%=link_to "统计", stats_repository_project_path(:id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :creator => @creator ), :class => "fl vl_zip" %>
|
<%=link_to "统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator ), :class => "fl vl_zip" %>
|
||||||
</div>
|
</div>
|
||||||
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %>
|
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %>
|
||||||
<% if User.current.id != @project.user_id %>
|
<% if User.current.id != @project.user_id %>
|
||||||
|
|
Loading…
Reference in New Issue