annotation references in template

This commit is contained in:
Edi Cziszter 2022-01-10 14:21:03 +02:00
parent 13a71bf06a
commit 0d15cf694d
7 changed files with 21 additions and 6 deletions

View File

@ -1,6 +1,8 @@
<div class="content-container">
<div class="dialog references-dialog">
<div class="dialog-header">X REFERENCES</div>
<iqser-circle-button (action)="closeDialog.emit(false)" class="dialog-close" icon="iqser:close"></iqser-circle-button>
<div class="references-header">
<div class="small-label">X REFERENCES</div>
<iqser-circle-button (action)="closeDialog.emit(false)" icon="iqser:close"></iqser-circle-button>
</div>
</div>
</div>

View File

@ -1,4 +1,8 @@
.references-dialog {
position: fixed;
right: 350px;
.references-header {
padding: 13px 13px 0 13px;
}
}

View File

@ -60,4 +60,6 @@
</div>
<redaction-annotation-details [annotation]="annotation"></redaction-annotation-details>
<ng-container [ngTemplateOutletContext]="{ annotation: annotation }" [ngTemplateOutlet]="annotationReferencesTemplate"></ng-container>
</div>

View File

@ -15,6 +15,7 @@ export class AnnotationsListComponent implements OnChanges {
@Input() annotations: AnnotationWrapper[];
@Input() selectedAnnotations: AnnotationWrapper[];
@Input() annotationActionsTemplate: TemplateRef<unknown>;
@Input() annotationReferencesTemplate: TemplateRef<unknown>;
@Input() activeViewerPage: number;
@Input() canMultiSelect = true;

View File

@ -201,6 +201,7 @@
(selectAnnotations)="selectAnnotations.emit($event)"
[activeViewerPage]="activeViewerPage"
[annotationActionsTemplate]="annotationActionsTemplate"
[annotationReferencesTemplate]="annotationReferencesTemplate"
[annotations]="(displayedAnnotations$ | async)?.get(activeViewerPage)"
[canMultiSelect]="!isReadOnly"
[file]="file"

View File

@ -54,6 +54,7 @@ export class FileWorkloadComponent {
@Input() dialogRef: MatDialogRef<unknown>;
@Input() file!: File;
@Input() annotationActionsTemplate: TemplateRef<unknown>;
@Input() annotationReferencesTemplate: TemplateRef<unknown>;
@Input() viewer: WebViewerInstance;
@Output() readonly shouldDeselectAnnotationsOnPageChangeChange = new EventEmitter<boolean>();
@Output() readonly selectAnnotations = new EventEmitter<AnnotationWrapper[]>();

View File

@ -106,6 +106,7 @@
[activeViewerPage]="activeViewerPage"
[annotationActionsTemplate]="annotationActionsTemplate"
[annotations]="visibleAnnotations"
[annotationReferencesTemplate]="annotationReferencesTemplate"
[dialogRef]="dialogRef"
[file]="file"
[selectedAnnotations]="selectedAnnotations"
@ -126,10 +127,13 @@
></redaction-annotation-actions>
</ng-template>
<redaction-annotation-references-dialog
*ngIf="seeReferences"
(closeDialog)="seeReferences = $event"
></redaction-annotation-references-dialog>
<ng-template #annotationReferencesTemplate let-annotation="annotation">
<redaction-annotation-references-dialog
*ngIf="seeReferences"
[annotation]="annotation"
(closeDialog)="seeReferences = $event"
></redaction-annotation-references-dialog>
</ng-template>
<ng-template #annotationFilterTemplate let-filter="filter">
<redaction-type-filter