Progress on room location definition forms
This commit is contained in:
@@ -1236,6 +1236,7 @@ function booking_load_query($node_ids = NULL, $fetchAssoc = FALSE)
|
||||
{
|
||||
$query->leftJoin('booking_room_mapping', 'rm', 'p.nid = rm.booking_nodeid');
|
||||
$query->leftJoin('booking_room_definition', 'r', 'rm.booking_roomid = r.rid');
|
||||
$query->leftJoin('booking_room_locations', 'l', 'l.lid = r.booking_room_location_id');
|
||||
}
|
||||
|
||||
//add the joins to flatten out study groups into columns
|
||||
@@ -1266,7 +1267,8 @@ function booking_load_query($node_ids = NULL, $fetchAssoc = FALSE)
|
||||
if (variable_get('booking_enable_roomallocations', 0) == 1)
|
||||
{
|
||||
$query->fields('rm', array('booking_room_bedtype'))
|
||||
->fields('r', array('rid', 'booking_room_location_id', 'booking_room_number'));
|
||||
->fields('r', array('rid', 'booking_room_location_id', 'booking_room_number'))
|
||||
->fields('l');
|
||||
}
|
||||
|
||||
//now add the study group fields if applicable
|
||||
@@ -1294,7 +1296,7 @@ function booking_load_query($node_ids = NULL, $fetchAssoc = FALSE)
|
||||
$result = $query->execute();
|
||||
}
|
||||
|
||||
//watchdog('booking', "<pre>Loading node query output:\n@info</pre>", array('@info' => print_r( $result, true)));
|
||||
watchdog('booking', "<pre>Loading node query output:\n@info</pre>", array('@info' => print_r( $result, true)));
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -1940,10 +1942,11 @@ function booking_view($node, $view_mode) {
|
||||
if (variable_get('booking_enable_roomallocations', 0) == 1)
|
||||
{
|
||||
$room_heading = t("<h2>Room Allocation</h2><p>!link</p>",
|
||||
array('!link' => l(t('Edit Room Allocation'), t('admin/booking/!id/edit-room', array('!id' => $node->nid)))
|
||||
array('!link' => l(t('Edit Room Allocation'), t('admin/booking/!id/edit-room', array('!id' => $node->nid)), array('query' => drupal_get_destination()) )
|
||||
));
|
||||
$room_rows = array();
|
||||
$room_rows[] = array(t('Room Location'), _booking_room_location_lookup($node->booking_room_location_id));
|
||||
//$room_rows[] = array(t('Room Location'), _booking_room_location_lookup($node->booking_room_location_id));
|
||||
$room_rows[] = array(t('Room Location'), $node->booking_roomlocation_descrip);
|
||||
$room_rows[] = array(t('Room Number'), $node->booking_room_number);
|
||||
$room_rows[] = array(t('Bed Type'), _booking_room_bedtype_lookup($node->booking_room_bedtype));
|
||||
|
||||
|
Reference in New Issue
Block a user