git_stats/templates/authors.haml

95 lines
3.9 KiB
Plaintext
Raw Normal View History

2012-10-21 17:34:05 +02:00
.tabbable.tabs-left
%ul.nav.nav-tabs
%li.active
2012-10-21 18:15:32 +02:00
%a{:href => '#best_authors', 'data-toogle' => 'tab'}= :best_authors.t
%li
2012-10-21 17:34:05 +02:00
%a{:href => '#commits_count_by_author', 'data-toogle' => 'tab'}= :commits_count_by_author.t
%li
%a{:href => '#lines_added_by_author', 'data-toogle' => 'tab'}= :lines_added_by_author.t
%li
%a{:href => '#lines_deleted_by_author', 'data-toogle' => 'tab'}= :lines_deleted_by_author.t
%li
%a{:href => '#commits_sum_by_author_by_date', 'data-toogle' => 'tab'}= :commits_sum_by_author_by_date.t
%li
%a{:href => '#lines_added_by_author_by_date', 'data-toogle' => 'tab'}= :lines_added_by_author_by_date.t
%li
%a{:href => '#lines_deleted_by_author_by_date', 'data-toogle' => 'tab'}= :lines_deleted_by_author_by_date.t
.tab-content
2012-10-21 18:15:32 +02:00
.tab-pane.active{id: 'best_authors'}
.page-header
%h1.pagination-centered= :best_authors.t
%table{:class => "table table-bordered table-condensed table-hover"}
%tr
%th= :author.t
%th= :commits.t
%th= :lines_added.t
%th= :lines_deleted.t
%th= :first_commit.t
%th= :last_commit.t
2012-10-21 20:05:12 +02:00
%th
- sorted_authors = repo.authors.sort_by { |a| -a.commits.size}
- sorted_authors.each_with_index do |author, i|
2012-10-21 18:15:32 +02:00
%tr
%th= author.name
%td= author.commits.size
%td= author.lines_added
%td= author.lines_deleted
%td= author.commits.first.try(:date).try(:to_formatted_s, :long)
%td= author.commits.last.try(:date).try(:to_formatted_s, :long)
2012-10-21 20:05:12 +02:00
%td
- if i <= 4
%a.btn{:href => "##{author.hash}-modal", :role => "button", 'data-toggle'=>"modal"}= :show_more.t
- else
= :more_data_not_available.t
- sorted_authors[0..4].each do |author|
2012-10-21 22:05:28 +02:00
.modal.hide{:id => "#{author.hash}-modal", :role => "dialog", :style => "width: 1140px; margin-left:-570px; top: 35%; "}
2012-10-21 20:05:12 +02:00
.modal-header
%h1.pagination-centered= "#{author.name} <#{author.email}>"
2012-10-21 22:05:28 +02:00
.modal-body{:style => "height: 620px; max-height: 80%;"}
2012-10-21 20:05:12 +02:00
= render '_activity', author: author
.modal-footer
%a.btn{'data-dismiss' => "modal"}= :close.t
2012-10-21 18:15:32 +02:00
.tab-pane{id: 'commits_count_by_author'}
2012-10-21 17:34:05 +02:00
.page-header
%h1.pagination-centered= :commits_count_by_author.t
= high_chart("charts.commits_count_by_author", charts.commits_count_by_author)
%small
%center= "5 #{:best_authors_shown.t}"
.tab-pane{id: 'lines_added_by_author'}
.page-header
%h1.pagination-centered= :lines_added_by_author.t
= high_chart("charts.lines_added_by_author", charts.lines_added_by_author)
%small
%center= "5 #{:best_authors_shown.t}"
.tab-pane{id: 'lines_deleted_by_author'}
.page-header
%h1.pagination-centered= :lines_deleted_by_author.t
= high_chart("charts.lines_deleted_by_author", charts.lines_deleted_by_author)
%small
%center= "5 #{:best_authors_shown.t}"
.tab-pane{id: 'lines_added_by_author_by_date'}
.page-header
%h1.pagination-centered= :lines_added_by_author_by_date.t
= high_stock("charts.lines_added_by_author_by_date", charts.lines_added_by_author_by_date)
%small
%center= "5 #{:best_authors_shown.t}"
.tab-pane{id: 'commits_sum_by_author_by_date'}
.page-header
%h1.pagination-centered= :commits_sum_by_author_by_date.t
= high_stock("charts.commits_sum_by_author_by_date", charts.commits_sum_by_author_by_date)
%small
%center= "5 #{:best_authors_shown.t}"
.tab-pane{id: 'lines_deleted_by_author_by_date'}
.page-header
%h1.pagination-centered= :lines_deleted_by_author_by_date.t
= high_stock("charts.lines_deleted_by_author_by_date", charts.lines_deleted_by_author_by_date)
%small
%center= "5 #{:best_authors_shown.t}"