31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
.mx-10
|
|
%table.table-fixed.w-full
|
|
%tr
|
|
- ((@weeks - 5)..(@weeks + 5)).each do |week|
|
|
%td.mx-2.mb-2{colspan: 4 , class: week == @weeks ? "bg-orange-100" : "bg-white"}
|
|
=link_to week.to_s , timeline_path( weeks: week)
|
|
%tr
|
|
- (0...@weeks*7).each do |week|
|
|
%td{width: 100.0 / (@weeks * 7) }
|
|
%tr
|
|
- (0...@weeks).each do |week|
|
|
%td{colspan: 7 , class: bg_for(week + 2) }
|
|
= small_date(start_day + week.weeks)
|
|
%tr
|
|
- weekly.each_with_index do |amount , week |
|
|
%td{colspan: 7, class: bg_for(week + 2) , style: "width: #{week_pixels}px;"}= amount
|
|
|
|
- @members.each_with_index do |member , index|
|
|
%tr{class: bg_for(index)}
|
|
- if( (days = started_days(member)) > 0)
|
|
%td.bg-white{colspan: days }
|
|
- if( (days = stay_days(member)) < 14)
|
|
%td{colspan: days}
|
|
= small_date(member.arriving)
|
|
= member.name
|
|
= small_date(member.leaving)
|
|
-else
|
|
%td.py-1{colspan: 4,}= small_date(member.arriving)
|
|
%td{colspan: days - 8}= member.name
|
|
%td{colspan: 4}= small_date(member.leaving)
|