From f9c4c4b86f6c5f0ca6254854a1fd017e3419274c Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 13 Apr 2016 16:03:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E5=88=86=E6=94=AF=E4=B9=8B=E9=97=B4=E7=9A=84=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 4 ++-- app/views/repositories/stats.html.erb | 23 +++++----------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 0475764d9..f8cbcec7c 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -573,8 +573,8 @@ update g = Gitlab.client begin @static_total_per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 1) - @static_month__per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 2) - @static_week_per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 3) + #@static_month__per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 2) + # @static_week_per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 3) rescue render_404 return diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index 5739eb35a..091ab79cd 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -4,6 +4,11 @@ <% if false %>
请在版本库中提交代码,统计信息将更准确
<% else %> +
+ <%= render :partial => 'navigation' %> +
+
+
删除 是版本库的提交次数, 显示为橘红色。

变更 是对版本库中文件的修改次数, 显示为蓝色。
@@ -35,24 +40,6 @@ <% end %>

-

月情况

- <% @static_month__per_user.each do |commit| %> -

总提交次数

- <%= commit.commits_num %> -

总提交代码量

- <%= commit.add %> - <%= commit.del %> - <% end %> -
-
-

周情况

- <% @static_week_per_user.each do |commit| %> -

总提交次数

- <%= commit.commits_num %> -

总提交代码量

- <%= commit.add %> - <%= commit.del %> - <% end %>

<%= link_to l(:button_back), :action => 'show', :id => @project %>