Commit 3b9fbd60 by Torkel Ödegaard

ux: fix for showing pending invitations tab, fixes #9094

parent ad14ccf4
...@@ -92,6 +92,10 @@ export class OrgUsersCtrl { ...@@ -92,6 +92,10 @@ export class OrgUsersCtrl {
evt.stopPropagation(); evt.stopPropagation();
} }
getInviteUrl(invite) {
return invite.url;
}
openAddUsersView() { openAddUsersView() {
var modalScope = this.$scope.$new(); var modalScope = this.$scope.$new();
modalScope.invitesSent = this.get.bind(this); modalScope.invitesSent = this.get.bind(this);
...@@ -106,6 +110,7 @@ export class OrgUsersCtrl { ...@@ -106,6 +110,7 @@ export class OrgUsersCtrl {
scope: modalScope scope: modalScope
}); });
} }
} }
coreModule.controller('OrgUsersCtrl', OrgUsersCtrl); coreModule.controller('OrgUsersCtrl', OrgUsersCtrl);
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
Users ({{ctrl.users.length}}) Users ({{ctrl.users.length}})
</a> </a>
</li> </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}"> <a class="gf-tabs-link" ng-click="ctrl.editor.index = 1" ng-class="{active: ctrl.editor.index === 1}">
Pending Invitations ({{ctrl.pendingInvites.length}}) Pending Invitations ({{ctrl.pendingInvites.length}})
</a> </a>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</table> </table>
</div> </div>
<div ng-if="ctrl.editor.index === 1 && ctrl.showInviteUI"> <div ng-if="ctrl.editor.index === 1">
<table class="filter-table form-inline"> <table class="filter-table form-inline">
<thead> <thead>
<tr> <tr>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<td>{{invite.email}}</td> <td>{{invite.email}}</td>
<td>{{invite.name}}</td> <td>{{invite.name}}</td>
<td class="text-right"> <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 <i class="fa fa-clipboard"></i> Copy Invite
</button> </button>
&nbsp; &nbsp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment