[master] upload dois: fixed keyword search that caused view breaking
This commit is contained in:
parent
0cd4af74cf
commit
d7942231a4
|
@ -85,8 +85,9 @@
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
<!-- Main content (left-side) -->
|
<!-- Main content (left-side) -->
|
||||||
<div class="uk-width-3-4@l uk-width-2-3@m uk-width-1-1@s" [class.uk-hidden]="!loading && resultsToShow.length ==0 && showFound">
|
<!-- [class.uk-hidden]="!loading && showFound && resultsToShow.length == 0" -->
|
||||||
<div *ngIf="!loading && resultsToShow.length >0 && showFound">
|
<div class="uk-width-3-4@l uk-width-2-3@m uk-width-1-1">
|
||||||
|
<div *ngIf="!loading && showFound && allIds.length > 0">
|
||||||
<!-- Filters -->
|
<!-- Filters -->
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-small-bottom" style="grid-gap: 10px;">
|
<div class="uk-flex uk-flex-middle uk-margin-small-bottom" style="grid-gap: 10px;">
|
||||||
|
@ -133,8 +134,12 @@
|
||||||
class="uk-width-medium@m uk-width-1-1@s"
|
class="uk-width-medium@m uk-width-1-1@s"
|
||||||
placeholder="Search for DOIs" [value]="keyword" (valueChange)="updateKeyword($event)">
|
placeholder="Search for DOIs" [value]="keyword" (valueChange)="updateKeyword($event)">
|
||||||
</div>
|
</div>
|
||||||
<!-- will this need an if? -->
|
<div>
|
||||||
<div class="uk-margin-small-left">
|
<paging-no-load *ngIf="resultsToShow.length > size" [totalResults]="resultsToShow.length" [size]="size" [currentPage]="page"
|
||||||
|
(pageChange)="updatePage($event)">
|
||||||
|
</paging-no-load>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="uk-margin-small-left">
|
||||||
Viewing {{((page-1)*size + 1)}}-{{resultsToShow.length>(page)*size? (page)*size : resultsToShow.length}} of {{resultsToShow.length}}
|
Viewing {{((page-1)*size + 1)}}-{{resultsToShow.length>(page)*size? (page)*size : resultsToShow.length}} of {{resultsToShow.length}}
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="resultsToShow.length > size">
|
<div *ngIf="resultsToShow.length > size">
|
||||||
|
@ -142,12 +147,10 @@
|
||||||
<li><a class="uk-icon-button uk-icon-button-small" [class.uk-disabled]="page <= 1" (click)="updatePage(page-1)"><span uk-pagination-previous></span></a></li>
|
<li><a class="uk-icon-button uk-icon-button-small" [class.uk-disabled]="page <= 1" (click)="updatePage(page-1)"><span uk-pagination-previous></span></a></li>
|
||||||
<li><a class="uk-icon-button uk-icon-button-small" [class.uk-disabled]="page*size > resultsToShow.length" (click)="updatePage(page+1)"><span uk-pagination-next></span></a></li>
|
<li><a class="uk-icon-button uk-icon-button-small" [class.uk-disabled]="page*size > resultsToShow.length" (click)="updatePage(page+1)"><span uk-pagination-next></span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div> -->
|
||||||
<!--<paging-no-load [totalResults]="foundIds.length" [size]="size" [currentPage]="page"
|
|
||||||
(pageChange)="updatePage($event)"></paging-no-load>-->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Table -->
|
<!-- Table -->
|
||||||
<table class="uk-table uk-table-striped uk-table-middle uk-table-responsive uk-table-hover">
|
<table *ngIf="resultsToShow?.length > 0" class="uk-table uk-table-striped uk-table-middle uk-table-responsive uk-table-hover">
|
||||||
<thead class="uk-text-nowrap">
|
<thead class="uk-text-nowrap">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="uk-width-3-5">
|
<th class="uk-width-3-5">
|
||||||
|
@ -198,8 +201,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<div *ngIf="resultsToShow?.length == 0" class="uk-alert uk-alert-primary uk-margin-medium-top">No results found</div>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="!showFound && !loading">
|
<ng-container *ngIf="!loading && !showFound">
|
||||||
<div *ngIf="notFoundIds.length > 0" class="uk-grid uk-grid-small uk-child-width-1-2@m uk-child-width-1-3@l uk-margin-top" uk-grid>
|
<div *ngIf="notFoundIds.length > 0" class="uk-grid uk-grid-small uk-child-width-1-2@m uk-child-width-1-3@l uk-margin-top" uk-grid>
|
||||||
<div *ngFor="let id of notFoundIds">
|
<div *ngFor="let id of notFoundIds">
|
||||||
<a [href]="properties.doiURL+id" class="custom-external uk-text-break" target="_blank">
|
<a [href]="properties.doiURL+id" class="custom-external uk-text-break" target="_blank">
|
||||||
|
@ -211,10 +215,9 @@
|
||||||
No valid DOIs extracted from the file. Please check the file format. The format should be one DOI per row.
|
No valid DOIs extracted from the file. Please check the file format. The format should be one DOI per row.
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<!-- <div *ngIf="!loading && resultsToShow.length == 0" class="uk-alert uk-alert-primary"> No results found</div>-->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Sidebar (right-side) -->
|
<!-- Sidebar (right-side) -->
|
||||||
<div class="uk-width-1-4@l uk-width-1-3@m uk-width-1-1@s" [class.uk-width-1-1]="!loading && resultsToShow.length ==0">
|
<div class="uk-width-1-4@l uk-width-1-3@m uk-width-1-1" [class.uk-width-1-1]="!loading && resultsToShow.length == 0">
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<ng-container *ngIf="showFound">
|
<ng-container *ngIf="showFound">
|
||||||
<span class="uk-text-bold uk-margin-small-bottom">{{foundIds.length}} results</span> found
|
<span class="uk-text-bold uk-margin-small-bottom">{{foundIds.length}} results</span> found
|
||||||
|
@ -279,7 +282,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -323,8 +323,8 @@ export class UploadDoisComponent implements OnInit {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePage(page) {
|
updatePage($event) {
|
||||||
this.page = page;
|
this.page = $event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateKeyword(keyword){
|
updateKeyword(keyword){
|
||||||
|
|
Loading…
Reference in New Issue