Work in progress: Start on org view and finish up the team members view
This commit is contained in:
parent
e6fadbca05
commit
61e9b1629d
4 changed files with 51 additions and 7 deletions
|
@ -1179,6 +1179,18 @@ function NewRepoCtrl($scope, $location, $http, $timeout, UserService, Restangula
|
|||
|
||||
function OrgViewCtrl($scope, Restangular, $routeParams) {
|
||||
var orgname = $routeParams.orgname;
|
||||
|
||||
var loadOrganization = function() {
|
||||
var getOrganization = Restangular.one(getRestUrl('organization', orgname));
|
||||
getOrganization.get().then(function(resp) {
|
||||
$scope.organization = resp;
|
||||
$scope.loading = false;
|
||||
}, function() {
|
||||
$scope.loading = false;
|
||||
});
|
||||
};
|
||||
|
||||
loadOrganization();
|
||||
}
|
||||
|
||||
function OrgAdminCtrl($scope, Restangular, $routeParams) {
|
||||
|
@ -1238,6 +1250,7 @@ function TeamViewCtrl($rootScope, $scope, Restangular, $routeParams) {
|
|||
var getMembers = Restangular.one(getRestUrl('organization', orgname, 'team', teamname, 'members'));
|
||||
getMembers.get().then(function(resp) {
|
||||
$scope.members = resp.members;
|
||||
$scope.canEditMembers = resp.can_edit;
|
||||
$scope.loading = !$scope.organization || !$scope.members;
|
||||
$rootScope.title = teamname + ' (' + orgname + ')';
|
||||
}, function() {
|
||||
|
|
Reference in a new issue