aboutsummaryrefslogtreecommitdiff
path: root/app/components/plan-list/plan-list.html
diff options
context:
space:
mode:
authorAlex Tatiyants <atatiyan@gmail.com>2016-01-29 21:05:29 -0800
committerAlex Tatiyants <atatiyan@gmail.com>2016-01-29 21:33:22 -0800
commitd256691ac0e4d2e1cd41ef1c1d9ce3c310e77dc6 (patch)
treeec74c3da7ec9ac3fad752147af1756bbcbdd3e30 /app/components/plan-list/plan-list.html
parent267ebad5c09c88b0b1612669afd8b9928e91200c (diff)
fix #12
Diffstat (limited to 'app/components/plan-list/plan-list.html')
-rw-r--r--app/components/plan-list/plan-list.html34
1 files changed, 17 insertions, 17 deletions
diff --git a/app/components/plan-list/plan-list.html b/app/components/plan-list/plan-list.html
index 28c95af..09e9262 100644
--- a/app/components/plan-list/plan-list.html
+++ b/app/components/plan-list/plan-list.html
@@ -5,26 +5,26 @@
<table class="table">
<tr *ngFor="#plan of plans">
+ <!-- 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 plan "{{planToDelete.name}}". Are you sure?</div>
+ <div class="modal-footer">
+ <button class="btn btn-primary" (click)="deletePlan()">Yes</button>
+ <button class="btn btn-default" (click)="cancelDelete()">No</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
<td width="30%"><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()">
+ <td class="align-right"><button class="btn btn-danger" (click)="requestDelete(plan)">
<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>