mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
added typedoc for toplevel communities component
This commit is contained in:
@@ -11,6 +11,9 @@ import { fadeInOut } from '../../shared/animations/fade';
|
|||||||
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
|
||||||
import { take } from 'rxjs/operators';
|
import { take } from 'rxjs/operators';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this component renders the Top-Level Community list
|
||||||
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-top-level-community-list',
|
selector: 'ds-top-level-community-list',
|
||||||
styleUrls: ['./top-level-community-list.component.scss'],
|
styleUrls: ['./top-level-community-list.component.scss'],
|
||||||
@@ -20,8 +23,19 @@ import { take } from 'rxjs/operators';
|
|||||||
})
|
})
|
||||||
|
|
||||||
export class TopLevelCommunityListComponent implements OnInit {
|
export class TopLevelCommunityListComponent implements OnInit {
|
||||||
|
/**
|
||||||
|
* A list of remote data objects of all top communities
|
||||||
|
*/
|
||||||
communitiesRD$: BehaviorSubject<RemoteData<PaginatedList<Community>>> = new BehaviorSubject<RemoteData<PaginatedList<Community>>>({} as any);
|
communitiesRD$: BehaviorSubject<RemoteData<PaginatedList<Community>>> = new BehaviorSubject<RemoteData<PaginatedList<Community>>>({} as any);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The pagination configuration
|
||||||
|
*/
|
||||||
config: PaginationComponentOptions;
|
config: PaginationComponentOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The sorting configuration
|
||||||
|
*/
|
||||||
sortConfig: SortOptions;
|
sortConfig: SortOptions;
|
||||||
|
|
||||||
constructor(private cds: CommunityDataService) {
|
constructor(private cds: CommunityDataService) {
|
||||||
@@ -36,6 +50,10 @@ export class TopLevelCommunityListComponent implements OnInit {
|
|||||||
this.updatePage();
|
this.updatePage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when one of the pagination settings is changed
|
||||||
|
* @param event The new pagination data
|
||||||
|
*/
|
||||||
onPaginationChange(event) {
|
onPaginationChange(event) {
|
||||||
this.config.currentPage = event.page;
|
this.config.currentPage = event.page;
|
||||||
this.config.pageSize = event.pageSize;
|
this.config.pageSize = event.pageSize;
|
||||||
@@ -44,6 +62,9 @@ export class TopLevelCommunityListComponent implements OnInit {
|
|||||||
this.updatePage();
|
this.updatePage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the list of top communities
|
||||||
|
*/
|
||||||
updatePage() {
|
updatePage() {
|
||||||
this.cds.findTop({
|
this.cds.findTop({
|
||||||
currentPage: this.config.currentPage,
|
currentPage: this.config.currentPage,
|
||||||
|
Reference in New Issue
Block a user