forked from bradtraversy/storybooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.hbs
38 lines (37 loc) · 1.1 KB
/
dashboard.hbs
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
<h6>Dashboard</h6>
<h3>Welcome {{name}}</h3>
<p>Here are your stories</p>
{{#if stories}}
<table class="striped">
<thead>
<tr>
<th>Title</th>
<th>Date</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
{{#each stories}}
<tr>
<td><a href="/stories/{{_id}}">{{title}}</a></td>
<td>{{formatDate createdAt 'MMMM Do YYYY, h:mm:ss a'}}</td>
<td><span class="dash-status">{{status}}</span></td>
<td>
<a href="/stories/edit/{{_id}}" class="btn btn-float">
<i class="fas fa-edit"></i>
</a>
<form action="/stories/{{_id}}" method="POST" id="delete-form">
<input type="hidden" name="_method" value="DELETE">
<button type="submit" class="btn red">
<i class="fas fa-trash"></i>
</button>
</form>
</td>
</tr>
{{/each}}
</tbody>
</table>
{{else}}
<p>You have not created any stories</p>
{{/if}}