git_stats/templates/authors/_authors.haml

69 lines
3 KiB
Text
Raw Normal View History

2012-10-22 19:50:31 +02:00
.tabbable.tabs-left
%ul.nav.nav-tabs
%li{class: page == :best_authors ? "active" : ""}
%a{href: 'best_authors.html'}= :best_authors.t
%li{class: page == :commits_sum_by_author_by_date ? "active" : ""}
%a{href: 'commits_sum_by_author_by_date.html'}= :commits_sum_by_author_by_date.t
%li{class: page == :changed_lines_by_author_by_date ? "active" : ""}
%a{href: 'changed_lines_by_author_by_date.html'}= :changed_lines_by_author_by_date.t
%li{class: page == :insertions_by_author_by_date ? "active" : ""}
%a{href: 'insertions_by_author_by_date.html'}= :insertions_by_author_by_date.t
%li{class: page == :deletions_by_author_by_date ? "active" : ""}
%a{href: 'deletions_by_author_by_date.html'}= :deletions_by_author_by_date.t
.tab-content
.tab-pane.active
.page-header
%h1.pagination-centered= page.t
- if page == :best_authors
%table{:class => "table table-bordered table-condensed table-hover"}
%tr
2012-10-23 20:13:36 +02:00
%th #
2012-10-22 19:50:31 +02:00
%th= :author.t
%th= :commits.t
%th= :insertions.t
%th= :deletions.t
%th= :first_commit.t
%th= :last_commit.t
%th
- sorted_authors = repo.authors.sort_by { |a| -a.commits.size}
- sorted_authors.each_with_index do |author, i|
%tr
2012-10-23 20:13:36 +02:00
%th= i+1
%th= "#{author.name} <#{author.email}>"
2012-10-22 19:50:31 +02:00
%td= author.commits.size
%td= author.insertions
%td= author.deletions
2012-10-22 23:18:54 +02:00
%td= I18n.localize(author.commits.first.try(:date), format: :long) rescue ""
%td= I18n.localize(author.commits.last.try(:date), format: :long) rescue ""
2012-10-22 19:50:31 +02:00
%td
2013-02-21 11:15:58 +01:00
%a.btn{:href => "#{author.dirname}/activity/by_date.html"}= :activity.t
%td
%a.btn{:href => "#{author.dirname}/author_details/commits_by_date.html"}= :details.t
2012-10-22 19:50:31 +02:00
-elsif page == :commits_count_by_author
2012-10-22 20:29:27 +02:00
= high_chart("charts.commits_count_by_author", charts.commits_count_by_author(4))
2012-10-22 19:50:31 +02:00
%small
%center= "5 #{:best_authors_shown.t}"
-elsif page == :commits_sum_by_author_by_date
2012-10-22 20:29:27 +02:00
= high_stock("charts.commits_sum_by_author_by_date", charts.commits_sum_by_author_by_date(4))
2012-10-22 19:50:31 +02:00
%small
%center= "5 #{:best_authors_shown.t}"
-elsif page == :changed_lines_by_author_by_date
2012-10-22 20:29:27 +02:00
= high_stock("charts.changed_lines_by_author_by_date", charts.changed_lines_by_author_by_date(4))
2012-10-22 19:50:31 +02:00
%small
%center= "5 #{:best_authors_shown.t}"
-elsif page == :insertions_by_author_by_date
2012-10-22 20:29:27 +02:00
= high_stock("charts.insertions_by_author_by_date", charts.insertions_by_author_by_date(4))
2012-10-22 19:50:31 +02:00
%small
%center= "5 #{:best_authors_shown.t}"
-elsif page == :deletions_by_author_by_date
2012-10-22 20:29:27 +02:00
= high_stock("charts.deletions_by_author_by_date", charts.deletions_by_author_by_date(4))
2012-10-22 19:50:31 +02:00
%small
%center= "5 #{:best_authors_shown.t}"