Make circles/collections depending on available version
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -151,13 +151,14 @@ app.controller('BoardController', function ($rootScope, $scope, $element, $state
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (parseInt(oc_config.version.split('.')[0]) >= 16) {
|
||||||
const ComponentVM = new Vue({
|
const ComponentVM = new Vue({
|
||||||
render: h => h(CollaborationView),
|
render: h => h(CollaborationView),
|
||||||
data: {
|
data: {
|
||||||
model: BoardService.getCurrent()
|
model: BoardService.getCurrent()
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
$scope.mountCollections = function() {
|
$scope.mountCollections = function () {
|
||||||
const MountingPoint = document.getElementById('collaborationResources');
|
const MountingPoint = document.getElementById('collaborationResources');
|
||||||
if (MountingPoint) {
|
if (MountingPoint) {
|
||||||
ComponentVM.model = BoardService.getCurrent();
|
ComponentVM.model = BoardService.getCurrent();
|
||||||
@@ -167,12 +168,13 @@ app.controller('BoardController', function ($rootScope, $scope, $element, $state
|
|||||||
$scope.$$postDigest($scope.mountCollections);
|
$scope.$$postDigest($scope.mountCollections);
|
||||||
$scope.$watch(function () {
|
$scope.$watch(function () {
|
||||||
return BoardService.getCurrent();
|
return BoardService.getCurrent();
|
||||||
}, function() {
|
}, function () {
|
||||||
ComponentVM.model = BoardService.getCurrent();
|
ComponentVM.model = BoardService.getCurrent();
|
||||||
if ($scope.sidebar.show) {
|
if ($scope.sidebar.show) {
|
||||||
$scope.$$postDigest($scope.mountCollections);
|
$scope.$$postDigest($scope.mountCollections);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
$scope.toggleCompactMode = function() {
|
$scope.toggleCompactMode = function() {
|
||||||
$rootScope.compactMode = !$rootScope.compactMode;
|
$rootScope.compactMode = !$rootScope.compactMode;
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ class PermissionService {
|
|||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->userId = $userId;
|
$this->userId = $userId;
|
||||||
|
|
||||||
$this->circlesEnabled = \OC::$server->getAppManager()->isEnabledForUser('circles');
|
$this->circlesEnabled = \OC::$server->getAppManager()->isEnabledForUser('circles') &&
|
||||||
|
(version_compare(\OC::$server->getAppManager()->getAppVersion('circles'), '0.17.1') >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user