Search - add tooltip for research products

This commit is contained in:
Alex Martzios 2022-07-29 12:24:15 +03:00
parent 5cb7bc7cca
commit aaf8c50c68
2 changed files with 3 additions and 2 deletions

View File

@ -78,7 +78,7 @@ export class EntitiesSelectionComponent {
}
if(showPage[this.simpleView ? this.properties.searchLinkToResults : this.properties.searchLinkToAdvancedResults]
&& (showEntity["publication"] || showEntity["dataset"] || showEntity["software"] || showEntity["orp"])) {
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result'});
this.entities.push({label: OpenaireEntities.RESULTS, value: 'result', tooltip: OpenaireEntities.PUBLICATIONS+', '+OpenaireEntities.DATASETS+', '+OpenaireEntities.SOFTWARE+', '+OpenaireEntities.OTHER});
}
if(showPage[this.simpleView ? this.properties.searchLinkToProjects : this.properties.searchLinkToAdvancedProjects] && showEntity["project"]) {
this.entities.push({label: OpenaireEntities.PROJECTS, value: 'project'});

View File

@ -27,6 +27,7 @@ export interface Option {
iconClass?: string,
value: any,
label: string,
tooltip?: string,
disabled?: boolean
}
@ -143,7 +144,7 @@ declare var UIkit;
<li *ngFor="let option of filteredOptions; let i=index" [class.uk-active]="(formControl.value === option.value) || selectedIndex === i">
<a (click)="selectOption(option, $event)"
[class]="option.disabled ? 'uk-disabled uk-text-muted' : ''">
<span [attr.uk-tooltip]="(tooltip)?('title: ' + option.label + '; delay: 500; pos:bottom-left'):null">{{option.label}}</span>
<span [attr.uk-tooltip]="(tooltip)?('title: ' + (option.tooltip ? option.tooltip : option.label) + '; delay: 500; pos:bottom-left'):null">{{option.label}}</span>
</a>
</li>
</ul>