[Library | Trunk]: Add invite disable message on role-users and subscribers invite button
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@61007 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
bf3e5d9b97
commit
46890464da
|
@ -20,18 +20,20 @@
|
||||||
<div *ngIf="!showCurrent" search-input [control]="filterForm.get('active')" [showSearch]="false" [placeholder]="'Search invitations'"
|
<div *ngIf="!showCurrent" search-input [control]="filterForm.get('active')" [showSearch]="false" [placeholder]="'Search invitations'"
|
||||||
[bordered]="true" colorClass="uk-text-secondary">
|
[bordered]="true" colorClass="uk-text-secondary">
|
||||||
</div>
|
</div>
|
||||||
<a *ngIf="exists" class="uk-text-uppercase uk-flex uk-flex-middle uk-flex-center" (click)="openInviteModal()">
|
<a *ngIf="exists" class="uk-text-uppercase uk-flex uk-flex-middle uk-flex-center" [attr.uk-tooltip]="inviteDisableMessage">
|
||||||
<button class="uk-icon-button large uk-button-secondary">
|
<button class="uk-icon-button large uk-button-secondary" [disabled]="loadPending || !!inviteDisableMessage" (click)="openInviteModal()">
|
||||||
<icon name="person_add"></icon>
|
<icon name="person_add"></icon>
|
||||||
</button>
|
</button>
|
||||||
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Invite {{role}}</button>
|
<button class="uk-button uk-button-link uk-margin-small-left" [class.uk-text-secondary]="!loadPending && !inviteDisableMessage"
|
||||||
|
[disabled]="loadPending || !!inviteDisableMessage" (click)="openInviteModal()">
|
||||||
|
Invite {{role}}
|
||||||
|
</button>
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="!exists && isPortalAdmin" class="uk-text-uppercase uk-flex uk-flex-middle uk-flex-center"
|
<a *ngIf="!exists && isPortalAdmin" class="uk-text-uppercase uk-flex uk-flex-middle uk-flex-center">
|
||||||
(click)="openCreateRoleModal()">
|
<button class="uk-icon-button large uk-button-secondary" (click)="openCreateRoleModal()">
|
||||||
<button class="uk-icon-button large uk-button-secondary">
|
|
||||||
<icon name="person_add"></icon>
|
<icon name="person_add"></icon>
|
||||||
</button>
|
</button>
|
||||||
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Create Group</button>
|
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary" (click)="openCreateRoleModal()">Create Group</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,6 +36,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
public emailComposer: Function;
|
public emailComposer: Function;
|
||||||
@Input()
|
@Input()
|
||||||
public notificationFn: Function;
|
public notificationFn: Function;
|
||||||
|
@Input()
|
||||||
|
public inviteDisableMessage: string;
|
||||||
public user: User = null;
|
public user: User = null;
|
||||||
public active: any[];
|
public active: any[];
|
||||||
public showActive: any[] = [];
|
public showActive: any[] = [];
|
||||||
|
|
|
@ -7,12 +7,16 @@
|
||||||
[bordered]="true" colorClass="uk-text-secondary">
|
[bordered]="true" colorClass="uk-text-secondary">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a *ngIf="exists" class="uk-text-uppercase uk-flex uk-flex-middle"
|
<a *ngIf="exists" class="uk-text-uppercase uk-flex uk-flex-middle" [attr.uk-tooltip]="(inviteDisableMessage)">
|
||||||
[class.uk-disabled]="!subscriberInvite || subscriberInvite.loading" (click)="openInviteModal()">
|
<button class="uk-icon-button large uk-button-secondary" (click)="openInviteModal()"
|
||||||
<button class="uk-icon-button large uk-button-secondary">
|
[disabled]="!subscriberInvite || subscriberInvite.loading || !!inviteDisableMessage">
|
||||||
<icon name="person_add"></icon>
|
<icon name="person_add"></icon>
|
||||||
</button>
|
</button>
|
||||||
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Invite Subscribers</button>
|
<button class="uk-button uk-button-link uk-margin-small-left" (click)="openInviteModal()"
|
||||||
|
[disabled]="!subscriberInvite || subscriberInvite.loading || !!inviteDisableMessage"
|
||||||
|
[class.uk-text-secondary]="subscriberInvite && !subscriberInvite.loading && !inviteDisableMessage">
|
||||||
|
Invite Subscribers
|
||||||
|
</button>
|
||||||
</a>
|
</a>
|
||||||
<a *ngIf="!exists && isPortalAdmin" class="uk-text-uppercase uk-flex uk-flex-middle"
|
<a *ngIf="!exists && isPortalAdmin" class="uk-text-uppercase uk-flex uk-flex-middle"
|
||||||
(click)="openCreateRoleModal()">
|
(click)="openCreateRoleModal()">
|
||||||
|
|
|
@ -38,6 +38,8 @@ export class SubscribersComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
public link: string;
|
public link: string;
|
||||||
@Input()
|
@Input()
|
||||||
public message: string = null;
|
public message: string = null;
|
||||||
|
@Input()
|
||||||
|
public inviteDisableMessage: string;
|
||||||
public user: User = null;
|
public user: User = null;
|
||||||
public managers: any[];
|
public managers: any[];
|
||||||
public subscribers: any[];
|
public subscribers: any[];
|
||||||
|
|
Loading…
Reference in New Issue