From faba8bfdadbbb088317f026bcca345e544c96d49 Mon Sep 17 00:00:00 2001 From: Tomasz Gieniusz Date: Sun, 21 Oct 2012 13:54:35 +0200 Subject: [PATCH] hour of week table --- config/locales/en.yml | 3 ++- templates/activity.haml | 24 +++++++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index ef8a1c6bb..74811bc53 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -20,4 +20,5 @@ en: hour: Hour percentage: Percentage day: Day - day_of_week: Day of week \ No newline at end of file + day_of_week: Day of week + hour_of_week: Hour of week \ No newline at end of file diff --git a/templates/activity.haml b/templates/activity.haml index a29045df9..c90551c77 100644 --- a/templates/activity.haml +++ b/templates/activity.haml @@ -6,11 +6,11 @@ - (0..23).each do |h| %th= h %tr - %td= :commits.t + %th= :commits.t - repo.activity.by_hour_array.each do |commits| %td= commits %tr - %td= :percentage.t + %th= :percentage.t - repo.activity.by_hour_array.each do |commits| %td= (commits * 100.0 / repo.activity.by_hour_array.sum).round(2) = high_chart("activity_by_hour", charts.activity_by_hour) @@ -24,11 +24,25 @@ - Date::ABBR_DAYNAMES.each do |d| %th= d %tr - %td= :commits.t + %th= :commits.t - repo.activity.by_wday_array.each do |commits| %td= commits %tr - %td= :percentage.t + %th= :percentage.t - repo.activity.by_wday_array.each do |commits| %td= (commits * 100.0 / repo.activity.by_wday_array.sum).round(2) -= high_chart("activity_by_wday", charts.activity_by_wday) \ No newline at end of file += high_chart("activity_by_wday", charts.activity_by_wday) + + +.page-header + %h1.pagination-centered= :hour_of_week.t +%table{:class => "table table-bordered table-condensed"} + %tr + %th + - (0..23).each do |h| + %th= h + - (0..6).each do |day| + %tr + %th= Date::ABBR_DAYNAMES[day] + - (0..23).each do |hour| + %td= repo.activity.by_wday_hour[day][hour]