mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-16 22:43:03 +00:00
97049: Minor refactor // adding docs
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
import { Config } from './config.interface';
|
||||
|
||||
export interface FilterVocabularyConfig extends Config {
|
||||
filter: string;
|
||||
vocabulary: string;
|
||||
enabled: boolean;
|
||||
}
|
@@ -20,7 +20,7 @@ import { InfoConfig } from './info-config.interface';
|
||||
import { CommunityListConfig } from './community-list-config.interface';
|
||||
import { HomeConfig } from './homepage-config.interface';
|
||||
import { MarkdownConfig } from './markdown-config.interface';
|
||||
import { FilterVocabularyConfig } from './FilterVocabularyConfig';
|
||||
import { FilterVocabularyConfig } from './filter-vocabulary-config';
|
||||
|
||||
interface AppConfig extends Config {
|
||||
ui: UIServerConfig;
|
||||
|
@@ -20,7 +20,7 @@ import { InfoConfig } from './info-config.interface';
|
||||
import { CommunityListConfig } from './community-list-config.interface';
|
||||
import { HomeConfig } from './homepage-config.interface';
|
||||
import { MarkdownConfig } from './markdown-config.interface';
|
||||
import { FilterVocabularyConfig } from './FilterVocabularyConfig';
|
||||
import { FilterVocabularyConfig } from './filter-vocabulary-config';
|
||||
|
||||
export class DefaultAppConfig implements AppConfig {
|
||||
production = false;
|
||||
@@ -378,6 +378,9 @@ export class DefaultAppConfig implements AppConfig {
|
||||
mathjax: false,
|
||||
};
|
||||
|
||||
// Which vocabularies should be used for which search filters
|
||||
// and whether to show the filter in the search sidebar
|
||||
// Take a look at the filter-vocabulary-config.ts file for documentation on how the options are obtained
|
||||
vocabularies: FilterVocabularyConfig[] = [
|
||||
{
|
||||
filter: 'subject',
|
||||
|
22
src/config/filter-vocabulary-config.ts
Normal file
22
src/config/filter-vocabulary-config.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Config } from './config.interface';
|
||||
|
||||
/**
|
||||
* Configuration that can be used to enable a vocabulary tree to be used as search filter
|
||||
*/
|
||||
export interface FilterVocabularyConfig extends Config {
|
||||
/**
|
||||
* The name of the filter where the vocabulary tree should be used
|
||||
* This is the name of the filter as it's configured in the facet in discovery.xml
|
||||
* (can also be seen on the /server/api/discover/facets endpoint)
|
||||
*/
|
||||
filter: string;
|
||||
/**
|
||||
* name of the vocabulary tree to use
|
||||
* ( name of the file as stored in the dspace/config/controlled-vocabularies folder without file extension )
|
||||
*/
|
||||
vocabulary: string;
|
||||
/**
|
||||
* Whether to show the vocabulary tree in the sidebar
|
||||
*/
|
||||
enabled: boolean;
|
||||
}
|
Reference in New Issue
Block a user