Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject

This commit is contained in:
huang 2016-10-19 09:30:37 +08:00
commit 83eaa4d9db
3 changed files with 195 additions and 200 deletions

View File

@ -1,29 +1,26 @@
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
<div class="wrap-big">
<div class="project_r_h">
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
</div>
<div class="project_r_h" style="width:730px;">
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
</div>
<div class="repository_con " style="line-height:1.9;">
<%= render :partial => 'navigation' %>
<div class="cl"></div>
</div>
<div class="repository_con " style="line-height:1.9;">
<%= render :partial => 'navigation' %>
<div class="cl"></div>
</div>
<%= render :partial => 'link_to_functions' %>
<%= render :partial => 'link_to_functions' %>
<%= render_properties(@properties) %>
<%= render_properties(@properties) %>
<div class="mt10">
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
</div>
<div class="cl"></div>
<div class="mt10">
<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<% end %>
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
</div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<% end %>
<% html_title(l(:label_change_plural)) -%>
<script>
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
</script>
<% html_title(l(:label_change_plural)) -%>
</div>

View File

@ -1,74 +1,174 @@
<%= javascript_include_tag 'highcharts','highcharts-more' %>
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
<h2 class="project_h2"><%= l(:label_statistics) %></h2>
</div>
<% if false %>
<div class="flash notice">请在版本库中提交代码,统计信息将更准确</div>
<% else %>
<div class="repository_con " style="line-height:1.9;">
<%= render :partial => 'navigation' %>
<div class="cl"></div>
<div class="wrap-big" style="width:980px;">
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
<h2 class="project_h2"><%= l(:label_statistics) %></h2>
</div>
<% if false %>
<div class="flash notice">请在版本库中提交代码,统计信息将更准确</div>
<% else %>
<div class="repository_con " style="line-height:1.9;">
<%= render :partial => 'navigation' %>
<div class="cl"></div>
</div>
<div id = "container">
</div>
<div id = "container_code" class="mt30">
</div>
<div id = "container">
</div>
<div id = "container_code" class="mt30">
</div>
<script>
$(function () {
$('#container_code').highcharts({
chart: {
type: 'line'
},
title: {
text: '版本库代码提交行数',
style:{
fontSize: '14px'
}
},
subtitle: {
// text: 'Source: WorldClimate.com'
},
xAxis: {
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
},
yAxis: {
<script>
$(function () {
$('#container_code').highcharts({
chart: {
type: 'line'
},
title: {
text: '代码行数'
}
},
credits:{
enabled: false
},
tooltip: {
enabled: false,
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
}
},
plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
text: '版本库代码提交行数',
style:{
fontSize: '14px'
}
},
subtitle: {
// text: 'Source: WorldClimate.com'
},
xAxis: {
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
},
yAxis: {
title: {
text: '代码行数'
}
},
line: {
dataLabels: {
enabled: true
credits:{
enabled: false
},
tooltip: {
enabled: false,
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
}
},
plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
},
enableMouseTracking: false
}
},
series: [
{
name: '<b style="font-weight:normal ">总变更</b>',
color: '#d05d5a',
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
series: [
{
name: '<b style="font-weight:normal ">总变更</b>',
color: '#d05d5a',
fontWeight: 'normal',
data: <%= @static_total_per_user.map{|c| c.changes.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
},
{
name: '<b style="font-weight:normal ">改动或增加</b>',
color: '#5b6b76',
data: <%= @static_total_per_user.map{|c| c.add.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
},
{
name: '<b style="font-weight:normal ">删除</b>',
color: '#84b5bb',
data: <%= @static_total_per_user.map{|c| c.del.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
}]
});
// 代码提交次数统计
$('#container').highcharts({
chart: {
type: 'line'
},
credits:{
enabled: false
},
title: {
text: '版本库代码提交次数',
style:{
fontSize: '14px'
}
},
subtitle: {
// text: 'Source: WorldClimate.com'
},
xAxis: {
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
},
yAxis: {
title: {
text: '次'
}
},
tooltip: {
enabled: false,
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
}
},
plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
},
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
series: [{
name: '<b style="font-weight:normal ">提交次数</b>',
fontWeight: 'normal',
data: <%= @static_total_per_user.map{|c| c.changes.to_i} %>,
color: '#d05d5a',
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
data: <%= @static_total_per_user.map{|c| c.commits_num.to_i} %>,
dataLabels: {
enabled: true,
style: {
@ -80,120 +180,18 @@
}
},
lineWidth: 1.5
},
{
name: '<b style="font-weight:normal ">改动或增加</b>',
color: '#5b6b76',
data: <%= @static_total_per_user.map{|c| c.add.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
},
{
name: '<b style="font-weight:normal ">删除</b>',
color: '#84b5bb',
data: <%= @static_total_per_user.map{|c| c.del.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
}]
}
// {
// name: 'London',
// data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
// }
]
});
});
</script>
// 代码提交次数统计
$('#container').highcharts({
chart: {
type: 'line'
},
credits:{
enabled: false
},
title: {
text: '版本库代码提交次数',
style:{
fontSize: '14px'
}
},
subtitle: {
// text: 'Source: WorldClimate.com'
},
xAxis: {
// categories: ["Jan", "Jan", "Jan", 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
categories: <%= raw(@static_total_per_user.map{|c| c.uname}) %>
},
yAxis: {
title: {
text: '次'
}
},
tooltip: {
enabled: false,
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+this.x +': '+ this.y +'°C';
}
},
plotOptions: {
series: {
marker: {
radius: 3, //曲线点半径默认是4
symbol: 'circle' //曲线点类型:"circle", "square", "diamond", "triangle","triangle-down",默认是"circle"
}
},
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: false
}
},
series: [{
name: '<b style="font-weight:normal ">提交次数</b>',
fontWeight: 'normal',
color: '#d05d5a',
// data: [7.0, 6.9, 9.5, 14.5, 18.4, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
data: <%= @static_total_per_user.map{|c| c.commits_num.to_i} %>,
dataLabels: {
enabled: true,
style: {
fontSize: '13px',
color: '#aaa',
fontFamily: 'Arial',
textShadow: '0px 0px 6px rgb(0, 0, 0), 0px 0px 3px rgb(f, f, f)',
fontWeight: 'normal'
}
},
lineWidth: 1.5
}
// {
// name: 'London',
// data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
// }
]
});
});
</script>
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
<% html_title(l(:label_repository), l(:label_statistics)) -%>
<% end %>
<script>
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
</script>
<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
<% html_title(l(:label_repository), l(:label_statistics)) -%>
<% end %>
</div>

View File

@ -8,7 +8,7 @@
#LSide{ width:240px;}
#RSide{ width:670px; background:#fff; padding:10px; margin-left: 10px; margin-bottom:10px;}
.courseRSide{ width:730px; background:#fff; padding:10px; margin-left: 10px; margin-bottom:10px;}
.wrap-big {background:#fff; padding:10px; margin-bottom:10px;}
.wrap-big {width:980px; background:#fff; padding:10px; margin-bottom:10px;}
/*资源库*/
.resources {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;float: right}
.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;}