Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
922bb0167c
|
@ -449,6 +449,8 @@ update
|
||||||
def stats
|
def stats
|
||||||
@project_id = params[:id]
|
@project_id = params[:id]
|
||||||
@repository_id = @repository.identifier
|
@repository_id = @repository.identifier
|
||||||
|
# 提交次数统计
|
||||||
|
@status_commit_count = Changeset.count(:conditions => ["#{Changeset.table_name}.repository_id = ?", @repository.id])
|
||||||
render :layout => 'base_projects'
|
render :layout => 'base_projects'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,30 @@
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2"><%= l(:label_statistics) %></h2>
|
<h2 class="project_h2"><%= l(:label_statistics) %></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="riviseRed fl"></div><div class="fl">修订 是版本库的提交次数, 显示为橘红色。</div><br>
|
<% if @status_commit_count ==0 %>
|
||||||
<div class="changeBlue fl"></div><div class="fl">变更 是对版本库中文件的修改次数, 显示为蓝色。</div>
|
<div class="flash notice">该项目目前还没有提交过代码!</div>
|
||||||
<p style="padding-top:35px;">
|
<% else %>
|
||||||
<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
|
<div class="riviseRed fl"></div><div class="fl">修订 是版本库的提交次数, 显示为橘红色。</div><br>
|
||||||
</p>
|
<div class="changeBlue fl"></div><div class="fl">变更 是对版本库中文件的修改次数, 显示为蓝色。</div>
|
||||||
<p style="padding-top: 50px;">
|
|
||||||
<%# 用户每月提交代码次数 %>
|
<p style="padding-top:35px;">
|
||||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
|
<%= tag("embed", :width => 670, :height => 300, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_month")) %>
|
||||||
</p>
|
</p>
|
||||||
<p style="padding-top: 50px;">
|
<p style="padding-top: 50px;">
|
||||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %>
|
<%# 用户每月提交代码次数 %>
|
||||||
</p>
|
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "commits_per_author")) %>
|
||||||
<p style="padding-top: 50px;">
|
</p>
|
||||||
<%# 用户最近六个月的提交次数 %>
|
<p style="padding-top: 50px;">
|
||||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %>
|
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_per_month")) %>
|
||||||
</p>
|
</p>
|
||||||
<p style="padding-top: 50px;">
|
<p style="padding-top: 50px;">
|
||||||
<%# 用户最近六个月的代码量 %>
|
<%# 用户最近六个月的提交次数 %>
|
||||||
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %>
|
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_commits_six_month")) %>
|
||||||
</p>
|
</p>
|
||||||
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
<p style="padding-top: 50px;">
|
||||||
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
<%# 用户最近六个月的代码量 %>
|
||||||
|
<%= tag("embed", :width => 670, :height => 400, :type => "image/svg+xml", :src => url_for(:controller => 'repositories', :action => 'graph', :id => @project, :repository_id => @repository.identifier_param, :graph => "author_code_six_months")) %>
|
||||||
|
</p>
|
||||||
|
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
|
||||||
|
<% html_title(l(:label_repository), l(:label_statistics)) -%>
|
||||||
|
<% end %>
|
Loading…
Reference in New Issue