Basic parents reveal

This commit is contained in:
shamoon
2025-09-10 09:51:13 -07:00
parent c3bed3a4f9
commit 89c09283e5
3 changed files with 8 additions and 1 deletions

View File

@@ -28,7 +28,7 @@
<ng-template ng-option-tmp let-item="item" let-index="index" let-search="searchTerm"> <ng-template ng-option-tmp let-item="item" let-index="index" let-search="searchTerm">
<div class="tag-wrap"> <div class="tag-wrap">
@if (item.id && tags) { @if (item.id && tags) {
<pngx-tag class="me-2" [tag]="getTag(item.id)"></pngx-tag> <pngx-tag class="me-2" [tag]="getTag(item.id)" showParents="true"></pngx-tag>
} }
</div> </div>
</ng-template> </ng-template>

View File

@@ -1,4 +1,8 @@
@if (tag) { @if (tag) {
@if (showParents && tag.parent) {
<pngx-tag [tagID]="tag.parent" [clickable]="clickable" [linkTitle]="linkTitle"></pngx-tag>
&nbsp;&gt;&nbsp;
}
@if (!clickable) { @if (!clickable) {
<span class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</span> <span class="badge" [style.background]="tag.color" [style.color]="tag.text_color">{{tag.name}}</span>
} }

View File

@@ -50,4 +50,7 @@ export class TagComponent {
@Input() @Input()
clickable: boolean = false clickable: boolean = false
@Input()
showParents: boolean = false
} }