Add ability to display and edit the team's description
This commit is contained in:
parent
fd68564b3f
commit
97fa69a361
5 changed files with 72 additions and 13 deletions
|
@ -688,7 +688,7 @@ function UserAdminCtrl($scope, $timeout, Restangular, PlanService, UserService,
|
|||
$scope.planUsagePercent = sub.usedPrivateRepos * 100 / $scope.subscribedPlan.privateRepos;
|
||||
|
||||
if (sub.usedPrivateRepos > $scope.subscribedPlan.privateRepos) {
|
||||
$scope.errorMessage = 'You are using more private repositories than your plan allows, please upgrate your subscription to avoid disruptions in your service.';
|
||||
$scope.errorMessage = 'You are using more private repositories than your plan allows, please upgrade your subscription to avoid disruptions in your service.';
|
||||
} else {
|
||||
$scope.errorMessage = null;
|
||||
}
|
||||
|
@ -1131,10 +1131,22 @@ function TeamViewCtrl($rootScope, $scope, Restangular, $routeParams) {
|
|||
});
|
||||
};
|
||||
|
||||
$scope.updateForDescription = function(content) {
|
||||
$scope.organization.teams[teamname].description = content;
|
||||
|
||||
var updateTeam = Restangular.one(getRestUrl('organization', orgname, 'team', teamname));
|
||||
var data = $scope.organization.teams[teamname];
|
||||
updateTeam.customPUT(data).then(function(resp) {
|
||||
}, function() {
|
||||
$('#cannotChangeTeamModal').modal({});
|
||||
});
|
||||
};
|
||||
|
||||
var loadOrganization = function() {
|
||||
var getOrganization = Restangular.one(getRestUrl('organization', orgname))
|
||||
getOrganization.get().then(function(resp) {
|
||||
$scope.organization = resp;
|
||||
$scope.team = $scope.organization.teams[teamname];
|
||||
$scope.loading = !$scope.organization || !$scope.members;
|
||||
}, function() {
|
||||
$scope.organization = null;
|
||||
|
|
Reference in a new issue