mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-3897] Extendable viewer navigation (#2109)
* [ACA-3897] Extendable viewer navigation * Update app.extensions.json
This commit is contained in:
@@ -28,4 +28,9 @@ export interface ViewerRules {
|
||||
* Checks if user can preview the node.
|
||||
*/
|
||||
canPreview?: string;
|
||||
|
||||
/**
|
||||
* Shows navigation options
|
||||
*/
|
||||
showNavigation?: string;
|
||||
}
|
||||
|
@@ -497,4 +497,17 @@ export class AppExtensionService implements RuleContext {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
canShowViewerNavigation(node: NodeEntry) {
|
||||
const rules = this.viewerRules;
|
||||
|
||||
if (this.isRuleDefined(rules.showNavigation)) {
|
||||
const showNavigation = this.evaluateRule(rules.showNavigation, node);
|
||||
if (!showNavigation) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user