From a58cebdf5c2b64aa2cf332c04f2c680ae20b9f18 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 18 Oct 2016 17:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=94=B9=E5=8A=A8=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AE=BD=E5=BA=A6=E6=89=A9=E5=B1=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/changes.html.erb | 41 ++- app/views/repositories/stats.html.erb | 352 ++++++++++++------------ public/stylesheets/css/public.css | 2 +- 3 files changed, 195 insertions(+), 200 deletions(-) diff --git a/app/views/repositories/changes.html.erb b/app/views/repositories/changes.html.erb index b7e744288..94abb04e5 100644 --- a/app/views/repositories/changes.html.erb +++ b/app/views/repositories/changes.html.erb @@ -1,29 +1,26 @@ <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %> +
+
+

<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

+
-
-

<%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

-
+
+ <%= render :partial => 'navigation' %> +
+
-
- <%= render :partial => 'navigation' %> -
-
+ <%= render :partial => 'link_to_functions' %> -<%= render :partial => 'link_to_functions' %> + <%= render_properties(@properties) %> -<%= render_properties(@properties) %> +
+ <%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %> +
+
-
+ <% 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? %> - -
-<% content_for :header_tags do %> -<%= stylesheet_link_tag "scm" %> -<% end %> - -<% html_title(l(:label_change_plural)) -%> - - + <% html_title(l(:label_change_plural)) -%> +
\ No newline at end of file diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index f14022810..f7a875a33 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -1,74 +1,174 @@ <%= javascript_include_tag 'highcharts','highcharts-more' %> -
-

<%= l(:label_statistics) %>

-
-<% if false %> -
请在版本库中提交代码,统计信息将更准确
-<% else %> -
- <%= render :partial => 'navigation' %> -
+
+
+

<%= l(:label_statistics) %>

+ <% if false %> +
请在版本库中提交代码,统计信息将更准确
+ <% else %> +
+ <%= render :partial => 'navigation' %> +
+
-
-
-
-
+
+
+
+
- -// 代码提交次数统计 - $('#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 ''+ this.series.name +'
'+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: '提交次数', - 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] -// } - ] - }); - }); - - -

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

- <% html_title(l(:label_repository), l(:label_statistics)) -%> -<% end %> - - \ No newline at end of file +

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

+ <% html_title(l(:label_repository), l(:label_statistics)) -%> + <% end %> +
\ No newline at end of file diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index b8538ab90..04f2bae89 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -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;}