Create a common repo-list-view control and use it everywhere

This allows users to choose grid view or table view in all repo lists

Fixes #732
This commit is contained in:
Joseph Schorr 2015-12-28 16:29:17 -05:00
parent 16f16e8a15
commit 3da8814787
13 changed files with 115 additions and 77 deletions

View file

@ -10,7 +10,8 @@ angular.module('quay').directive('repoListTable', function () {
restrict: 'C',
scope: {
'repositoriesResources': '=repositoriesResources',
'namespaces': '=namespaces'
'namespaces': '=namespaces',
'starToggled': '&starToggled'
},
controller: function($scope, $element, $filter) {
var orderBy = $filter('orderBy');
@ -59,7 +60,7 @@ angular.module('quay').directive('repoListTable', function () {
$scope.getAvatarData = function(namespace) {
var found = {};
$scope.namespaces.forEach(function(current) {
if (current.name == namespace) {
if (current.name == namespace || current.username == namespace) {
found = current.avatar;
}
});