-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35a3ff8
commit 7154675
Showing
1 changed file
with
15 additions
and
5 deletions.
There are no files selected for viewing
20 changes: 15 additions & 5 deletions
20
...sa-tools/forecasts-tool/src/app/components/forecast-viewer/forecast-viewer.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,18 +1,28 @@ | ||
<div class="text-right"> | ||
<button mat-button color="primary" class="ml-auto" (click)="closeClicked.emit()"> | ||
{{ 'Close' | translate }} | ||
<mat-icon>close</mat-icon> | ||
</button> | ||
<!-- Top close button --> | ||
@if(!pdfForecastData()){ | ||
<ng-container *ngTemplateOutlet="closeButton"></ng-container> | ||
} | ||
</div> | ||
@if(errorMessage(); as errorMessage){ | ||
<div>{{ errorMessage | translate }}</div> | ||
} | ||
<!-- PDF --> | ||
@if(pdfForecastData(); as pdfForecastData){ | ||
<picsa-pdf-viewer [src]="pdfForecastData"> </picsa-pdf-viewer> | ||
<picsa-pdf-viewer [src]="pdfForecastData"> | ||
<ng-container *ngTemplateOutlet="closeButton"></ng-container> | ||
</picsa-pdf-viewer> | ||
} | ||
|
||
<!-- HTML --> | ||
@if(htmlForecastData(); as htmlForecastData){ | ||
<div class="p-4 overflow-auto" [innerHTML]="htmlForecastData"></div> | ||
} | ||
|
||
<!-- Reusable close button - displayed in pdf viewer or at top of page--> | ||
<ng-template #closeButton> | ||
<button mat-button color="primary" class="ml-auto" (click)="closeClicked.emit()"> | ||
{{ 'Close' | translate }} | ||
<mat-icon>close</mat-icon> | ||
</button> | ||
</ng-template> |