mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-23 12:52:20 +01:00
19 lines
609 B
JavaScript
19 lines
609 B
JavaScript
'use strict';
|
|
|
|
Application.Controllers.controller('HeaderController', ['$scope', '$transitions', '$state', 'settingsPromise',
|
|
function ($scope, $transitions, $state, settingsPromise) {
|
|
$scope.aboutPage = ($state.current.name === 'app.public.about');
|
|
|
|
$transitions.onStart({}, function (trans) {
|
|
$scope.aboutPage = (trans.$to().name === 'app.public.about');
|
|
});
|
|
|
|
/**
|
|
* Returns the current state of the public registration setting (allowed/blocked).
|
|
*/
|
|
$scope.registrationEnabled = function () {
|
|
return settingsPromise.public_registrations === 'true';
|
|
};
|
|
}
|
|
]);
|