2019-07-24 14:46:29 +02:00
|
|
|
import {Component, Input} from '@angular/core';
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
import {Title, Meta} from '@angular/platform-browser';
|
2019-09-13 09:01:19 +02:00
|
|
|
import {User} from "../../login/utils/helper.class";
|
|
|
|
import {UserManagementService} from "../../services/user-management.service";
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
|
2017-12-19 13:53:46 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'claims-admin',
|
|
|
|
template: `
|
|
|
|
|
2019-07-24 14:46:29 +02:00
|
|
|
<div id="tm-main" [class]="((isConnect)?'':'uk-section') +' uk-padding-remove-top tm-middle'" >
|
2017-12-19 13:53:46 +01:00
|
|
|
<div uk-grid uk-grid>
|
|
|
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
|
|
|
<div class="uk-container">
|
|
|
|
<div class="uk-article-title custom-article-title">
|
2018-10-04 12:12:54 +02:00
|
|
|
Manage links
|
2017-12-19 13:53:46 +01:00
|
|
|
</div>
|
|
|
|
<div>
|
2018-10-25 11:33:56 +02:00
|
|
|
<!--div class="uk-text-right">
|
2018-06-29 13:01:48 +02:00
|
|
|
<a *ngIf="!fetchBy || fetchBy != 'Context'" routerLink="/participate/claim">Claim more links?</a>
|
2019-01-29 15:25:08 +01:00
|
|
|
<a *ngIf="isConnect && fetchBy && fetchBy == 'Context' && externalPortalUrl" [href]="externalPortalUrl+'/participate/claim'" target="_blank">Claim more links?</a>
|
2018-10-25 11:33:56 +02:00
|
|
|
</div-->
|
2019-10-01 10:46:18 +02:00
|
|
|
<displayClaims *ngIf="user" [user]="user" [enableDelete]=true [myClaims]=false
|
|
|
|
[isAdmin]=true [fetchBy]= "(fetchId=='openaire')?null:fetchBy"
|
|
|
|
[fetchId]="(fetchId=='openaire')?null:fetchId"
|
|
|
|
[communityId]="(fetchBy && fetchBy == 'Context' && fetchId && fetchId!='openaire')?fetchId:null"
|
|
|
|
[externalPortalUrl]=externalPortalUrl [claimsInfoURL]=claimsInfoURL
|
|
|
|
title="Manage links"></displayClaims>
|
2017-12-19 13:53:46 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
`,
|
|
|
|
|
|
|
|
})
|
|
|
|
export class ClaimsAdminComponent {
|
2018-02-28 13:31:04 +01:00
|
|
|
@Input() fetchBy:string;
|
|
|
|
@Input() fetchId:string;
|
2018-03-29 10:34:44 +02:00
|
|
|
@Input() isConnect:boolean = false;
|
2019-01-29 15:08:29 +01:00
|
|
|
@Input() externalPortalUrl:string;
|
2018-10-25 11:33:56 +02:00
|
|
|
@Input() claimsInfoURL:string;
|
2019-09-13 09:01:19 +02:00
|
|
|
@Input() userInfoURL: string;
|
|
|
|
public user: User = null;
|
|
|
|
|
|
|
|
constructor ( private _meta: Meta, private _title: Title,
|
|
|
|
private userManagementService: UserManagementService) {
|
2018-10-25 11:33:56 +02:00
|
|
|
var titleConnect = "OpenAIRE Connect | Manage links ";
|
|
|
|
var title = "OpenAIRE | Manage links ";
|
2018-03-16 13:28:19 +01:00
|
|
|
|
Replace meta service import and use with meta and title from angular/platform-browser for user, publication, claimAdmin,claimsByToken, directLinking, linkingGeneric, myClaims, depositBySubject, depositBySubjectResult, deposit, depositResult, dataProvider, htmlProjectReport, organization, project, software, search, advancedSearchPage, searchPage and searchPageTableView component
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51835 d315682c-612b-4755-9ff5-7f18f6832af3
2018-04-17 15:00:23 +02:00
|
|
|
if(this.isConnect) {
|
|
|
|
this._title.setTitle(titleConnect);
|
|
|
|
} else {
|
|
|
|
this._title.setTitle(title);
|
2018-03-16 13:28:19 +01:00
|
|
|
}
|
2018-03-29 10:34:44 +02:00
|
|
|
|
|
|
|
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|
|
|
|
ngOnInit() {
|
2019-09-13 09:01:19 +02:00
|
|
|
this.userManagementService.getUserInfo(this.userInfoURL).subscribe(user => {
|
|
|
|
this.user = user;
|
|
|
|
});
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|
|
|
|
}
|