Sha256: 0db7f86fedde9f2bde985adb4d0136e27e1c032f0c98a8a07aa5a1b07ac30536
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
Contents
- i = 0 - block(:top_authors_of_yearmonth) do .blocktable %table %thead %th Year-Month %th Author %th Commits %th Total %tbody - stats.yearmonth_stats.sort{ |a, b| b[0] <=> a[0] }.each do |yearmonth, authorstats| - authors = authorstats.sort{ |a, b| b[1].commits <=> a[1].commits }[0, top_author_count] - authors.each do |author| - c = author[1].commits - first = author == authors.first - i += 1 if first %tr{:class => first ? 'top' : "yearmonthauthor_sub#{i}"} %td{:class => first ? "yearmonthauthor_top#{i}" : ""}&= first ? yearmonth : '' %td{:class => first ? "yearmonthauthor_top#{i}" : ""}&= author[0] %td{:class => first ? "yearmonthauthor_top#{i}" : ""}&= '%d of %d (%.2f%%)' % [c, authorstats.commits.to_f, c * 100.0 / authorstats.commits.to_f] %td{:class => first ? "yearmonthauthor_top#{i}" : ""}&= first ? authorstats.count : '' - for j in 1..i :javascript $(document).ready(function() { $(".yearmonthauthor_sub#{j}").hide(); $(".yearmonthauthor_top#{j}").click(function() { $(".yearmonthauthor_sub#{j}").toggle(); return false; }); });
Version data entries
3 entries across 3 versions & 2 rubygems