resultLanding: in versions modal, expand authors instead of opening them in a new modal
This commit is contained in:
parent
53d8440171
commit
29723188bc
|
@ -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"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue