Changeset:
fdb41f31e487
https://sourceforge.net/p/mrbs/hg-code/ci/fdb41f31e48749ecca3aaaae01ae089c02b1728b
Author:
Campbell Morrison <[email protected]>
Date:
Mon Mar 27 17:30:23 2017 +0100
Log message:
Added type
diffstat:
web/index.php | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (51 lines):
diff -r e85ad0079008 -r fdb41f31e487 web/index.php
--- a/web/index.php Mon Mar 27 17:14:29 2017 +0100
+++ b/web/index.php Mon Mar 27 17:30:23 2017 +0100
@@ -86,7 +86,8 @@
{
// and then find the remaining occupied slots
do {
- $map[$room_id][$slot][] = $entry['id'];
+ $map[$room_id][$slot][] = array('id' => $entry['id'],
+ 'type' => $entry['type']);
$slot = next($slots);
} while (($slot !== false) && ($entry['end_time'] > ($slot +
$resolution)));
reset($slots);
@@ -136,7 +137,7 @@
{
// The booking has come to an end, so write it out
$last_id = null;
- $html .= get_cell_html($this_id, 'booked', $n_slots);
+ $html .= get_cell_html($this_id, $type, $n_slots);
}
else
{
@@ -146,7 +147,9 @@
}
elseif (count($data) == 1)
{
- $this_id = $data[0];
+ $this_id = $data[0]['id'];
+ $type = $data[0]['type'];
+
if (!isset($last_id))
{
// Start of a new booking
@@ -162,7 +165,7 @@
{
// The booking has come to an end, so write it out
$last_id = null;
- $html .= get_cell_html($this_id, 'booked', $n_slots);
+ $html .= get_cell_html($this_id, $type, $n_slots);
prev($row);
}
}
@@ -176,7 +179,7 @@
if (($data === false) && isset($last_id))
{
// We're at the end of the row and there's a booking to write out
- $html .= get_cell_html($this_id, 'booked', $n_slots);
+ $html .= get_cell_html($this_id, $type, $n_slots);
break;
}
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits