summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r--modules-available/locationinfo/inc/locationinfo.inc.php3
-rw-r--r--modules-available/locationinfo/lang/de/template-tags.json2
-rw-r--r--modules-available/locationinfo/lang/en/template-tags.json2
-rw-r--r--modules-available/locationinfo/page.inc.php2
-rw-r--r--modules-available/locationinfo/templates/page-config-panel-url.html22
5 files changed, 30 insertions, 1 deletions
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php
index e3d7db3d..38e271fe 100644
--- a/modules-available/locationinfo/inc/locationinfo.inc.php
+++ b/modules-available/locationinfo/inc/locationinfo.inc.php
@@ -130,6 +130,9 @@ class LocationInfo
if ($data && $data['insecure-ssl']) {
ConfigHolder::add('SLX_BROWSER_INSECURE', '1');
}
+ if ($data && $data['reload-minutes']) {
+ ConfigHolder::add('SLX_BROWSER_RELOAD_SECS', $data['reload-minutes'] * 60);
+ }
}
ConfigHolder::add('SLX_BROWSER_URL', 'http://' . $_SERVER['SERVER_ADDR'] . '/panel/' . $panelUuid);
ConfigHolder::add('SLX_ADDONS', '', 1000);
diff --git a/modules-available/locationinfo/lang/de/template-tags.json b/modules-available/locationinfo/lang/de/template-tags.json
index b305f800..bcdf7148 100644
--- a/modules-available/locationinfo/lang/de/template-tags.json
+++ b/modules-available/locationinfo/lang/de/template-tags.json
@@ -71,6 +71,8 @@
"lang_prettytimeTooltip": "Verwende ein anderes Anzeigeformat f\u00fcr die Uhrzeit",
"lang_recursiveServerSet": "Auch f\u00fcr alle untergeordneten R\u00e4ume setzen",
"lang_recursiveSetTooltip": "Wenn aktiviert, wird der Backend-Server auch f\u00fcr alle untergeordneten R\u00e4ume auf den hier gew\u00e4hlten Wert gesetzt",
+ "lang_reloadIntervalMins": "Neuladen alle X Minuten",
+ "lang_reloadIntervalTooltip": "Setzen Sie dieses Feld auf einen Wert > 0 (in Minuten), um die Seite auf den Clients regelm\u00e4\u00dfig neu zu laden. Feld auf 0 setzen oder leer lassen deaktiviert diese Funktion.",
"lang_remoteSchedule": "Abruf Belegungsplan",
"lang_room": "Raum",
"lang_roomId": "Raum ID",
diff --git a/modules-available/locationinfo/lang/en/template-tags.json b/modules-available/locationinfo/lang/en/template-tags.json
index 5679e8b8..558ddff0 100644
--- a/modules-available/locationinfo/lang/en/template-tags.json
+++ b/modules-available/locationinfo/lang/en/template-tags.json
@@ -71,6 +71,8 @@
"lang_prettytimeTooltip": "Use a different display format for the time",
"lang_recursiveServerSet": "Also set for all child locations",
"lang_recursiveSetTooltip": "If checked, all direct and indirect child locations will be configured to use the backend server selected above",
+ "lang_reloadIntervalMins": "Reload every X minutes",
+ "lang_reloadIntervalTooltip": "Set this field to a value > 0 (in minutes) to reload the page periodically. Set to 0 or leave blank to disable.",
"lang_remoteSchedule": "Time table retrieval",
"lang_room": "Room",
"lang_roomId": "Room ID",
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php
index 22a21951..777b84db 100644
--- a/modules-available/locationinfo/page.inc.php
+++ b/modules-available/locationinfo/page.inc.php
@@ -362,6 +362,7 @@ class Page_LocationInfo extends Page
$conf = array(
'url' => Request::post('url', 'https://www.bwlehrpool.de/', 'string'),
'insecure-ssl' => Request::post('insecure-ssl', 0, 'int'),
+ 'reload-minutes' => max(0, Request::post('reloadminutes', 0, 'int')),
);
return array('config' => $conf, 'locationids' => []);
}
@@ -887,6 +888,7 @@ class Page_LocationInfo extends Page
'panelname' => $panel['panelname'],
'url' => $config['url'],
'ssl_checked' => $config['insecure-ssl'] ? 'checked' : '',
+ 'reloadminutes' => (int)$config['reload-minutes'],
));
} else {
Render::addTemplate('page-config-panel-summary', array(
diff --git a/modules-available/locationinfo/templates/page-config-panel-url.html b/modules-available/locationinfo/templates/page-config-panel-url.html
index 401214bd..cca81509 100644
--- a/modules-available/locationinfo/templates/page-config-panel-url.html
+++ b/modules-available/locationinfo/templates/page-config-panel-url.html
@@ -55,7 +55,10 @@
<label for="input-ssl">{{lang_insecureSsl}}</label>
</div>
<div class="col-sm-7">
- <input id="input-ssl" type="checkbox" name="insecure-ssl" {{ssl_checked}} value="1">
+ <div class="checkbox">
+ <input id="input-ssl" type="checkbox" name="insecure-ssl" {{ssl_checked}} value="1">
+ <label></label>
+ </div>
</div>
<div class="col-sm-2">
<a class="btn btn-default helptext" title="{{lang_ignoreSslTooltip}}">
@@ -64,6 +67,23 @@
</div>
</div>
</div>
+
+ <div class="list-group-item">
+ <div class="row">
+ <div class="col-sm-3">
+ <label for="input-reload">{{lang_reloadIntervalMins}}</label>
+ </div>
+ <div class="col-sm-7">
+ <input class="form-control" id="input-reload" type="number" min="0" max="999" name="reloadminutes" pattern="\d*" value="{{reloadminutes}}">
+ </div>
+ <div class="col-sm-2">
+ <a class="btn btn-default helptext" title="{{lang_reloadIntervalTooltip}}">
+ <span class="glyphicon glyphicon-question-sign"></span>
+ </a>
+ </div>
+ </div>
+ </div>
+
</div>
</div>
</div>