Add forms for defining room layouts

This commit is contained in:
2014-11-24 20:39:58 +11:00
parent 7098d26756
commit 9a61cb6744
5 changed files with 284 additions and 3 deletions

View File

@@ -465,6 +465,23 @@ function booking_update_7225() {
db_add_field('booking_studygroup_list', 'booking_is_readinggroup', $spec);
}
/**
* Add table for defininig room location layouts rather than hard coding
*/
function booking_update_7226() {
//NOTE: This doesn't need a reference to the current event, since it is not anticipated that successive events will have a different room layout
$booking_room_locations = array(
'fields' => array(
'lid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_roomlocation_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_roomlocation_active' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'Y'),
),
'primary key' => array('lid'),
);
db_create_table('booking_room_locations', $booking_room_locations);
}
/**
* Implementation of hook_install().
@@ -819,6 +836,15 @@ function booking_schema() {
'primary key' => array('rid'),
);
$schema['booking_room_locations'] = array(
'fields' => array(
'lid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),
'booking_roomlocation_descrip' => array('type' => 'varchar', 'length' => '500', 'not null' => FALSE),
'booking_roomlocation_active' => array('type' => 'varchar', 'length' => '1', 'not null' => FALSE, 'default' => 'N'),
),
'primary key' => array('lid'),
);
$schema['booking_room_mapping'] = array(
'fields' => array(
'mid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'disp-width' => '10'),