56 lines
1.9 KiB
TypeScript
56 lines
1.9 KiB
TypeScript
import {Component, ViewChild, Input} from '@angular/core';
|
|
import {Location} from '@angular/common';
|
|
import {Title, Meta} from '@angular/platform-browser';
|
|
|
|
import {Observable} from 'rxjs/Observable';
|
|
|
|
|
|
@Component({
|
|
selector: 'claims-admin',
|
|
template: `
|
|
|
|
<div id="tm-main" [class]="((isConnect)?'':'uk-section') +' uk-margin-small-top tm-middle'" >
|
|
<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">
|
|
Manage links
|
|
</div>
|
|
<div>
|
|
<!--div class="uk-text-right">
|
|
<a *ngIf="!fetchBy || fetchBy != 'Context'" routerLink="/participate/claim">Claim more links?</a>
|
|
<a *ngIf="isConnect && fetchBy && fetchBy == 'Context' && fetchId" [href]="'https://beta.'+fetchId+'.openaire.eu/participate/claim'" target="_blank">Claim more links?</a>
|
|
</div-->
|
|
<displayClaims [enableDelete]=true [myClaims]=false [isAdmin]=true [fetchBy]= fetchBy [fetchId]=fetchId
|
|
[communityId]="(fetchBy && fetchBy == 'Context')?fetchId:null" [moreClaimsURL]=moreClaimsURL [claimsInfoURL]=claimsInfoURL></displayClaims>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
`,
|
|
|
|
})
|
|
export class ClaimsAdminComponent {
|
|
@Input() fetchBy:string;
|
|
@Input() fetchId:string;
|
|
@Input() isConnect:boolean = false;
|
|
@Input() moreClaimsURL:string;
|
|
@Input() claimsInfoURL:string;
|
|
constructor ( private _meta: Meta, private _title: Title) {
|
|
var titleConnect = "OpenAIRE Connect | Manage links ";
|
|
var title = "OpenAIRE | Manage links ";
|
|
|
|
if(this.isConnect) {
|
|
this._title.setTitle(titleConnect);
|
|
} else {
|
|
this._title.setTitle(title);
|
|
}
|
|
|
|
|
|
}
|
|
ngOnInit() {
|
|
}
|
|
}
|