Enable invite button for byInvitation commmunities with a link to admin portal.
This commit is contained in:
parent
7841e84ca1
commit
cc5d3cbdb3
|
@ -89,7 +89,7 @@ import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sideba
|
|||
</div>
|
||||
<div id="joinAndInviteBtn" *ngIf="isClient && communityId && community">
|
||||
<subscribe *ngIf="community.isOpen()" [communityId]="community.communityId"></subscribe>
|
||||
<invite *ngIf="isManager && community.isOpen()" [longView]="false"></invite>
|
||||
<invite *ngIf="isManager" [longView]="false" [communityId]="communityId" [isOpen]="community.isOpen()"></invite>
|
||||
</div>
|
||||
<!--feedback *ngIf= "isClient && properties" portalName="Connect" [feedbackQuestionaire]=properties.feedbackQuestionaire></feedback-->
|
||||
<cookie-law *ngIf="isClient" position="bottom">
|
||||
|
|
|
@ -30,8 +30,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div *ngIf="!longView" class="uk-margin-top">
|
||||
<a id="invite" routerLink="/invite" class="uk-button uk-flex uk-flex-middle uk-flex-center">
|
||||
<a *ngIf="isOpen" id="invite" routerLink="/invite" class="uk-button uk-flex uk-flex-middle uk-flex-center">
|
||||
<icon name="person_add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Invite users</span>
|
||||
</a>
|
||||
<a *ngIf="!isOpen" id="invite" [href]="this.adminInviteURL" target="_blank" class="uk-button uk-flex uk-flex-middle uk-flex-center">
|
||||
<icon name="person_add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Invite members</span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -21,6 +21,7 @@ declare var UIkit;
|
|||
export class InviteComponent implements OnInit {
|
||||
@Input() longView: boolean = true;
|
||||
@Input() communityId = null;
|
||||
@Input() isOpen: boolean = true;
|
||||
public properties: EnvProperties = properties;
|
||||
public pageTitle: string = "Invite";
|
||||
public user: User;
|
||||
|
@ -44,9 +45,9 @@ export class InviteComponent implements OnInit {
|
|||
user => {
|
||||
this.user = user;
|
||||
}));
|
||||
this.getPageContents();
|
||||
this.url = this.properties.domain + this._router.url;
|
||||
if(this.longView) {
|
||||
this.url = this.properties.domain + this._router.url;
|
||||
this.getPageContents();
|
||||
this.seoService.createLinkForCanonicalURL(this.url);
|
||||
this.updateUrl(this.url);
|
||||
this.updateTitle(this.pageTitle);
|
||||
|
@ -88,6 +89,10 @@ export class InviteComponent implements OnInit {
|
|||
private updateUrl(url: string) {
|
||||
this._meta.updateTag({content: url}, "property='og:url'");
|
||||
}
|
||||
|
||||
get adminInviteURL() {
|
||||
return this.properties.adminPortalURL + '/' + this.communityId + '/users/member';
|
||||
}
|
||||
|
||||
close(element) {
|
||||
UIkit.dropdown(element).hide();
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#joinAndInviteBtn #join,
|
||||
#joinAndInviteBtn #member,
|
||||
#joinAndInviteBtn #invite {
|
||||
width: 140px;
|
||||
width: 160px;
|
||||
line-height: 60px;
|
||||
height: 60px;
|
||||
padding: 0 20px;
|
||||
|
|
Loading…
Reference in New Issue