Add current job indicator
This commit is contained in:
parent
15ebdccd00
commit
c0fab1e596
@ -155,5 +155,6 @@ define("STRINGS", [
|
|||||||
"choose a group" => "Choose a group",
|
"choose a group" => "Choose a group",
|
||||||
"all groups" => "All Groups",
|
"all groups" => "All Groups",
|
||||||
"shift name" => "Shift Name",
|
"shift name" => "Shift Name",
|
||||||
"workers" => "Workers"
|
"workers" => "Workers",
|
||||||
|
"current job" => "Current job: "
|
||||||
]);
|
]);
|
@ -8,6 +8,17 @@ require_once __DIR__ . '/../required.php';
|
|||||||
redirectifnotloggedin();
|
redirectifnotloggedin();
|
||||||
?>
|
?>
|
||||||
<div class="btn-group mgn-btm-10px">
|
<div class="btn-group mgn-btm-10px">
|
||||||
|
<div class="btn btn-default">
|
||||||
|
<?php
|
||||||
|
lang("current job");
|
||||||
|
|
||||||
|
$currentjob = $database->get('job_tracking', ['[>]jobs' => ['jobid']], ['jobname (name)', 'color'], ["AND" => ["uid" => $_SESSION['uid'], 'end' => null]]);
|
||||||
|
if (!$currentjob) {
|
||||||
|
$currentjob = ["color" => "white", "name" => lang("none", false)];
|
||||||
|
}
|
||||||
|
echo ' <span class="label label-' . $currentjob['color'] . '"> </span> ' . $currentjob['name'];
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (account_has_permission($_SESSION['username'], "QWIKCLOCK_ADMIN")) {
|
if (account_has_permission($_SESSION['username'], "QWIKCLOCK_ADMIN")) {
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user