general tweaks and start on featured datasets paging

This commit is contained in:
Alex Martzios 2022-07-06 10:12:05 +03:00
parent 4d8897d743
commit cd7a6722ac
9 changed files with 26 additions and 21 deletions

View File

@ -6,7 +6,7 @@
<img *ngIf="organization.logo_url"
[src]="organization.logo_url | urlPrefix"
alt="{{(organization.name)?organization.name:''}} logo"
class="uk-blend-multiply" loading="lazy">
class="uk-blend-multiply uk-height-max-xsmall" loading="lazy">
</div>
<div class="affiliation-name multi-line-ellipsis lines-3" *ngIf="organization.name && fullView">
<p class="uk-text-emphasis uk-text-bold uk-margin-remove">

View File

@ -19,9 +19,6 @@ import {properties} from "../../environments/environment";
width: 260px !important;
height: 260px !important;
}
.affiliation-logo img {
max-height: 60px !important;
}
.supportingOrganizations img, svg {
-webkit-filter: grayscale(1);
filter: grayscale(1);

View File

@ -1,7 +1,4 @@
<div>
<div id="stickhere">
</div>
<ng-template #tab_content
let-resultType="resultType" let-fetch="fetch" let-searchLinkToAdvancedPage="searchLinkToAdvancedPage"
let-params="params" let-type="type" let-typeName="typeName" let-showImpactFactors="showImpactFactors">
@ -730,13 +727,18 @@
<search-tab [fetch]="fetchFeaturedDatasets" [resultType]="'dataset'"
[properties]="properties" customTitle="Featured Datasets"
[showImpactFactors]="false" [showEnermaps]="true">
<div class="uk-margin-top uk-margin-bottom uk-text-meta">
<div class="uk-margin-top uk-margin-medium-bottom uk-text-meta">
<div>Here are listed some of the most important energy datasets as selected by energy experts.</div>
<div>
Check them if you want to easily explore and visualize the European energy landscape,
using only well-known datasets which you can trust.
</div>
</div>
<!-- <no-load-paging *ngIf="fetchFeaturedDatasets && fetchFeaturedDatasets.results.length > size" [type]="'Featured Datasets'"
(pageChange)="updatePage($event)"
[page]="page" [pageSize]="size"
[totalResults]="fetchFeaturedDatasets.results.length" >
</no-load-paging> -->
</search-tab>
</div>
</div>

View File

@ -98,6 +98,9 @@ export class CommunityComponent {
public thresholdDescription: number = 500;
public descriptionDiff: number = 100;
page = 1;
size = 5;
subscribers: number = 0;
subs: Subscription[] = [];
@ -388,6 +391,7 @@ export class CommunityComponent {
)
) {
this.fetchFeaturedDatasets.getAllResultsForCommunity("dataset", this.communityId, page, size, this.properties, "enermaps::selection");
// console.log(this.fetchFeaturedDatasets);
}
this.reloadFeaturedDatasets = false;
}
@ -660,5 +664,9 @@ export class CommunityComponent {
disableSelectChange(event: boolean) {
this.disableSelect = event;
this.cdr.detectChanges();
}
public updatePage(event) {
this.page = event.value;
}
}

View File

@ -33,6 +33,7 @@ import {AdvancedSearchInputModule} from '../openaireLibrary/sharedComponents/adv
import {InputModule} from '../openaireLibrary/sharedComponents/input/input.module';
import {QuickSelectionsModule} from '../openaireLibrary/searchPages/searchUtils/quick-selections.module';
import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
import {NoLoadPaging} from '../openaireLibrary/searchPages/searchUtils/no-load-paging.module';
@NgModule({
imports: [
@ -42,7 +43,7 @@ import {IconsModule} from '../openaireLibrary/utils/icons/icons.module';
SearchResearchResultsServiceModule, SearchResultsModule, CuratorsModule, AffiliationsModule,
SEOServiceModule, MatSelectModule, EntitiesSelectionModule,
TabsModule, SearchTabModule, ErrorMessagesModule, SafeHtmlPipeModule, ErrorModule,
AdvancedSearchInputModule, InputModule, QuickSelectionsModule, IconsModule
AdvancedSearchInputModule, InputModule, QuickSelectionsModule, IconsModule, NoLoadPaging
],
declarations: [
CommunityComponent

View File

@ -103,11 +103,12 @@ export class CuratorsComponent {
private getCurators() {
this.subs.push(this.curatorsService.getCurators(this.properties, this.community.communityId).subscribe(curators => {
this.curators = curators;
for (let i = 0; i < this.curators.length; i++) {
this.showMore[i] = false;
}
this.showLoading = false;
}));
this.showLoading = false;
}, error => {
console.error(error);
this.curators = [];
this.showLoading = false;
}));
}
private getPageContents() {
@ -122,10 +123,6 @@ export class CuratorsComponent {
}));
}
public toggle(index: number) {
this.showMore[index] = !this.showMore[index];
}
format(name: string) {
if (name) {
return (((name).length > this.maxCharacters) ? (name.substring(0, (this.maxCharacters - ('...').length)) + '...') : name);

View File

@ -92,7 +92,7 @@
[page]="page" [pageSize]="size"
[totalResults]="communityIds.length" >
</no-load-paging>
<div *ngIf="communityIds && communityIds.length > 0" class="uk-grid uk-grid-medium uk-grid-match uk-child-width-1-2@m" uk-grid
<div *ngIf="communityIds && communityIds.length > 0" class="uk-grid uk-grid-medium uk-grid-match uk-child-width-1-2@m uk-margin-top" uk-grid
uk-height-match="target: .header, .body">
<ng-template ngFor let-item [ngForOf]="communityIds" let-i="index">
<div *ngIf="i>=((page-1)*size) && i < communityIds.length && i< this.page * this.size && communities[this.communityIds[i]['zenodoid']]"

@ -1 +1 @@
Subproject commit de829d2bccc33b4231c1c1349dd449a2dfb1f8c4
Subproject commit db5c95fe248c0e4fe059602185ee8a6161d9949f

@ -1 +1 @@
Subproject commit 8f8b85e69d5c505ed59b12b8b70348096f339775
Subproject commit 32040ce807ad4945e7682b39a3fbc6faecf2f619