-% if ( $starts >= $tod_row ) { #first row
-%
-% #false laziness w/misc/xmlhttp-ticket-update.html & CalendarDaySchedule
-% my %hash = $m->comp('/Ticket/Elements/Customers', Ticket => $t);
-% my @cust_main = values( %{$hash{cust_main}} );
-%
-% $content .= ($content?', ':''). #$id. ': '.
-% #false laziness w/xmlhttp-ticket-update.html
-% FS::sched_avail::pretty_time($starts). '-'.
-% FS::sched_avail::pretty_time($due).
-% ': '. encode_entities($cust_main[0]->_FreesideURILabel);
-% #'install for custname XX miles away'; #XXX placeholder/more
-% $draggable_ticketid = $id;
-% $draggable_length = $due - $starts;
-%
-% $cells = int( ($due-$starts) / $timestep );
-% $cells++ if ($due-$starts) % $timestep;
-%
-% #} else {
-% # $content .= ($content?', ':''). $id;
-% }
+% $ticketid = $id;
+% $bgcolor = '#'.$col;
+% $border = '1px solid #D7D7D7';
+% # can't schedule a new appointment
+% $selectable = 0;
+% # but can reschedule a ticket overlapping its old slot (filtered by can_drop)
+% $droppable = 1 unless $scheduling;
+% $draggable_length = $due - $starts;
+% $cells = int( ($due-$starts) / $timestep );
+% $cells++ if ($due-$starts) % $timestep;
+%
+% #false laziness w/misc/xmlhttp-ticket-update.html & CalendarDaySchedule
+% my %hash = $m->comp('/Ticket/Elements/Customers', Ticket => $t);
+% my @cust_main = values( %{$hash{cust_main}} );
+%
+% #false laziness w/xmlhttp-ticket-update.html
+% $label_time = FS::sched_avail::pretty_time($starts). '-'.
+% FS::sched_avail::pretty_time($due);
+% $label_title = $cust_main[0]->_FreesideURILabel;
+% #'install for custname XX miles away'; #XXX placeholder/more
+%
+% $offset = int( ($tod_row - $starts) / $timestep );
+% $offset++ if ($tod_row - $starts) % $timestep;