Formatting

main
Bot 7 years ago committed by Igor Scheller
parent 341c076d98
commit a473a56f1d

@ -444,6 +444,7 @@ function Shift_update($shift)
*
* @param array $shift
* @return bool|null
* @throws Exception
*/
function Shift_update_by_psid($shift)
{

@ -241,7 +241,7 @@ function Users_by_angeltype($angeltype)
`UserAngelTypes`.`id` AS `user_angeltype_id`,
`UserAngelTypes`.`confirm_user_id`,
`UserAngelTypes`.`supporter`,
(`UserDriverLicenses`.`user_id` IS NOT NULL) as `wants_to_drive`,
(`UserDriverLicenses`.`user_id` IS NOT NULL) AS `wants_to_drive`,
`UserDriverLicenses`.*
FROM `User`
JOIN `UserAngelTypes` ON `User`.`UID`=`UserAngelTypes`.`user_id`

@ -1,4 +1,5 @@
<?php
use Engelsystem\ShiftCalendarRenderer;
use Engelsystem\ShiftsFilterRenderer;

@ -1,11 +1,9 @@
<?php
namespace Engelsystem;
use Exception;
namespace Engelsystem;
class ShiftCalendarRenderer
{
/**
* 15m * 60s/m = 900s
*/
@ -69,9 +67,7 @@ class ShiftCalendarRenderer
/**
* Assigns the shifts to different lanes per room if they collide
*
* @param array[] $shifts
* The shifts to assign
*
* @param array[] $shifts The shifts to assign
* @return array Returns an array that assigns a room_id to an array of ShiftCalendarLane containing the shifts
*/
private function assignShiftsToLanes($shifts)
@ -113,7 +109,6 @@ class ShiftCalendarRenderer
}
/**
*
* @return int
*/
public function getFirstBlockStartTime()
@ -122,7 +117,6 @@ class ShiftCalendarRenderer
}
/**
*
* @return int
*/
public function getLastBlockEndTime()
@ -131,7 +125,6 @@ class ShiftCalendarRenderer
}
/**
*
* @return float
*/
public function getBlocksPerSlot()
@ -178,8 +171,7 @@ class ShiftCalendarRenderer
/**
* Renders a single lane
*
* @param ShiftCalendarLane $lane
* The lane to render
* @param ShiftCalendarLane $lane The lane to render
* @return string
*/
private function renderLane(ShiftCalendarLane $lane)
@ -196,7 +188,12 @@ class ShiftCalendarRenderer
$rendered_until += ShiftCalendarRenderer::SECONDS_PER_ROW;
}
list ($shift_height, $shift_html) = $shift_renderer->render($shift, $this->needed_angeltypes[$shift['SID']], $this->shift_entries[$shift['SID']], $user);
list ($shift_height, $shift_html) = $shift_renderer->render(
$shift,
$this->needed_angeltypes[$shift['SID']],
$this->shift_entries[$shift['SID']],
$user
);
$html .= $shift_html;
$rendered_until += $shift_height * ShiftCalendarRenderer::SECONDS_PER_ROW;
}
@ -215,10 +212,8 @@ class ShiftCalendarRenderer
/**
* Renders a tick/block for given time
*
* @param int $time
* unix timestamp
* @param boolean $label
* Should time labels be generated?
* @param int $time unix timestamp
* @param boolean $label Should time labels be generated?
* @return string rendered tick html
*/
private function renderTick($time, $label = false)
@ -261,7 +256,6 @@ class ShiftCalendarRenderer
}
/**
*
* @param array[] $shifts
* @return int
*/
@ -277,7 +271,6 @@ class ShiftCalendarRenderer
}
/**
*
* @param array[] $shifts
* @return int
*/
@ -293,7 +286,6 @@ class ShiftCalendarRenderer
}
/**
*
* @return int
*/
private function calcBlocksPerSlot()

@ -82,6 +82,7 @@ class Db
/**
* Run a select query and return only the first result or null if no result is found.
*
* @param string $query
* @param array $bindings
* @return array|null

@ -20,11 +20,10 @@
<div class="col-md-4">
<h2>Hosting</h2>
<p>
Webspace, development platform and domain on <a href="https://engelsystem.de">engelsystem.de</a> is currently provided by
<a href="https://www.wybt.net/">would you buy this?</a> (ichdasich)
Webspace, development platform and domain on <a href="https://engelsystem.de">engelsystem.de</a>
is currently provided by <a href="https://www.wybt.net/">would you buy this?</a> (ichdasich)
and adminstrated by <a href="http://mortzu.de/">mortzu</a>,
<a href="http://derf.homelinux.org/">derf</a>
and ichdasich.
<a href="http://derf.homelinux.org/">derf</a> and ichdasich.
</p>
</div>
<div class="col-md-4">

@ -22,7 +22,9 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="%start_page_url%"><span class="icon-icon_angel"></span> <strong class="visible-lg-inline">ENGELSYSTEM</strong></a>
<a class="navbar-brand" href="%start_page_url%">
<span class="icon-icon_angel"></span> <strong class="visible-lg-inline">ENGELSYSTEM</strong>
</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse-1">%menu% %header_toolbar%</div>
</div>

Loading…
Cancel
Save