Sha256: e3d0e5d8c007cf42946643bbb199fa4a1f6fba405507e71cc5f3333ad6a86054

Contents?: true

Size: 1.24 KB

Versions: 14

Compression:

Stored size: 1.24 KB

Contents

(function () {
    'use strict';

    /**
     * @ngdoc controller
     * @name  Bastion.content-views.versions.controller:ContentViewVersion
     *
     * @description
     *   Handles fetching of a content view version based on the route ID and putting it
     *   on the scope.
     */
    function ContentViewVersionController($scope, ContentViewVersion) {

        $scope.version = ContentViewVersion.get({id: $scope.$stateParams.versionId});

        $scope.hasRepositories = function (version, type) {
            var found;

            found = _.find(version.repositories, function (repository) {
                return repository['content_type'] === type;
            });

            return found;
        };

        $scope.hasErrata = function (version) {
            var found = false;

            if (version['errata_counts'] &&
                version['errata_counts'].total &&
                version['errata_counts'].total !== 0) {
                return true;
            }
            return found;
        };

    }

    angular
        .module('Bastion.content-views.versions')
        .controller('ContentViewVersionController', ContentViewVersionController);

    ContentViewVersionController.$inject = ['$scope', 'ContentViewVersion'];

})();

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
katello-3.7.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.7.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.7.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.7.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.7.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.5.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.6.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.6.0.1.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.6.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.6.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.5.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.5.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.5.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js
katello-3.5.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js