Merge branch 'explore-redesign' of code-repo.d4science.org:MaDgIK/openaire-library into explore-redesign

This commit is contained in:
Konstantinos Triantafyllou 2023-05-12 17:25:20 +03:00
commit bfd1bc3f0b
5 changed files with 7 additions and 5 deletions

View File

@ -27,7 +27,7 @@ import {HelperFunctions} from "../../../utils/HelperFunctions.class";
<ul class="uk-list uk-margin"> <ul class="uk-list uk-margin">
<li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)"> <li *ngFor="let result of results.slice((page-1)*pageSize, page*pageSize)">
<result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)" <result-preview [modal]="modal" [properties]="properties" [hasLink]="false" [result]="getResultPreview(result)"
[showOrcid]="false" [isCard]="false" [prevPath]="prevPath"></result-preview> [showOrcid]="false" [isCard]="false" [prevPath]="prevPath" [showInline]="true"></result-preview>
</li> </li>
</ul> </ul>
<no-load-paging *ngIf="results.length > pageSize" [type]="type" <no-load-paging *ngIf="results.length > pageSize" [type]="type"

View File

@ -548,7 +548,7 @@ export class ResultLandingComponent {
this.enermapsId = ParsingFunctions.getEnermapsConceptId(this.resultLandingInfo.contexts); this.enermapsId = ParsingFunctions.getEnermapsConceptId(this.resultLandingInfo.contexts);
} }
this.relatedClassFilters = [{"label": "All relations", "value": ""}];
if(this.resultLandingInfo.relatedClassFilters.size > 1) { if(this.resultLandingInfo.relatedClassFilters.size > 1) {
for (let relClass of this.resultLandingInfo.relatedClassFilters) { for (let relClass of this.resultLandingInfo.relatedClassFilters) {
this.relatedClassFilters.push({"label": HelperFunctions.getVocabularyLabel(relClass, this.relationsVocabulary), "value": relClass}); this.relatedClassFilters.push({"label": HelperFunctions.getVocabularyLabel(relClass, this.relationsVocabulary), "value": relClass});

View File

@ -102,7 +102,7 @@ import {properties} from "../../../../environments/environment";
</div> </div>
</modal-alert> </modal-alert>
<fs-modal *ngIf="isMobile" #authorsModal> <fs-modal *ngIf="isMobile" #authorsModal classTitle="uk-tile-default uk-border-bottom">
<div class="uk-text-small uk-text-emphasis uk-grid uk-grid-column-collapse uk-grid-row-small" uk-grid> <div class="uk-text-small uk-text-emphasis uk-grid uk-grid-column-collapse uk-grid-row-small" uk-grid>
<ng-container *ngFor="let author of authors; let i=index"> <ng-container *ngFor="let author of authors; let i=index">
<ng-container *ngTemplateOutlet="author_template; context: { author: author, i:i}"></ng-container> <ng-container *ngTemplateOutlet="author_template; context: { author: author, i:i}"></ng-container>
@ -121,6 +121,7 @@ export class ShowAuthorsComponent {
@Input() showAll: boolean = true; @Input() showAll: boolean = true;
@Input() modal: AlertModal; @Input() modal: AlertModal;
@Input() viewAll: boolean = false; @Input() viewAll: boolean = false;
@Input() showInline: boolean = false; // do not open modal for "view more" when this is true
public lessBtn: boolean = false; public lessBtn: boolean = false;
@ViewChild('authorsModal') authorsModal; @ViewChild('authorsModal') authorsModal;
@ -143,7 +144,7 @@ export class ShowAuthorsComponent {
} }
public viewAllClick() { public viewAllClick() {
if(this.authors.length <= this.authorsLimit*2) { if(this.authors.length <= this.authorsLimit*2 || this.showInline) {
this.viewAll = true; this.viewAll = true;
this.lessBtn = true; this.lessBtn = true;
} else { } else {

View File

@ -124,7 +124,7 @@
<!-- Authors --> <!-- Authors -->
<div *ngIf="result.authors" class="uk-margin-xsmall-bottom"> <div *ngIf="result.authors" class="uk-margin-xsmall-bottom">
<showAuthors [authors]="result.authors" [authorsLimit]=4 [modal]="modal" <showAuthors [authors]="result.authors" [authorsLimit]=4 [modal]="modal"
[showAll]=true></showAuthors> [showAll]=true [showInline]="showInline"></showAuthors>
</div> </div>
<!-- Identifiers --> <!-- Identifiers -->
<div *ngIf="result.identifiers && result.identifiers.size > 0" class="uk-margin-xsmall-bottom"> <div *ngIf="result.identifiers && result.identifiers.size > 0" class="uk-margin-xsmall-bottom">

View File

@ -37,6 +37,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
@Input() showEnermaps: boolean = false; @Input() showEnermaps: boolean = false;
@Input() provenanceActionVocabulary = null; @Input() provenanceActionVocabulary = null;
@Input() relationsVocabulary = null; @Input() relationsVocabulary = null;
@Input() showInline: boolean = false; // do not open modal for "view more" when this is true
/* Metadata */ /* Metadata */
public type: string; public type: string;