blob: 3ace6f8cd9e4fb039f71d25ac637b2a991994ad4 [file] [log] [blame]
<!--********************************************************************************
* Copyright (c) 2015-2018 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************-->
<style>
.container-fluid {
padding: 0;
}
</style>
<div class="container-fluid">
<div class="box" style="margin-bottom: 15px;">
<div class="well">
<h2>Freigabeantragseingang</h2>
</div>
<table class="table table-hover">
<thead>
<tr>
<th>Versuchsname</th>
<th>Antragsteller</th>
<th>Freigabedauer</th>
<th>freigegeben bis</th>
<th>Status</th>
<th>Format</th>
<th></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of incoming" [ngClass]="getState(data)" (click)=setData(data) (click)='setEvent("approve")' (click)=lgModal.show()>
<td>{{data.name}}</td>
<td>{{data.sender}}</td>
<td>{{data.validity}} Tage</td>
<td>{{getDate(data.expire)}}</td>
<td>{{getTransState(data.state)}}</td>
<td>{{getFormat(data.format)}}</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="container-fluid">
<div class="box">
<div class="well">
<h2>Freigabeantragsausgang</h2>
</div>
<table class="table table-hover">
<thead>
<tr>
<th>Versuchsname</th>
<th>Messungsverantwortlicher</th>
<th>Freigabedauer</th>
<th>freigegeben bis</th>
<th>Status</th>
<th>Format</th>
<th>Download</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of outgoing" [ngClass]="getState(data)" (click)=setData(data) (click)='setEvent("edit")'>
<td (click)=lgModal.show()>{{data.name}}</td>
<td (click)=lgModal.show()>{{data.receiver}}</td>
<td (click)=lgModal.show()>{{data.validity}} Tage</td>
<td (click)=lgModal.show()>{{getDate(data.expire)}}</td>
<td (click)=lgModal.show()>{{getTransState(data.state)}}</td>
<td (click)=lgModal.show()>{{getFormat(data.format)}}</td>
<td>
<a *ngIf="data.state == 'RELEASE_RELEASED'" href="{{dataHost}}{{data.fileLink}}" download><span class="glyphicon glyphicon-download"></span></a>
<span *ngIf="data.state != 'RELEASE_RELEASED'" class="glyphicon glyphicon-ban-circle"></span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div bsModal #lgModal="bs-modal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" (click)="lgModal.hide()">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Freigabe</h4>
</div>
<div class="modal-body">
<mdm-filerelease-display [release]=release ></mdm-filerelease-display>
<div class="btn-group" *ngIf='event=="approve"'>
<button type="button" class="btn btn-success" (click)="approveRelease()" (click)="lgModal.hide()" [disabled]="isReleaseable()">Genehmigen</button>
<button type="button" class="btn btn-danger" (click)="smModal.show()" (click)="lgModal.hide()" [disabled]="isReleaseable()">Ablehnen</button>
</div>
<div class="btn-group" *ngIf='event=="edit"'>
<button type="button" class="btn btn-default" (click)="deleteRelease()" (click)="lgModal.hide()" [disabled]=isDeletable()>Anfrage zurückziehen/entfernen</button>
</div>
</div>
</div>
</div>
</div>
<div bsModal #smModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-label="Close" (click)="smModal.hide()">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title">Begründung</h4>
</div>
<div class="modal-body">
<textarea #reason cols="35" rows="4" class="form-control"></textarea>
<div class="btn-group">
<button type="button" class="btn btn-danger" (click)="rejectRelease(reason.value)" (click)=smModal.hide() (click)="reason.value = ''">Ablehnen</button>
<button type="button" class="btn btn-default" (click)="smModal.hide()" (click)="reason.value = ''">Abbrechen</button>
</div>
</div>
</div>
</div>
</div>