diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 5c8d194b9..517fa327c 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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); end 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) end # 根据对应的请求,返回对应的数据 diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 63d7d583f..72a419f55 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -29,12 +29,14 @@ + <% unless @project.gpid.nil? || @project.project_score.changeset_num == 0 %>
<%= render :partial => "rep_static" %>
+ <% end %> <%= render :partial => "project_activities", :locals => {:forge_acts => @events_pages, :page => 0, :type => @type} %> \ No newline at end of file diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 4dfa86538..b3cad6ced 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -25,7 +25,7 @@
- <%=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" %>
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %> <% if User.current.id != @project.user_id %>