minor ui fix
This commit is contained in:
parent
64fd1449b9
commit
bb80a3ddff
|
@ -1,7 +1,7 @@
|
||||||
<div class="main-content listing-main-container h-100">
|
<div class="main-content listing-main-container h-100">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div *ngIf="!hasListingItems && !hasFilters" class="col-12 card mt-0">
|
<div *ngIf="hasLoadedListingItems && !hasListingItems && !hasFilters" class="col-12 card mt-0">
|
||||||
<div class="card-content info-text mb-0">
|
<div class="card-content info-text mb-0">
|
||||||
<p>{{'DMP-LISTING.TEXT-INFO' | translate}}</p>
|
<p>{{'DMP-LISTING.TEXT-INFO' | translate}}</p>
|
||||||
<p class="mt-4 pt-2">{{'DMP-LISTING.TEXT-INFO-QUESTION' | translate}} <a class="zenodo-link" href="https://zenodo.org/communities/liber-dmp-cat/?page=1&size=20" target="_blank">{{'DMP-LISTING.LINK-ZENODO' | translate}}</a> {{'DMP-LISTING.GET-IDEA' | translate}}</p>
|
<p class="mt-4 pt-2">{{'DMP-LISTING.TEXT-INFO-QUESTION' | translate}} <a class="zenodo-link" href="https://zenodo.org/communities/liber-dmp-cat/?page=1&size=20" target="_blank">{{'DMP-LISTING.LINK-ZENODO' | translate}}</a> {{'DMP-LISTING.GET-IDEA' | translate}}</p>
|
||||||
|
@ -11,17 +11,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="hasListingItems || hasFilters" class="col-12">
|
<div *ngIf="hasLoadedListingItems" class="col-12">
|
||||||
<app-navigation-breadcrumb />
|
<app-navigation-breadcrumb />
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="hasListingItems || hasFilters" class="filter-btn" [style.right]="dialog.getDialogById('filters') ? '446px' : '0px'" [style.width]="listingItems.length > 2 ? '57px' : '37px'" (click)="openFiltersDialog()">
|
<div *ngIf="hasLoadedListingItems && (hasListingItems || hasFilters)" class="filter-btn" [style.right]="dialog.getDialogById('filters') ? '446px' : '0px'" [style.width]="listingItems.length > 2 ? '57px' : '37px'" (click)="openFiltersDialog()">
|
||||||
<button mat-raised-button class="p-0" [matBadge]="filtersCount" [matBadgeHidden]="!hasFilters" matBadgePosition="before">
|
<button mat-raised-button class="p-0" [matBadge]="filtersCount" [matBadgeHidden]="!hasFilters" matBadgePosition="before">
|
||||||
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
<mat-icon class="mr-4 filter-icon">filter_alt</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="listing row pb-2">
|
<div *ngIf="hasLoadedListingItems" class="listing row pb-2">
|
||||||
<div *ngIf="hasListingItems || hasFilters" class="col-md-12">
|
<div *ngIf="hasListingItems || hasFilters" class="col-md-12">
|
||||||
<div class="row pt-4">
|
<div class="row pt-4">
|
||||||
<!-- Sort by -->
|
<!-- Sort by -->
|
||||||
|
|
|
@ -53,6 +53,7 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
||||||
totalCount: number;
|
totalCount: number;
|
||||||
listingItems: any[] = [];
|
listingItems: any[] = [];
|
||||||
isPublic: boolean = false;
|
isPublic: boolean = false;
|
||||||
|
hasLoadedListingItems: boolean = false;
|
||||||
protected ITEMS_PER_PAGE = 5;
|
protected ITEMS_PER_PAGE = 5;
|
||||||
pageSize: number = 5;
|
pageSize: number = 5;
|
||||||
filtersCount: number;
|
filtersCount: number;
|
||||||
|
@ -186,14 +187,17 @@ export class DmpListingComponent extends BaseListingComponent<BaseDmp, DmpLookup
|
||||||
this.totalCount = result.count;
|
this.totalCount = result.count;
|
||||||
if (this.lookup?.page?.offset === 0) this.listingItems = [];
|
if (this.lookup?.page?.offset === 0) this.listingItems = [];
|
||||||
this.listingItems.push(...result.items);
|
this.listingItems.push(...result.items);
|
||||||
|
this.hasLoadedListingItems = true;
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
return this.dmpService.query(this.lookup).pipe(takeUntil(this._destroyed))
|
return this.dmpService.query(this.lookup).pipe(takeUntil(this._destroyed))
|
||||||
.pipe(tap(result => {
|
.pipe(tap(result => {
|
||||||
|
this.hasLoadedListingItems = true;
|
||||||
if (!result) { return []; }
|
if (!result) { return []; }
|
||||||
this.totalCount = result.count;
|
this.totalCount = result.count;
|
||||||
if (this.lookup?.page?.offset === 0) this.listingItems = [];
|
if (this.lookup?.page?.offset === 0) this.listingItems = [];
|
||||||
this.listingItems.push(...result.items);
|
this.listingItems.push(...result.items);
|
||||||
|
this.hasLoadedListingItems = true;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue