Here you go...
I included the below function in Schedule.template.php
/**
* Gets the capacity of a resources for the reservation
* @param array $resid reservation id
*/
function get_capacity($resid) {
$curr_reservation = new Reservation($resid);
$curr_resource = new Resource($curr_reservation->get_machid());
$max_participants = $curr_resource->get_property('max_participants', $curr_reservation->get_machid());
$user_info = $curr_reservation->users;
$total_users = 0;
if ($max_participants != '') {
// Show how many openings are taken
for ($i = 0; $i < count($user_info); $i++) {
//if ($user_info[$i]['invited'] != 1 && $user_info[$i]['owner'] != 1) {
$total_users++;
//}
}
}
if ($total_users > $max_participants) {
return "<font color=red> (" . $total_users . "/" . $max_participants . ")</font>";
} else {
return " (" . $total_users . "/" . $max_participants . ")";
}
}
Then I modified "function write_reservation" in Schedule.template .php:
...
$slots = get_capacity($resid);
$summary_text = $summary->toScheduleCell();
$cellSummary = '';
if ($summary_text != $summary->EMPTY_SUMMARY)
{
$summary_text .= $slots;
$cellSummary = "<div class=\"inlineSummary\">$summary_text</div>";
}
And then Nicks suggestion to add: include_once($basedir . '/lib/Reservation.class.php'); in Schedule.class.php.
This modification will display the open slots vs the max participants for the reservation.