2022-03-16 17:54:22 +01:00
|
|
|
import {Component, Input, ViewChild} from '@angular/core';
|
|
|
|
import {ShowOptions} from './claimHelper.class';
|
|
|
|
import {MatSelect} from "@angular/material/select";
|
[Monitor Dashboard & Library | new-theme]: Renaming entity types using OpenaireEntities.
Files updated: develop.component.ts, methodology.component.ts, claimEntitiesSelection.component.ts, directLinking.component.ts, linkingGeneric.component.html, linkingGeneric.component.ts, approved.component.ts, searchDataprovidersToDeposit.component.ts, errorPage.component.ts, dataProvider.component.html, dataProvider.component.ts, dataProvider.service.ts, relatedDatasourcesTab.component.ts, project.component.ts, myOrcidLinks.component.ts, searchMyOrcidResults.component.html, searchMyOrcidResults.component.ts, searchAll.component.html, searchAll.component.ts, advancedSearchForm.component.html, advancedSearchForm.component.ts, searchDataProviders.component.ts, searchResearchResults.service.ts, numbers.component.ts, other-portals.component.html, other-portals.component.ts, fetchDataproviders.class.ts, fetchResearchResults.class.ts, searchFields.ts, result-preview.component.ts
2022-05-09 12:13:44 +02:00
|
|
|
import {OpenaireEntities} from "../../utils/properties/searchFields";
|
2022-03-16 17:54:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'claim-enities-selection',
|
|
|
|
|
|
|
|
template:`
|
|
|
|
<span *ngIf="showOptions && showOptions.linkToEntities && showOptions.linkToEntities.length > 0"
|
|
|
|
class=" entitiesSelection portal-box uk-text-small clickable" style=""
|
|
|
|
(click)="open()">
|
|
|
|
<mat-select [(value)]="showOptions.show"
|
|
|
|
[disableOptionCentering]="true" >
|
|
|
|
|
[Monitor Dashboard & Library | new-theme]: Renaming entity types using OpenaireEntities.
Files updated: develop.component.ts, methodology.component.ts, claimEntitiesSelection.component.ts, directLinking.component.ts, linkingGeneric.component.html, linkingGeneric.component.ts, approved.component.ts, searchDataprovidersToDeposit.component.ts, errorPage.component.ts, dataProvider.component.html, dataProvider.component.ts, dataProvider.service.ts, relatedDatasourcesTab.component.ts, project.component.ts, myOrcidLinks.component.ts, searchMyOrcidResults.component.html, searchMyOrcidResults.component.ts, searchAll.component.html, searchAll.component.ts, advancedSearchForm.component.html, advancedSearchForm.component.ts, searchDataProviders.component.ts, searchResearchResults.service.ts, numbers.component.ts, other-portals.component.html, other-portals.component.ts, fetchDataproviders.class.ts, fetchResearchResults.class.ts, searchFields.ts, result-preview.component.ts
2022-05-09 12:13:44 +02:00
|
|
|
<mat-option *ngIf="showOptions.linkToEntities.indexOf('result')!=-1" value="result">{{openaireEntities.RESULTS}}</mat-option>
|
|
|
|
<mat-option *ngIf="showOptions.linkToEntities.indexOf('project')!=-1" value="project">{{openaireEntities.PROJECTS}}</mat-option>
|
|
|
|
<mat-option *ngIf="showOptions.linkToEntities.indexOf('context')!=-1" value="context">{{openaireEntities.COMMUNITIES}}</mat-option>
|
2022-03-16 17:54:22 +01:00
|
|
|
|
|
|
|
</mat-select>
|
|
|
|
|
|
|
|
|
|
|
|
</span>
|
|
|
|
`,
|
|
|
|
|
|
|
|
})
|
|
|
|
export class ClaimEntitiesSelectionComponent{
|
|
|
|
@ViewChild(MatSelect) matSelect: MatSelect;
|
|
|
|
@Input() showOptions:ShowOptions = new ShowOptions();
|
[Monitor Dashboard & Library | new-theme]: Renaming entity types using OpenaireEntities.
Files updated: develop.component.ts, methodology.component.ts, claimEntitiesSelection.component.ts, directLinking.component.ts, linkingGeneric.component.html, linkingGeneric.component.ts, approved.component.ts, searchDataprovidersToDeposit.component.ts, errorPage.component.ts, dataProvider.component.html, dataProvider.component.ts, dataProvider.service.ts, relatedDatasourcesTab.component.ts, project.component.ts, myOrcidLinks.component.ts, searchMyOrcidResults.component.html, searchMyOrcidResults.component.ts, searchAll.component.html, searchAll.component.ts, advancedSearchForm.component.html, advancedSearchForm.component.ts, searchDataProviders.component.ts, searchResearchResults.service.ts, numbers.component.ts, other-portals.component.html, other-portals.component.ts, fetchDataproviders.class.ts, fetchResearchResults.class.ts, searchFields.ts, result-preview.component.ts
2022-05-09 12:13:44 +02:00
|
|
|
public openaireEntities = OpenaireEntities;
|
2022-03-16 17:54:22 +01:00
|
|
|
|
|
|
|
open() {
|
|
|
|
if (this.matSelect && !this.matSelect.focused) {
|
|
|
|
this.matSelect.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|