mirror of
https://github.com/grafana/grafana.git
synced 2025-01-28 09:17:12 -06:00
ux: fix for showing pending invitations tab, fixes #9094
This commit is contained in:
parent
ad14ccf4bd
commit
3b9fbd60d8
public/app/features/org
@ -92,20 +92,25 @@ export class OrgUsersCtrl {
|
||||
evt.stopPropagation();
|
||||
}
|
||||
|
||||
openAddUsersView() {
|
||||
var modalScope = this.$scope.$new();
|
||||
modalScope.invitesSent = this.get.bind(this);
|
||||
getInviteUrl(invite) {
|
||||
return invite.url;
|
||||
}
|
||||
|
||||
var src = config.disableLoginForm
|
||||
? 'public/app/features/org/partials/add_user.html'
|
||||
: 'public/app/features/org/partials/invite.html';
|
||||
openAddUsersView() {
|
||||
var modalScope = this.$scope.$new();
|
||||
modalScope.invitesSent = this.get.bind(this);
|
||||
|
||||
var src = config.disableLoginForm
|
||||
? 'public/app/features/org/partials/add_user.html'
|
||||
: 'public/app/features/org/partials/invite.html';
|
||||
|
||||
this.$scope.appEvent('show-modal', {
|
||||
src: src,
|
||||
modalClass: 'invite-modal',
|
||||
scope: modalScope
|
||||
});
|
||||
}
|
||||
|
||||
this.$scope.appEvent('show-modal', {
|
||||
src: src,
|
||||
modalClass: 'invite-modal',
|
||||
scope: modalScope
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
coreModule.controller('OrgUsersCtrl', OrgUsersCtrl);
|
||||
|
@ -22,7 +22,7 @@
|
||||
Users ({{ctrl.users.length}})
|
||||
</a>
|
||||
</li>
|
||||
<li class="gf-tabs-item" ng-show="ctrl.showInviteUI">
|
||||
<li class="gf-tabs-item" ng-show="ctrl.pendingInvites.length">
|
||||
<a class="gf-tabs-link" ng-click="ctrl.editor.index = 1" ng-class="{active: ctrl.editor.index === 1}">
|
||||
Pending Invitations ({{ctrl.pendingInvites.length}})
|
||||
</a>
|
||||
@ -66,7 +66,7 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div ng-if="ctrl.editor.index === 1 && ctrl.showInviteUI">
|
||||
<div ng-if="ctrl.editor.index === 1">
|
||||
<table class="filter-table form-inline">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -80,7 +80,7 @@
|
||||
<td>{{invite.email}}</td>
|
||||
<td>{{invite.name}}</td>
|
||||
<td class="text-right">
|
||||
<button class="btn btn-inverse btn-mini " data-clipboard-text="{{invite.url}}" clipboard-button ng-click="ctrl.copyInviteToClipboard($event)">
|
||||
<button class="btn btn-inverse btn-mini" clipboard-button="ctrl.getInviteUrl(invite)" ng-click="ctrl.copyInviteToClipboard($event)">
|
||||
<i class="fa fa-clipboard"></i> Copy Invite
|
||||
</button>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user