summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-11 22:26:36 +0100
committermsquare <msquare@notrademark.de>2017-12-11 22:26:36 +0100
commit74f3677f19b70bbe6655f2d9d9a42792b22120de (patch)
tree7ec4fc344348f528934442a05cff63386afb1da7 /includes/view
parentafb77d22ba35dfbee74bbbee95626d55edef8898 (diff)
add quick+dirty public dashboard
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/PublicDashboard_view.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/includes/view/PublicDashboard_view.php b/includes/view/PublicDashboard_view.php
new file mode 100644
index 00000000..6fa40ed4
--- /dev/null
+++ b/includes/view/PublicDashboard_view.php
@@ -0,0 +1,31 @@
+<?php
+
+/**
+ * Public dashboard (formerly known as angel news hub)
+ */
+function public_dashboard_view($stats)
+{
+ return page([
+ div('first', [
+ div('col-xs-3 text-center', [
+ _('Angels needed in the next 3 hrs'),
+ heading($stats['needed-3-hours'], 1)
+ ]),
+ div('col-xs-3 text-center', [
+ _('Angels needed for nightshifts'),
+ heading($stats['needed-night'], 1)
+ ]),
+ div('col-xs-3 text-center', [
+ _('Angels currently working'),
+ heading($stats['angels-working'], 1)
+ ]),
+ div('col-xs-3 text-center', [
+ _('Hours to be worked'),
+ heading($stats['hours-to-work'], 1)
+ ]),
+ '<script>$(function(){setTimeout(function(){window.location.reload();}, 60000)})</script>'
+ ])
+ ]);
+}
+
+?> \ No newline at end of file