mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4471] - Added show preview action for files in search results (#2169)
* [ACA-4472] - added preview button on info drawer * [ACA-4472] - added preview button on info drawer * [ACA-4472] - added preview button on info drawer * [ACA-4472] - fixed lint * [ACA-4472] - fixed unit test * [ACA-4472] - fixed wrong import * [ACA-4472] - reverted app.config * [ACA-4472] - added some upgrades for styling * [ACA-4472] - added some upgrades for styling * [ACA-4472] - start fixing e2e * [ACA-4472] - wrong whitespace * [ACA-4471] - readded view button and fixed bug on closing * [ACA-4471] - readded action * [ACA-4238] - fix e2e #2 * [ACA-4471] - readded view button for e2e * [ACA-4471] - readded view button for e2e
This commit is contained in:
@@ -495,3 +495,16 @@ export function canShowLogout(context: AcaRuleContext): boolean {
|
||||
export function isLibraryManager(context: RuleContext): boolean {
|
||||
return hasLibrarySelected(context) && context.selection.library.entry && context.selection.library.entry.role === 'SiteManager';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the preview button for search results can be showed
|
||||
* JSON ref: `canInfoPreview`
|
||||
* @param context Rule execution context
|
||||
*/
|
||||
export function canInfoPreview(context: RuleContext): boolean {
|
||||
return navigation.isSearchResults(context) && !isMultiselection(context) && !hasFolderSelected(context) && !navigation.isPreview(context);
|
||||
}
|
||||
|
||||
export function showInfoSelectionButton(context: RuleContext): boolean {
|
||||
return navigation.isSearchResults(context) && !navigation.isPreview(context);
|
||||
}
|
||||
|
Reference in New Issue
Block a user