Enable membership and add condition in users->members
This commit is contained in:
parent
2f9b12c478
commit
8e27e29605
|
@ -1 +1 @@
|
|||
Subproject commit 5e4aaab04f89446f956d524469ef2a856f556de5
|
||||
Subproject commit c12916583247fc225ee49c4851b8b4183edc2be0
|
|
@ -77,22 +77,21 @@ import {ClearCacheService} from "../../../../openaireLibrary/services/clear-cach
|
|||
<!-- Full width error message -->
|
||||
<div *ngIf="uploadError" class="uk-text-danger uk-margin-small-top uk-width-1-1">{{uploadError}}</div>
|
||||
</div>
|
||||
<div class="uk-width-1-2@m">
|
||||
<div class="uk-width-1-3@m">
|
||||
<div input [formInput]="communityFb.get('status')"
|
||||
placeholder="Visibility status for your community's profile."
|
||||
[options]="statuses" type="select"></div>
|
||||
</div>
|
||||
<div class="uk-width-1-2@m">
|
||||
<div class="uk-width-1-3@m">
|
||||
<div input [formInput]="communityFb.get('claim')"
|
||||
placeholder="Who can create links for your community"
|
||||
[options]="claimOptions" type="select"></div>
|
||||
</div>
|
||||
<!-- Hide until the functionality is ready-->
|
||||
<!-- <div class="uk-width-1-2@m">
|
||||
<div class="uk-width-1-3@m">
|
||||
<div input [formInput]="communityFb.get('membership')"
|
||||
placeholder="Who can join"
|
||||
[options]="membershipOptions" type="select"></div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
`,
|
||||
|
|
|
@ -25,12 +25,11 @@ export class UsersManagersComponent implements OnInit {
|
|||
public message: string;
|
||||
public inviteDisableMessage: string;
|
||||
public emailComposer: Function = (name, recipient, role):Email => {
|
||||
return Composer.composeEmailForCommunityDashboard(name, recipient);
|
||||
return Composer.composeEmailForCommunityDashboard(name, role, recipient);
|
||||
}
|
||||
private subscriptions: any[] = [];
|
||||
|
||||
constructor(private communityService: CommunityService,
|
||||
private route: ActivatedRoute,
|
||||
private title: Title) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,24 +4,36 @@ import {ActivatedRoute} from "@angular/router";
|
|||
import {CommunityService} from "../../../openaireLibrary/connect/community/community.service";
|
||||
import {Subscriber} from "rxjs";
|
||||
import {CommunityInfo} from "../../../openaireLibrary/connect/community/communityInfo";
|
||||
import {Email} from "../../../openaireLibrary/utils/email/email";
|
||||
import {Composer} from "../../../openaireLibrary/utils/email/composer";
|
||||
import {properties} from "../../../../environments/environment";
|
||||
|
||||
@Component({
|
||||
selector: 'users-subscribers',
|
||||
template: `
|
||||
<subscribers [id]="community.communityId" [type]="'community'" [name]="community.shortTitle"
|
||||
<subscribers *ngIf="community.isOpen()" [id]="community.communityId" [type]="'community'" [name]="community.shortTitle"
|
||||
[inviteDisableMessage]="inviteDisableMessage">
|
||||
<users-tabs tab="member"></users-tabs>
|
||||
</subscribers>
|
||||
<role-users *ngIf="!community.isOpen()" [id]="community.communityId" [type]="community.type" [name]="community.shortTitle" [inviteDisableMessage]="inviteDisableMessage"
|
||||
[link]="link" [role]="'member'"
|
||||
[message]="message" [emailComposer]="emailComposer">
|
||||
<users-tabs tab="member"></users-tabs>
|
||||
</role-users>
|
||||
`
|
||||
})
|
||||
export class UsersSubscribersComponent implements OnInit {
|
||||
public community: CommunityInfo;
|
||||
public link: string;
|
||||
public loading: boolean;
|
||||
public message: string;
|
||||
public inviteDisableMessage: string;
|
||||
public emailComposer: Function = (name, recipient, role):Email => {
|
||||
return Composer.composeEmailForCommunityDashboard(name, role, recipient);
|
||||
}
|
||||
private subscriptions: any[] = [];
|
||||
|
||||
constructor(private communityService: CommunityService,
|
||||
private route: ActivatedRoute,
|
||||
private title: Title) {
|
||||
}
|
||||
|
||||
|
@ -30,7 +42,10 @@ export class UsersSubscribersComponent implements OnInit {
|
|||
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
|
||||
if(community) {
|
||||
this.community = community;
|
||||
this.title.setTitle(this.community.shortTitle.toUpperCase() + " | Subscribers");
|
||||
this.title.setTitle(this.community.shortTitle.toUpperCase() + " | Members");
|
||||
this.link = this.getURL(this.community.communityId);
|
||||
this.message = 'A member can access the community dashboard and link research results with projects, ' +
|
||||
'communities and other research projects.';
|
||||
if(community.status !== "all") {
|
||||
this.inviteDisableMessage = "Community's status is " + (community.status === 'manager'?'Visible to managers':'Hidden') + " and invitation to join the Research community dashboard is disabled. Update the community status to enable invitations."
|
||||
}
|
||||
|
@ -46,4 +61,8 @@ export class UsersSubscribersComponent implements OnInit {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
private getURL(id: string): string {
|
||||
return 'https://' + (properties.environment !== "production"?'beta.':'') + id + ".openaire.eu?verify=";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,12 @@ import {LoadingModule} from "../../../openaireLibrary/utils/loading/loading.modu
|
|||
import {RouterModule} from "@angular/router";
|
||||
import {SubscribersModule} from "../../../openaireLibrary/dashboard/users/subscribers/subscribers.module";
|
||||
import {UsersTabsModule} from '../users-tabs.module';
|
||||
import {RoleUsersModule} from "../../../openaireLibrary/dashboard/users/role-users/role-users.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, LoadingModule, RouterModule.forChild([
|
||||
{path: '', component: UsersSubscribersComponent}
|
||||
]), SubscribersModule, UsersTabsModule],
|
||||
]), SubscribersModule, UsersTabsModule, RoleUsersModule],
|
||||
declarations: [UsersSubscribersComponent],
|
||||
exports: [UsersSubscribersComponent]
|
||||
})
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ac458b5a6d156167d7b6c9005ef1f9cfac75d3ae
|
||||
Subproject commit 2df4b377a3e89b7dd26a011a2e1e1f07fdcedf2a
|
Loading…
Reference in New Issue