blob: a2f1a9d371f1ba08635743fcd81f30de601e7cad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<nav>
<div class="nav-container">
<a class="btn btn-primary btn-lg pull-right" [routerLink]="['/PlanNew']">create</a>
<a [routerLink]="['PlanList']">plans</a>
</div>
</nav>
<div class="page">
<div class="hero-container" *ngIf="plans.length === 0">
Welcome to PEV! Please <a [routerLink]="['/PlanNew']">submit</a> a plan for visualization
</div>
<table class="table">
<tr *ngFor="#plan of plans">
<td><a [routerLink]="['/PlanView', {id: plan.id}]">{{plan.name}}</a></td>
<td>created on {{plan.createdOn | momentDate }}</td>
<td class="align-right"><button class="btn btn-danger" (click)="requestDelete()">
<i class="fa fa-trash"></i>delete</button>
<!-- this is a hack that should be converted to a proper dialog once that is available in angular 2-->
<div *ngIf="openDialog">
<div class="modal-backdrop"></div>
<div class="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">You're about to delete this plan. Are you sure?</div>
<div class="modal-footer">
<button class="btn btn-primary" (click)="deletePlan(plan)">Yes</button>
<button class="btn btn-default" (click)="cancelDelete()">No</button>
</div>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
|