-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pikesley
committed
Feb 21, 2016
1 parent
79faf01
commit 44bee4b
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<% id = metrics.first.class.name.underscore.gsub('_', '-') %> | ||
<table class='table table-bordered table-hover' id='<%= id %>-table'> | ||
<% count = 0 %> | ||
<% date_sift(metrics).each_pair do |day, values| %> | ||
<tr<% if count > 0 %> class='collapse <%= id %>-accordion'<% end %>> | ||
<th colspan='4' class='day-marker'> <!-- bootstrap ignores this maybe? --> | ||
<% date = Time.parse(day) %> | ||
<% header = date.strftime "%A %B #{date.day.ordinalize}" %> | ||
<% if with_year %> | ||
<% header = date.strftime "%A %B #{date.day.ordinalize} %Y" %> | ||
<% end %> | ||
<%= header %> | ||
<% if count == 0 %> | ||
<span class='pull-right clickable' data-toggle='collapse' data-target='.<%= id %>-accordion' class='clickable'>Show / Hide</span> | ||
<% end %> | ||
</th> | ||
</tr> | ||
|
||
<% values.each do |value| %> | ||
<%= render partial: 'shared/table_row', locals: { | ||
value: value, | ||
count: count, | ||
id: id | ||
} %> | ||
<% count += 1 %> | ||
<% end %> | ||
<% end %> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters