Sha256: d2298a7d0082ced7831600074da1139430f13ce3d4b16c17261eae77f24efb14

Contents?: true

Size: 1.46 KB

Versions: 6

Compression:

Stored size: 1.46 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.content-views.controller:ContentViewPublishController
 *
 * @requires $scope
 * @requires translate
 * @requires ContentView
 * @requires GlobalNotification
 *
 * @description
 *   Provides the functionality specific to ContentViews for use with the Nutupane UI pattern.
 *   Defines the columns to display and the transform function for how to generate each row
 *   within the table.
 */
angular.module('Bastion.content-views').controller('ContentViewPublishController',
    ['$scope', 'translate', 'ContentView', 'GlobalNotification', function ($scope, translate, ContentView, GlobalNotification) {

        function success() {
            $scope.transitionTo('content-view.versions',
                                {contentViewId: $scope.contentView.id});

            //get the latest version number from the server
            $scope.$parent.contentView = ContentView.get({id: $scope.$stateParams.contentViewId});

            $scope.working = false;
        }

        function failure(response) {
            GlobalNotification.setErrorMessage(response.data.displayMessage);
            $scope.working = false;
        }

        $scope.version = {};

        $scope.publish = function (contentView) {
            var description = $scope.version.description,
                data = {'id': contentView.id, 'description': description};
            $scope.working = true;
            ContentView.publish(data, success, failure);
        };

    }]
);

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.3.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js