From 4539de36da281fa1df28012d61a9a1996799de11 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Tue, 26 Sep 2023 11:40:30 +0200 Subject: [PATCH] fix(admin-ui): Fix link to Asset detail from asset picker Closes #2411 --- .../asset-gallery/asset-gallery.component.html | 2 +- .../asset-gallery/asset-gallery.component.ts | 11 ++++++++++- .../asset-picker-dialog.component.html | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.html b/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.html index 14e3ea65ab..3cb7db6e21 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.html +++ b/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.html @@ -46,7 +46,7 @@ >
- + {{ 'common.edit' | translate }} diff --git a/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.ts b/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.ts index cd96017118..a08f6446cb 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.ts +++ b/packages/admin-ui/src/lib/core/src/shared/components/asset-gallery/asset-gallery.component.ts @@ -1,4 +1,12 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + EventEmitter, + Input, + OnChanges, + Output, + SimpleChanges, +} from '@angular/core'; import { SelectionManager } from '../../../common/utilities/selection-manager'; import { ModalService } from '../../../providers/modal/modal.service'; @@ -21,6 +29,7 @@ export class AssetGalleryComponent implements OnChanges { @Input() canDelete = false; @Output() selectionChange = new EventEmitter(); @Output() deleteAssets = new EventEmitter(); + @Output() editAssetClick = new EventEmitter(); selectionManager = new SelectionManager({ multiSelect: this.multiSelect, diff --git a/packages/admin-ui/src/lib/core/src/shared/components/asset-picker-dialog/asset-picker-dialog.component.html b/packages/admin-ui/src/lib/core/src/shared/components/asset-picker-dialog/asset-picker-dialog.component.html index c850161cb6..735d802d56 100644 --- a/packages/admin-ui/src/lib/core/src/shared/components/asset-picker-dialog/asset-picker-dialog.component.html +++ b/packages/admin-ui/src/lib/core/src/shared/components/asset-picker-dialog/asset-picker-dialog.component.html @@ -21,6 +21,7 @@ [assets]="(assets$ | async)! | paginate: paginationConfig" [multiSelect]="multiSelect" (selectionChange)="selection = $event" + (editAssetClick)="cancel()" #assetGalleryComponent >