Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Commit

Permalink
added th headers to dashboard minute columns
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed May 29, 2015
1 parent 3e12877 commit e9b6ec1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/dashboard.css.scss
Expand Up @@ -36,11 +36,11 @@
.row td { padding: 0px; }
.row.odd td { background: lighten($darker-color, 3%); }
.row.even td { background: lighten($darker-color, 6%); }
td.time-period-marker { border-left: dotted lighten(black,60%) 1px; }
td.time-period-marker { border-left: dotted lighten(black,70%) 1px; }
.collapsed-multi-gap {
display: inline-block;
font-size: 0.1em;
color: lighten(black, 30%);
color: lighten(black, 70%);
&:after { content: '...'; }
margin-left: 1px;
margin-right: 1px;
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/dashboard_worker.rb
Expand Up @@ -21,7 +21,7 @@ def gather
all_lights = Hash[
@kata.avatars.active.each.collect{|avatar| [avatar.name, avatar.lights]}
]
max_seconds_uncollapsed = seconds_per_column * 2
max_seconds_uncollapsed = seconds_per_column * 5
gapper = TdGapper.new(@kata.created, seconds_per_column, max_seconds_uncollapsed)
@gapped = gapper.fully_gapped(all_lights, time_now)
@progress = @kata.language.progress_regexs != [ ]
Expand Down
16 changes: 16 additions & 0 deletions app/views/dashboard/_traffic_lights.html.erb
Expand Up @@ -24,6 +24,22 @@ $(function() {
//--></script>

<table>
<% if @avatar_names.length != 0 %>
<tr>
<% td_map = @gapped[@avatar_names[0]] %>
<% td_map.keys.sort.each do |td_no| %>
<% td = td_map[td_no] %>
<td class="time-period-marker">
</td>
<th>
<% if td.class == Hash %>
<span class="collapsed-multi-gap" data-mins-collapsed="<%= td[:collapsed] %>"></span>
<% end %>
</th>
<% end %>
</tr>
<% end %>
<% @avatar_names.each_with_index do |name,index| %>
<tr class="<%= parity(index) %> row">
<% td_map = @gapped[name] %>
Expand Down

0 comments on commit e9b6ec1

Please sign in to comment.