Add a page for toggling the cookie used for the new layout experiment

This commit is contained in:
Joseph Schorr 2015-02-23 14:48:33 -05:00
parent b66551ec48
commit 83d25d8c2b
4 changed files with 56 additions and 1 deletions

View file

@ -0,0 +1,19 @@
(function() {
/**
* Experiment enable page: New layout
*/
angular.module('quayPages').config(['pages', function(pages) {
pages.create('exp-new-layout', 'exp-new-layout.html', ExpCtrl, {
'newLayout': true
});
}]);
function ExpCtrl($scope, CookieService) {
$scope.isEnabled = CookieService.get('quay.exp-new-layout') == 'true';
$scope.setEnabled = function(value) {
$scope.isEnabled = value;
CookieService.putPermanent('quay.exp-new-layout', value.toString());
};
}
}())