mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
Merge branch 'main' into feature/CST-5729
This commit is contained in:
@@ -187,6 +187,9 @@ languages:
|
||||
- code: gd
|
||||
label: Gàidhlig
|
||||
active: true
|
||||
- code: it
|
||||
label: Italiano
|
||||
active: true
|
||||
- code: lv
|
||||
label: Latviešu
|
||||
active: true
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { BehaviorSubject, combineLatest as observableCombineLatest } from 'rxjs';
|
||||
|
||||
@@ -49,19 +50,23 @@ export class CommunityPageSubCollectionListComponent implements OnInit, OnDestro
|
||||
*/
|
||||
subCollectionsRDObs: BehaviorSubject<RemoteData<PaginatedList<Collection>>> = new BehaviorSubject<RemoteData<PaginatedList<Collection>>>({} as any);
|
||||
|
||||
constructor(private cds: CollectionDataService,
|
||||
private paginationService: PaginationService,
|
||||
|
||||
) {}
|
||||
constructor(
|
||||
protected cds: CollectionDataService,
|
||||
protected paginationService: PaginationService,
|
||||
protected route: ActivatedRoute,
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.config = new PaginationComponentOptions();
|
||||
this.config.id = this.pageId;
|
||||
if (hasValue(this.pageSize)) {
|
||||
this.config.pageSize = this.pageSize;
|
||||
} else {
|
||||
this.config.pageSize = this.route.snapshot.queryParams[this.pageId + '.rpp'] ?? this.config.pageSize;
|
||||
}
|
||||
this.config.currentPage = 1;
|
||||
this.sortConfig = new SortOptions('dc.title', SortDirection.ASC);
|
||||
this.config.currentPage = this.route.snapshot.queryParams[this.pageId + '.page'] ?? 1;
|
||||
this.sortConfig = new SortOptions('dc.title', SortDirection[this.route.snapshot.queryParams[this.pageId + '.sd']] ?? SortDirection.ASC);
|
||||
this.initPage();
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { BehaviorSubject, combineLatest as observableCombineLatest } from 'rxjs';
|
||||
|
||||
@@ -9,7 +10,6 @@ import { PaginatedList } from '../../core/data/paginated-list.model';
|
||||
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
||||
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
||||
import { CommunityDataService } from '../../core/data/community-data.service';
|
||||
import { takeUntilCompletedRemoteData } from '../../core/shared/operators';
|
||||
import { switchMap } from 'rxjs/operators';
|
||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||
import { hasValue } from '../../shared/empty.util';
|
||||
@@ -52,8 +52,10 @@ export class CommunityPageSubCommunityListComponent implements OnInit, OnDestroy
|
||||
*/
|
||||
subCommunitiesRDObs: BehaviorSubject<RemoteData<PaginatedList<Community>>> = new BehaviorSubject<RemoteData<PaginatedList<Community>>>({} as any);
|
||||
|
||||
constructor(private cds: CommunityDataService,
|
||||
private paginationService: PaginationService
|
||||
constructor(
|
||||
protected cds: CommunityDataService,
|
||||
protected paginationService: PaginationService,
|
||||
protected route: ActivatedRoute,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -62,9 +64,11 @@ export class CommunityPageSubCommunityListComponent implements OnInit, OnDestroy
|
||||
this.config.id = this.pageId;
|
||||
if (hasValue(this.pageSize)) {
|
||||
this.config.pageSize = this.pageSize;
|
||||
} else {
|
||||
this.config.pageSize = this.route.snapshot.queryParams[this.pageId + '.rpp'] ?? this.config.pageSize;
|
||||
}
|
||||
this.config.currentPage = 1;
|
||||
this.sortConfig = new SortOptions('dc.title', SortDirection.ASC);
|
||||
this.config.currentPage = this.route.snapshot.queryParams[this.pageId + '.page'] ?? 1;
|
||||
this.sortConfig = new SortOptions('dc.title', SortDirection[this.route.snapshot.queryParams[this.pageId + '.sd']] ?? SortDirection.ASC);
|
||||
this.initPage();
|
||||
}
|
||||
|
||||
@@ -86,15 +90,6 @@ export class CommunityPageSubCommunityListComponent implements OnInit, OnDestroy
|
||||
).subscribe((results) => {
|
||||
this.subCommunitiesRDObs.next(results);
|
||||
});
|
||||
|
||||
|
||||
this.cds.findByParent(this.community.id, {
|
||||
currentPage: this.config.currentPage,
|
||||
elementsPerPage: this.config.pageSize,
|
||||
sort: { field: this.sortConfig.field, direction: this.sortConfig.direction }
|
||||
}).pipe(takeUntilCompletedRemoteData()).subscribe((results) => {
|
||||
this.subCommunitiesRDObs.next(results);
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
|
8343
src/assets/i18n/it.json5
Normal file
8343
src/assets/i18n/it.json5
Normal file
File diff suppressed because it is too large
Load Diff
@@ -220,6 +220,7 @@ export class DefaultAppConfig implements AppConfig {
|
||||
{ code: 'es', label: 'Español', active: true },
|
||||
{ code: 'fr', label: 'Français', active: true },
|
||||
{ code: 'gd', label: 'Gàidhlig', active: true },
|
||||
{ code: 'it', label: 'Italiano', active: true },
|
||||
{ code: 'lv', label: 'Latviešu', active: true },
|
||||
{ code: 'hu', label: 'Magyar', active: true },
|
||||
{ code: 'nl', label: 'Nederlands', active: true },
|
||||
|
Reference in New Issue
Block a user