Add a splash of color, add minimum height to widgets, improve QwikClock
This commit is contained in:
parent
e53714ed7c
commit
e9e23d8808
@ -9,6 +9,7 @@ addMultiLangStrings(["en_us" => [
|
||||
$APPS["account_security"]["i18n"] = TRUE;
|
||||
$APPS["account_security"]["title"] = "account security";
|
||||
$APPS["account_security"]["icon"] = "lock";
|
||||
$APPS["account_security"]["type"] = "brown";
|
||||
$content = "<p>"
|
||||
. lang("manage security description", false)
|
||||
. '</p> '
|
||||
|
@ -9,6 +9,7 @@ addMultiLangStrings(["en_us" => [
|
||||
$APPS["inventory_link"]["i18n"] = TRUE;
|
||||
$APPS["inventory_link"]["title"] = "inventory";
|
||||
$APPS["inventory_link"]["icon"] = "cubes";
|
||||
$APPS["inventory_link"]["type"] = "teal";
|
||||
$content = "<p>" . lang("open inventory system", false) . '</p><a href="' . INVENTORY_HOME . '" class="btn btn-primary btn-block">' . lang("open app", false) . ' <i class="fa fa-external-link-square"></i></a>';
|
||||
$APPS["inventory_link"]["content"] = $content;
|
||||
?>
|
@ -10,6 +10,7 @@ addMultiLangStrings(["en_us" => [
|
||||
$APPS["qwikclock_inout"]["i18n"] = TRUE;
|
||||
$APPS["qwikclock_inout"]["title"] = "qwikclock";
|
||||
$APPS["qwikclock_inout"]["icon"] = "clock-o";
|
||||
$APPS["qwikclock_inout"]["type"] = "blue";
|
||||
$content = "";
|
||||
if (!is_empty($_GET['qwikclock']) && ($_GET['qwikclock'] === "punchin" || $_GET['qwikclock'] === "punchout")) {
|
||||
try {
|
||||
@ -23,20 +24,20 @@ if (!is_empty($_GET['qwikclock']) && ($_GET['qwikclock'] === "punchin" || $_GET[
|
||||
|
||||
$resp = json_decode($response->getBody(), TRUE);
|
||||
if ($resp['status'] == "OK") {
|
||||
$content = "<div class=\"alert alert-success\">" . $resp['msg'] . "</div>";
|
||||
$content = "<div class=\"alert alert-success alert-dismissable\"><button type=\"button\" class=\"close\">×</button>" . $resp['msg'] . "</div>";
|
||||
} else {
|
||||
$content = "<div class=\"alert alert-danger\">" . $resp['msg'] . "</div>";
|
||||
$content = "<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\">×</button>" . $resp['msg'] . "</div>";
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$content = "<div class=\"alert alert-danger\">" . lang("error loading widget", false) . " " . $e->getMessage() . "</div>";
|
||||
$content = "<div class=\"alert alert-danger alert-dismissable\"><button type=\"button\" class=\"close\">×</button>" . lang("error loading widget", false) . " " . $e->getMessage() . "</div>";
|
||||
}
|
||||
}
|
||||
$lang_punchin = lang("punch in", false);
|
||||
$lang_punchout = lang("punch out", false);
|
||||
$content .= <<<END
|
||||
<a href="home.php?&qwikclock=punchin" class="btn btn-block btn-success btn-lg"><i class="fa fa-play"></i> $lang_punchin</a>
|
||||
<br />
|
||||
<a href="home.php?qwikclock=punchout" class="btn btn-block btn-danger btn-lg"><i class="fa fa-stop"></i> $lang_punchout</a>
|
||||
END;
|
||||
$content .= '<br /><a href="' . QWIKCLOCK_HOME . '" class="btn btn-primary btn-block">' . lang("open app", false) . ' <i class="fa fa-external-link-square"></i></a>';
|
||||
$APPS["qwikclock_inout"]["content"] = $content;
|
||||
?>
|
@ -9,6 +9,7 @@ addMultiLangStrings(["en_us" => [
|
||||
$APPS["taskfloor_messages"]["i18n"] = TRUE;
|
||||
$APPS["taskfloor_messages"]["title"] = "messages";
|
||||
$APPS["taskfloor_messages"]["icon"] = "comments";
|
||||
$APPS["taskfloor_messages"]["type"] = "deep-purple";
|
||||
try {
|
||||
$client = new GuzzleHttp\Client();
|
||||
|
||||
|
@ -9,6 +9,7 @@ addMultiLangStrings(["en_us" => [
|
||||
$APPS["taskfloor_tasks"]["i18n"] = TRUE;
|
||||
$APPS["taskfloor_tasks"]["title"] = "tasks";
|
||||
$APPS["taskfloor_tasks"]["icon"] = "tasks";
|
||||
$APPS["taskfloor_tasks"]["type"] = "blue-grey";
|
||||
try {
|
||||
$client = new GuzzleHttp\Client();
|
||||
|
||||
|
3
home.php
3
home.php
@ -31,6 +31,7 @@ if (!is_empty($_GET['page'])) {
|
||||
|
||||
<link href="static/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="static/css/font-awesome.min.css" rel="stylesheet">
|
||||
<link href="static/css/material-color.min.css" rel="stylesheet">
|
||||
<link href="static/css/app.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
@ -154,7 +155,7 @@ END;
|
||||
$appcontent = $APPS[$app]['content'];
|
||||
echo <<<END
|
||||
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4">
|
||||
<div class="panel panel-$apptype">
|
||||
<div class="panel panel-$apptype apppanel">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="$appicon"></i> $apptitle </h3>
|
||||
</div>
|
||||
|
@ -17,8 +17,8 @@ define("PAGES", [
|
||||
define("APPS", [
|
||||
"home" => [
|
||||
"taskfloor_tasks",
|
||||
"taskfloor_messages",
|
||||
"qwikclock_inout",
|
||||
"taskfloor_messages",
|
||||
"inventory_link",
|
||||
"account_security"
|
||||
],
|
||||
|
@ -63,6 +63,7 @@ define('TASKFLOOR_HOME', '/taskfloor/app.php');
|
||||
define('INVENTORY_HOME', '/inventory/app.php');
|
||||
|
||||
define('QWIKCLOCK_API', 'http://localhost/qwikclock/api.php');
|
||||
define('QWIKCLOCK_HOME', '/qwikclock/app.php');
|
||||
|
||||
// See lang folder for language options
|
||||
define('LANGUAGE', "en_us");
|
||||
|
@ -39,4 +39,8 @@
|
||||
|
||||
.navbar-inverse .navbar-link {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.apppanel {
|
||||
min-height: 250px;
|
||||
}
|
1951
static/css/material-color.css
Normal file
1951
static/css/material-color.css
Normal file
File diff suppressed because it is too large
Load Diff
2
static/css/material-color.min.css
vendored
Normal file
2
static/css/material-color.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user