summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/page.inc.php
diff options
context:
space:
mode:
authorChristian Hofmaier2019-03-26 17:18:35 +0100
committerChristian Hofmaier2019-03-26 17:18:35 +0100
commit609b257e89aecf4c382146ffa2cb4f8eb1e8d168 (patch)
treee7b6fa42f0535d352a49796614ac87bd9989f3a2 /modules-available/locationinfo/page.inc.php
parent[serversetup-bwlp-ipxe] Fix: Menu titles won't be used as default (diff)
downloadslx-admin-609b257e89aecf4c382146ffa2cb4f8eb1e8d168.tar.gz
slx-admin-609b257e89aecf4c382146ffa2cb4f8eb1e8d168.tar.xz
slx-admin-609b257e89aecf4c382146ffa2cb4f8eb1e8d168.zip
[locationinfo] UI rework
- add Icons to Buttons - override config for specific room - change roomplanner switch with dropdown menu - new texts for roomplanner dropdown - when roomplanner is empty show empty green box instead of red 0
Diffstat (limited to 'modules-available/locationinfo/page.inc.php')
-rw-r--r--modules-available/locationinfo/page.inc.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index d1644ce1..5292c40e 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -386,6 +386,25 @@ class Page_LocationInfo extends Page
if ($conf['calupdate'] < 30) {
$conf['calupdate'] = 30;
}
+
+ $overrides = array();
+ for ($i = 0; $i < sizeof($locationids); $i++) {
+ $overrideLoc = Request::post('override'.$locationids[$i], false, 'bool');
+ if ($overrideLoc) {
+ $overrideArray = array(
+ 'mode' => Request::post('override'.$locationids[$i].'mode', 1, 'int'),
+ 'roomplanner' => Request::post('override'.$locationids[$i].'roomplanner', false, 'bool'),
+ 'vertical' => Request::post('override'.$locationids[$i].'vertical', false, 'bool'),
+ 'scaledaysauto' => Request::post('override'.$locationids[$i].'scaledaysauto', false, 'bool'),
+ 'daystoshow' => Request::post('override'.$locationids[$i].'daystoshow', 7, 'int'),
+ 'rotation' => Request::post('override'.$locationids[$i].'rotation', 0, 'int'),
+ 'scale' => Request::post('override'.$locationids[$i].'scale', 50, 'int')
+ );
+ $overrides[$locationids[$i]] = $overrideArray;
+ }
+ }
+ $conf['overrides'] = $overrides;
+
return array('config' => $conf, 'locationids' => $locationids);
}
@@ -975,7 +994,7 @@ class Page_LocationInfo extends Page
'vertical_checked' => $config['vertical'] ? 'checked' : '',
'eco_checked' => $config['eco'] ? 'checked' : '',
'prettytime_checked' => $config['prettytime'] ? 'checked' : '',
- 'roomplanner_checked' => $config['roomplanner'] ? 'checked' : '',
+ 'roomplanner' => $config['roomplanner'],
'scaledaysauto_checked' => $config['scaledaysauto'] ? 'checked' : '',
'daystoshow' => $config['daystoshow'],
'rotation' => $config['rotation'],
@@ -985,6 +1004,7 @@ class Page_LocationInfo extends Page
'roomupdate' => $config['roomupdate'],
'locations' => Location::getLocations(),
'locationids' => $panel['locationids'],
+ 'overrides' => json_encode($config['overrides']),
));
} elseif ($panel['paneltype'] === 'URL') {
Render::addTemplate('page-config-panel-url', array(
@@ -1004,7 +1024,7 @@ class Page_LocationInfo extends Page
'panelname' => $panel['panelname'],
'languages' => $langs,
'panelupdate' => $config['panelupdate'],
- 'roomplanner_checked' => $config['roomplanner'] ? 'checked' : '',
+ 'roomplanner' => $config['roomplanner'],
'locations' => Location::getLocations(),
'locationids' => $panel['locationids'],
'eco_checked' => $config['eco'] ? 'checked' : '',