Sha256: e1c4544dfd9aa954d67b420162bcf1f046fec133174a9c3bc972b272c65d0394
Contents?: true
Size: 1.33 KB
Versions: 16
Compression:
Stored size: 1.33 KB
Contents
/** * @ngdoc object * @name Bastion.content-views.controller:ContentViewDeletionController * * @requires $scope * @requires ContentView * @requires GlobalNotification * * @description * Provides the functionality for deleting Content Views */ angular.module('Bastion.content-views').controller('ContentViewDeletionController', ['$scope', 'ContentView', 'GlobalNotification', function ($scope, ContentView, GlobalNotification) { function success() { $scope.transitionTo('content-views'); $scope.working = false; } function failure(response) { GlobalNotification.setErrorMessage(response.data.displayMessage); $scope.working = false; } $scope.delete = function () { $scope.working = true; ContentView.remove({id: $scope.contentView.id}, success, failure); }; $scope.environmentNames = function (version) { return _.map($scope.readableEnvironments(version), 'name'); }; $scope.readableEnvironments = function (version) { return _.reject(version.environments, function (env) { return !env.permissions.readable; }); }; $scope.conflictingVersions = ContentView.conflictingVersions({id: $scope.$stateParams.contentViewId}); }] );
Version data entries
16 entries across 16 versions & 1 rubygems