3da8814787
This allows users to choose grid view or table view in all repo lists Fixes #732
26 lines
No EOL
769 B
JavaScript
26 lines
No EOL
769 B
JavaScript
/**
|
|
* 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'
|
|
},
|
|
controller: function($scope, $element, UserService) {
|
|
$scope.isOrganization = function(namespace) {
|
|
return !!UserService.getOrganization(namespace);
|
|
};
|
|
}
|
|
};
|
|
return directiveDefinitionObject;
|
|
}); |