Skip to content

Commit

Permalink
fix(admin-ui): Fix link to Asset detail from asset picker
Browse files Browse the repository at this point in the history
Closes #2411
  • Loading branch information
michaelbromley committed Sep 26, 2023
1 parent 0740c87 commit 4539de3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
>
</ng-container>
<div *ngIf="selectionManager.selection.length === 1">
<a [routerLink]="['./', lastSelected().id]" class="button-ghost">
<a [routerLink]="['/catalog/assets/', lastSelected().id]" (click)="editAssetClick.emit()" class="button-ghost">
<clr-icon shape="pencil"></clr-icon> {{ 'common.edit' | translate }}
<clr-icon shape="arrow right"></clr-icon>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -21,6 +29,7 @@ export class AssetGalleryComponent implements OnChanges {
@Input() canDelete = false;
@Output() selectionChange = new EventEmitter<AssetLike[]>();
@Output() deleteAssets = new EventEmitter<AssetLike[]>();
@Output() editAssetClick = new EventEmitter<void>();

selectionManager = new SelectionManager<AssetLike>({
multiSelect: this.multiSelect,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
[assets]="(assets$ | async)! | paginate: paginationConfig"
[multiSelect]="multiSelect"
(selectionChange)="selection = $event"
(editAssetClick)="cancel()"
#assetGalleryComponent
></vdr-asset-gallery>

Expand Down

0 comments on commit 4539de3

Please sign in to comment.