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

@ -13,6 +13,7 @@
function OrgViewCtrl($scope, $routeParams, $timeout, ApiService, UIService, AvatarService) {
var orgname = $routeParams.orgname;
$scope.namespace = orgname;
$scope.showLogsCounter = 0;
$scope.showApplicationsCounter = 0;
$scope.showInvoicesCounter = 0;
@ -31,10 +32,12 @@
var loadRepositories = function() {
var options = {
'namespace': orgname,
'public': true
'public': true,
'last_modified': true,
'popularity': true
};
$scope.repositoriesResource = ApiService.listReposAsResource().withOptions(options).get(function(resp) {
$scope.organization.repositories = ApiService.listReposAsResource().withOptions(options).get(function(resp) {
return resp.repositories;
});
};