mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
97049: Minor refactor // adding docs
This commit is contained in:
@@ -296,3 +296,11 @@ info:
|
|||||||
markdown:
|
markdown:
|
||||||
enabled: false
|
enabled: false
|
||||||
mathjax: false
|
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:
|
||||||
|
- filter: 'subject'
|
||||||
|
vocabulary: 'srsc'
|
||||||
|
enabled: true
|
||||||
|
@@ -3,8 +3,3 @@ rest:
|
|||||||
host: api7.dspace.org
|
host: api7.dspace.org
|
||||||
port: 443
|
port: 443
|
||||||
nameSpace: /server
|
nameSpace: /server
|
||||||
|
|
||||||
vocabularies:
|
|
||||||
- filter: 'subject'
|
|
||||||
vocabulary: 'srsc'
|
|
||||||
enabled: true
|
|
||||||
|
@@ -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 { CommunityListConfig } from './community-list-config.interface';
|
||||||
import { HomeConfig } from './homepage-config.interface';
|
import { HomeConfig } from './homepage-config.interface';
|
||||||
import { MarkdownConfig } from './markdown-config.interface';
|
import { MarkdownConfig } from './markdown-config.interface';
|
||||||
import { FilterVocabularyConfig } from './FilterVocabularyConfig';
|
import { FilterVocabularyConfig } from './filter-vocabulary-config';
|
||||||
|
|
||||||
interface AppConfig extends Config {
|
interface AppConfig extends Config {
|
||||||
ui: UIServerConfig;
|
ui: UIServerConfig;
|
||||||
|
@@ -20,7 +20,7 @@ import { InfoConfig } from './info-config.interface';
|
|||||||
import { CommunityListConfig } from './community-list-config.interface';
|
import { CommunityListConfig } from './community-list-config.interface';
|
||||||
import { HomeConfig } from './homepage-config.interface';
|
import { HomeConfig } from './homepage-config.interface';
|
||||||
import { MarkdownConfig } from './markdown-config.interface';
|
import { MarkdownConfig } from './markdown-config.interface';
|
||||||
import { FilterVocabularyConfig } from './FilterVocabularyConfig';
|
import { FilterVocabularyConfig } from './filter-vocabulary-config';
|
||||||
|
|
||||||
export class DefaultAppConfig implements AppConfig {
|
export class DefaultAppConfig implements AppConfig {
|
||||||
production = false;
|
production = false;
|
||||||
@@ -378,6 +378,9 @@ export class DefaultAppConfig implements AppConfig {
|
|||||||
mathjax: false,
|
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[] = [
|
vocabularies: FilterVocabularyConfig[] = [
|
||||||
{
|
{
|
||||||
filter: 'subject',
|
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