From 6522f469919286b23c6f480433ff974e1ca8f91f Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Thu, 10 Dec 2020 02:14:36 -0800 Subject: [PATCH] wider columns on the admin schedule page. --- app/views/admin/schedules/_day_tab.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/admin/schedules/_day_tab.html.haml b/app/views/admin/schedules/_day_tab.html.haml index 8a1dff60..4fdf7256 100644 --- a/app/views/admin/schedules/_day_tab.html.haml +++ b/app/views/admin/schedules/_day_tab.html.haml @@ -3,11 +3,13 @@ / use smaller cell heights for more compact grids - cell_height = compact_grid ? 32 : 58 - date_event_schedules = @event_schedules.select{ |e| e.start_time.to_date.eql? date } +/ Dynamically set the column width, but no narrower than 2 (on a BS grid of 12) +- col_size = [2, (12 / @rooms.count).to_i ].max .row - @rooms.each do |room| - non_schedulable = room.tracks.self_organized.confirmed.any? do |track| - !track.schedules.include?(@schedule) && (track.start_date..track.end_date).include?(date) - .col-md-2.col-xs-6{ class: ('non_schedulable' if non_schedulable) } + .col-xs-6{ class: ('non_schedulable' if non_schedulable) + " col-md-#{col_size}" } .room-name - room_date_event_schedules = date_event_schedules.select{ |e| e.room == room } = room.name