remove unused code
This commit is contained in:
parent
c48335e702
commit
1d4811cca5
|
@ -55,8 +55,6 @@ function room_controller() {
|
||||||
* Dispatch different room actions.
|
* Dispatch different room actions.
|
||||||
*/
|
*/
|
||||||
function rooms_controller() {
|
function rooms_controller() {
|
||||||
global $privileges;
|
|
||||||
|
|
||||||
if (! isset($_REQUEST['action'])) {
|
if (! isset($_REQUEST['action'])) {
|
||||||
$_REQUEST['action'] = 'list';
|
$_REQUEST['action'] = 'list';
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ class ShiftCalendarRenderer {
|
||||||
return $shifts_table;
|
return $shifts_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function initTableBody($rooms, $slotSizes, $first_block_start_time, $blocks_per_slot) {
|
private function initTableBody($slotSizes, $first_block_start_time, $blocks_per_slot) {
|
||||||
// Slot sizes plus 1 for the time
|
// Slot sizes plus 1 for the time
|
||||||
$columns_needed = array_sum($slotSizes) + 1;
|
$columns_needed = array_sum($slotSizes) + 1;
|
||||||
$table_line = array_fill(0, $columns_needed, ShiftCalendarRenderer::EMPTY_CELL);
|
$table_line = array_fill(0, $columns_needed, ShiftCalendarRenderer::EMPTY_CELL);
|
||||||
|
@ -67,7 +67,7 @@ class ShiftCalendarRenderer {
|
||||||
private function calcRoomSlots($rooms, $slotSizes) {
|
private function calcRoomSlots($rooms, $slotSizes) {
|
||||||
$result = [];
|
$result = [];
|
||||||
$slot = 1; // 1 for the time
|
$slot = 1; // 1 for the time
|
||||||
foreach ($rooms as $room_id => $room_name) {
|
foreach (array_keys($rooms) as $room_id) {
|
||||||
$result[$room_id] = $slot;
|
$result[$room_id] = $slot;
|
||||||
$slot += $slotSizes[$room_id];
|
$slot += $slotSizes[$room_id];
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ class ShiftCalendarRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderShift($shift) {
|
private function renderShift($shift) {
|
||||||
global $privileges, $user;
|
global $privileges;
|
||||||
|
|
||||||
$collides = $this->collides();
|
$collides = $this->collides();
|
||||||
$is_free = false;
|
$is_free = false;
|
||||||
|
@ -206,7 +206,7 @@ class ShiftCalendarRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderTableBody($rooms, $slotSizes, $first_block_start_time, $blocks_per_slot) {
|
private function renderTableBody($rooms, $slotSizes, $first_block_start_time, $blocks_per_slot) {
|
||||||
$table = $this->initTableBody($rooms, $slotSizes, $first_block_start_time, $blocks_per_slot);
|
$table = $this->initTableBody($slotSizes, $first_block_start_time, $blocks_per_slot);
|
||||||
|
|
||||||
$room_slots = $this->calcRoomSlots($rooms, $slotSizes);
|
$room_slots = $this->calcRoomSlots($rooms, $slotSizes);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ class ShiftsFilterRenderer {
|
||||||
public function render($link_base) {
|
public function render($link_base) {
|
||||||
$toolbar = [];
|
$toolbar = [];
|
||||||
if ($this->daySelectionEnabled && ! empty($this->days)) {
|
if ($this->daySelectionEnabled && ! empty($this->days)) {
|
||||||
$today = date("Y-m-d");
|
|
||||||
$selected_day = date("Y-m-d", $this->shiftsFilter->getStartTime());
|
$selected_day = date("Y-m-d", $this->shiftsFilter->getStartTime());
|
||||||
$day_dropdown_items = [];
|
$day_dropdown_items = [];
|
||||||
foreach ($this->days as $day) {
|
foreach ($this->days as $day) {
|
||||||
|
|
Loading…
Reference in New Issue