mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
62063: Configurable Browse-By menus
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Inject, Input, OnInit } from '@angular/core';
|
||||
import { GLOBAL_CONFIG, GlobalConfig } from '../../../config';
|
||||
import { BrowseByTypeConfig } from '../../../config/browse-by-type-config.interface';
|
||||
|
||||
/**
|
||||
* A component to display the "Browse By" section of a Community or Collection page
|
||||
@@ -8,9 +10,19 @@ import { Component, Input } from '@angular/core';
|
||||
selector: 'ds-comcol-page-browse-by',
|
||||
templateUrl: './comcol-page-browse-by.component.html',
|
||||
})
|
||||
export class ComcolPageBrowseByComponent {
|
||||
export class ComcolPageBrowseByComponent implements OnInit {
|
||||
/**
|
||||
* The ID of the Community or Collection
|
||||
*/
|
||||
@Input() id: string;
|
||||
|
||||
types: BrowseByTypeConfig[];
|
||||
|
||||
constructor(@Inject(GLOBAL_CONFIG) public config: GlobalConfig) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.types = this.config.browseBy.types;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user