2021-05-14 14:29:36 +02:00
|
|
|
'use strict';
|
|
|
|
|
2022-01-04 15:27:58 +01:00
|
|
|
Application.Controllers.controller('HeaderController', ['$scope', '$rootScope', '$state', 'settingsPromise',
|
|
|
|
function ($scope, $rootScope, $state, settingsPromise) {
|
2021-05-14 14:29:36 +02:00
|
|
|
$scope.aboutPage = ($state.current.name === 'app.public.about');
|
|
|
|
|
|
|
|
$rootScope.$on('$stateChangeStart', function (event, toState) {
|
|
|
|
$scope.aboutPage = (toState.name === 'app.public.about');
|
|
|
|
});
|
2022-01-04 15:27:58 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the current state of the public registration setting (allowed/blocked).
|
|
|
|
*/
|
|
|
|
$scope.registrationEnabled = function () {
|
|
|
|
return settingsPromise.public_registrations === 'true';
|
|
|
|
};
|
2021-05-14 14:29:36 +02:00
|
|
|
}
|
|
|
|
]);
|