Implement new design for user and org settings

Fixes #1376
This commit is contained in:
Joseph Schorr 2016-04-25 15:17:18 -04:00
parent d63ec8c6b0
commit fe735b8048
25 changed files with 784 additions and 614 deletions

View file

@ -0,0 +1,44 @@
(function() {
/**
* Billing plans page.
*/
angular.module('quayPages').config(['pages', function(pages) {
pages.create('billing', 'billing.html', BillingCtrl, {
'title': 'Billing',
'description': 'Billing',
'newLayout': true
});
}]);
/**
* Billing invoices page.
*/
angular.module('quayPages').config(['pages', function(pages) {
pages.create('invoices', 'invoices.html', BillingCtrl, {
'title': 'Billing Invoices',
'description': 'Billing Invoices',
'newLayout': true
});
}]);
function BillingCtrl($scope, ApiService, $routeParams) {
$scope.orgname = $routeParams['orgname'];
$scope.username = $routeParams['username'];
var loadEntity = function() {
if ($scope.orgname) {
$scope.entityResource = ApiService.getOrganizationAsResource({'orgname': $scope.orgname}).get(function(org) {
$scope.organization = org;
});
} else {
$scope.entityResource = ApiService.getUserInformationAsResource({'username': $scope.username}).get(function(user) {
$scope.viewuser = user;
});
}
};
// Load the user or organization.
loadEntity();
}
}());