Display read-only settings for information purpose
This commit is contained in:
parent
3e42ac4661
commit
afa77a7b60
3 changed files with 25 additions and 1 deletions
|
|
@ -68,6 +68,9 @@ angular.module("FICApp")
|
|||
'update': {method: 'PUT'},
|
||||
})
|
||||
})
|
||||
.factory("ROSettings", function($resource) {
|
||||
return $resource("/api/settings-ro.json")
|
||||
})
|
||||
.factory("Settings", function($resource) {
|
||||
return $resource("/api/settings.json", null, {
|
||||
'update': {method: 'PUT'},
|
||||
|
|
@ -328,8 +331,9 @@ angular.module("FICApp")
|
|||
$interval(updBox, 750);
|
||||
})
|
||||
|
||||
.controller("SettingsController", function($scope, $rootScope, Settings, $location, $http) {
|
||||
.controller("SettingsController", function($scope, $rootScope, Settings, ROSettings, $location, $http) {
|
||||
$scope.config = Settings.get();
|
||||
$scope.configro = ROSettings.get();
|
||||
$scope.duration = 240;
|
||||
|
||||
$scope.saveSettings = function(msg) {
|
||||
|
|
|
|||
|
|
@ -112,6 +112,13 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Synchronisation</label>
|
||||
<div class="col-sm-10">{{ configro.sync }}</div>
|
||||
</div>
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-save" aria-hidden="true"></span> Propager ces paramètres</button>
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue