From 8a82af51a7877afd6f61a117162dad307a40c916 Mon Sep 17 00:00:00 2001 From: "jvanboxtel@wisc.edu" <jvanboxtel@wisc.edu> Date: Thu, 20 Jun 2019 10:44:59 -0500 Subject: [PATCH] ROENROLL-1830 audit view open in new tap ui --- src/app/dars/dars-view/dars-view.component.html | 14 ++++++++++---- src/app/dars/dars-view/dars-view.component.scss | 11 ++++++++--- src/app/dars/dars-view/dars-view.component.ts | 4 ++++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/app/dars/dars-view/dars-view.component.html b/src/app/dars/dars-view/dars-view.component.html index c2e3b05..26743d1 100644 --- a/src/app/dars/dars-view/dars-view.component.html +++ b/src/app/dars/dars-view/dars-view.component.html @@ -1,10 +1,16 @@ <mat-sidenav-container id="dars-container"> <mat-sidenav id="dars-report-container" mode="over" position="end" [opened]="(visibleAuditStatus$ | async) != 'NotLoaded'"> <div class="audit-wrapper"> - <button id="audit-close" mat-button aria-label="Return to DARS audit list" color="primary" (click)="closeAudit()"> - <mat-icon>chevron_left</mat-icon> - Return to audit list - </button> + <div class="audit-header-buttons"> + <button id="audit-close" mat-button aria-label="Return to DARS audit list" color="primary" (click)="closeAudit()"> + <mat-icon>chevron_left</mat-icon> + Return to audit list + </button> + <button id="audit-open-window" mat-button color="primary" (click)="openNewTab()"> + Open in new tab + <mat-icon>launch</mat-icon> + </button> + </div> <!-- <ng-container [ngSwitch]="visibleAuditStatus$ | async"> --> <ng-container [ngSwitch]="'Loaded'"> diff --git a/src/app/dars/dars-view/dars-view.component.scss b/src/app/dars/dars-view/dars-view.component.scss index 356b8c4..df6ebc5 100644 --- a/src/app/dars/dars-view/dars-view.component.scss +++ b/src/app/dars/dars-view/dars-view.component.scss @@ -32,9 +32,14 @@ margin: 50px auto; } -#audit-close { - margin-bottom: 20px; - margin-left: 1rem; +.audit-header-buttons { + display: flex; + justify-content: space-between; +} + +#audit-close, +#audit-open-window { + margin: 0 1rem 1rem; } #loading-bucky { diff --git a/src/app/dars/dars-view/dars-view.component.ts b/src/app/dars/dars-view/dars-view.component.ts index bba02f9..ccd3b8c 100644 --- a/src/app/dars/dars-view/dars-view.component.ts +++ b/src/app/dars/dars-view/dars-view.component.ts @@ -59,4 +59,8 @@ export class DARSViewComponent implements OnInit { public closeAudit() { this.store.dispatch(new darsActions.CloseAudit()); } + + public openNewTab() { + window.open(window.location.href, '_blank', 'noopener noreferrer'); + } } -- GitLab