This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/static/js/directives/ui/repo-list-grid.js

28 lines
873 B
JavaScript
Raw Normal View History

2019-11-12 16:09:47 +00:00
/**
* An element that displays a list of repositories in a grid.
*/
angular.module('quay').directive('repoListGrid', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/repo-list-grid.html',
replace: false,
transclude: true,
restrict: 'C',
scope: {
repositoriesResource: '=repositoriesResource',
starred: '=starred',
namespace: '=namespace',
starToggled: '&starToggled',
hideTitle: '=hideTitle',
hideNamespaces: '=hideNamespaces',
repoKind: '@repoKind'
},
controller: function($scope, $element, UserService, StateService) {
$scope.inReadOnlyMode = StateService.inReadOnlyMode();
$scope.isOrganization = function(namespace) {
return !!UserService.getOrganization(namespace);
};
}
};
return directiveDefinitionObject;
});