-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #758 from Picturepark/bugfix/PP9-21170_hide_fields
Bugfix/PP9-21170 PP9-21178 - Fixed fields
- Loading branch information
Showing
9 changed files
with
100 additions
and
62 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 58 additions & 45 deletions
103
.../src/lib/features-module/layer-panels/components/layer-fields/layer-fields.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,66 @@ | ||
<div class="raw"> | ||
@if (!noname) { | ||
<div class="label" #name [matTooltip]="field.name">{{ field.name }}</div> | ||
} @if (field.value && !field.markdown) { | ||
<div class="value">{{ field.value }}</div> | ||
} @if (field.value && field.markdown) { | ||
<pp-read-more class="value"><div ppMarkdown [markdownText]="field.value"></div></pp-read-more> | ||
} @if (field.tagboxFields.length) { | ||
<div class="value"> | ||
@for (tagboxField of field.tagboxFields; track tagboxField; let last = $last; let i = $index) { | ||
<span> | ||
<a class="link" href="javascript:" (click)="showItem(tagboxField, $event)"> {{ tagboxField.value }}</a> | ||
@if (!last) { | ||
<span>, </span> | ||
} | ||
</span> | ||
<div class="label" #name [matTooltip]="field().name">{{ field().name }}</div> | ||
} | ||
@if (hasValue()) { | ||
@if (!field().markdown) { | ||
<div class="value">{{ field().value }}</div> | ||
} | ||
@if (field().markdown) { | ||
<pp-read-more class="value"> | ||
@if (field().value; as value) { | ||
<div ppMarkdown [markdownText]="value"></div> | ||
} | ||
</pp-read-more> | ||
} | ||
</div> | ||
} @if (field.fieldsetFields.length) { | ||
<div class="value"> | ||
@for (ref of field.fieldsetFields; track ref) { | ||
<div class="field"> | ||
@if (ref.name === field.name) { | ||
<mat-expansion-panel (opened)="ref.isOpened = true" (closed)="ref.isOpened = false"> | ||
<mat-expansion-panel-header> | ||
<mat-panel-description> | ||
{{ ref.isOpened ? ref.name : ref.title }} | ||
</mat-panel-description> | ||
</mat-expansion-panel-header> | ||
<ng-template matExpansionPanelContent> | ||
<pp-layer-fields [field]="ref" [noname]="true"></pp-layer-fields> | ||
</ng-template> | ||
</mat-expansion-panel> | ||
} @else { | ||
<pp-layer-fields [field]="ref"></pp-layer-fields> | ||
} | ||
@if (field().tagboxFields.length) { | ||
<div class="value"> | ||
@for (tagboxField of field().tagboxFields; track tagboxField; let last = $last; let i = $index) { | ||
<span> | ||
<a class="link" href="javascript:" (click)="showItem(tagboxField, $event)"> {{ tagboxField.value }}</a> | ||
@if (!last) { | ||
<span>, </span> | ||
} | ||
</span> | ||
} | ||
</div> | ||
} | ||
</div> | ||
} @if (field.relationFields.length) { | ||
<div class="value"> | ||
@for (relationField of field.relationFields; track relationField) { @if (relationField.info | async; as info) { | ||
<div class="relation field" (click)="relationClickHandler(info)"> | ||
<div class="image-wrap"><img [src]="info.fileUrl" /></div> | ||
<div class="relationFields"> | ||
<div class="field relation-title" [innerHTML]="info.name"></div> | ||
<div class="field relation-description" [innerHTML]="info.list"></div> | ||
</div> | ||
} | ||
@if (field().fieldsetFields.length) { | ||
<div class="value"> | ||
@for (ref of field().fieldsetFields; track ref) { | ||
<div class="field"> | ||
@if (ref.name === field().name) { | ||
<mat-expansion-panel (opened)="ref.isOpened = true" (closed)="ref.isOpened = false"> | ||
<mat-expansion-panel-header> | ||
<mat-panel-description> | ||
{{ ref.isOpened ? ref.name : ref.title }} | ||
</mat-panel-description> | ||
</mat-expansion-panel-header> | ||
<ng-template matExpansionPanelContent> | ||
<pp-layer-fields [field]="ref" [noname]="true"></pp-layer-fields> | ||
</ng-template> | ||
</mat-expansion-panel> | ||
} @else { | ||
<pp-layer-fields [field]="ref"></pp-layer-fields> | ||
} | ||
</div> | ||
} | ||
</div> | ||
} | ||
@if (field().relationFields.length) { | ||
<div class="value"> | ||
@for (relationField of field().relationFields; track relationField) { | ||
@if (relationField.info | async; as info) { | ||
<div class="relation field" (click)="relationClickHandler(info)"> | ||
<div class="image-wrap"><img [src]="info.fileUrl" /></div> | ||
<div class="relationFields"> | ||
<div class="field relation-title" [innerHTML]="info.name"></div> | ||
<div class="field relation-description" [innerHTML]="info.list"></div> | ||
</div> | ||
</div> | ||
} | ||
} | ||
</div> | ||
} } | ||
</div> | ||
} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters