mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
filter out disabled column templates
This commit is contained in:
@@ -158,30 +158,12 @@ export class AppExtensionService implements RuleContext {
|
|||||||
this.contentMetadata = this.loadContentMetadata(config);
|
this.contentMetadata = this.loadContentMetadata(config);
|
||||||
|
|
||||||
this.documentListPresets = {
|
this.documentListPresets = {
|
||||||
files: this.loader.getElements<DocumentListPresetRef>(
|
files: this.getDocumentListPreset(config, 'files'),
|
||||||
config,
|
libraries: this.getDocumentListPreset(config, 'libraries'),
|
||||||
'features.documentList.files'
|
shared: this.getDocumentListPreset(config, 'shared'),
|
||||||
),
|
recent: this.getDocumentListPreset(config, 'recent'),
|
||||||
libraries: this.loader.getElements<DocumentListPresetRef>(
|
favorites: this.getDocumentListPreset(config, 'favorites'),
|
||||||
config,
|
trashcan: this.getDocumentListPreset(config, 'trashcan')
|
||||||
'features.documentList.libraries'
|
|
||||||
),
|
|
||||||
shared: this.loader.getElements<DocumentListPresetRef>(
|
|
||||||
config,
|
|
||||||
'features.documentList.shared'
|
|
||||||
),
|
|
||||||
recent: this.loader.getElements<DocumentListPresetRef>(
|
|
||||||
config,
|
|
||||||
'features.documentList.recent'
|
|
||||||
),
|
|
||||||
favorites: this.loader.getElements<DocumentListPresetRef>(
|
|
||||||
config,
|
|
||||||
'features.documentList.favorites'
|
|
||||||
),
|
|
||||||
trashcan: this.loader.getElements<DocumentListPresetRef>(
|
|
||||||
config,
|
|
||||||
'features.documentList.trashcan'
|
|
||||||
)
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +171,15 @@ export class AppExtensionService implements RuleContext {
|
|||||||
return this.loader.getElements<NavBarGroupRef>(config, 'features.navbar');
|
return this.loader.getElements<NavBarGroupRef>(config, 'features.navbar');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected getDocumentListPreset(config: ExtensionConfig, key: string) {
|
||||||
|
return this.loader
|
||||||
|
.getElements<DocumentListPresetRef>(
|
||||||
|
config,
|
||||||
|
`features.documentList.${key}`
|
||||||
|
)
|
||||||
|
.filter(entry => !entry.disabled);
|
||||||
|
}
|
||||||
|
|
||||||
getApplicationNavigation(elements) {
|
getApplicationNavigation(elements) {
|
||||||
return elements.map(group => {
|
return elements.map(group => {
|
||||||
return {
|
return {
|
||||||
|
Reference in New Issue
Block a user