-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.html.eex
72 lines (64 loc) · 1.96 KB
/
index.html.eex
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<h1>Listing Items</h1>
<table>
<thead>
<tr>
<th>Text</th>
<th>Person</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
<%= for item <- @items do %>
<tr>
<td><%= item.text %></td>
<td><%= item.person_id %></td>
<td><%= item.status %></td>
<td>
<span><%= link "Show", to: Routes.item_path(@conn, :show, item) %></span>
<span><%= link "Edit", to: Routes.item_path(@conn, :edit, item) %></span>
<span><%= link "Delete", to: Routes.item_path(@conn, :delete, item), method: :delete, data: [confirm: "Are you sure?"] %></span>
</td>
</tr>
<% end %>
</tbody>
</table>
<span><%= link "New Item", to: Routes.item_path(@conn, :new) %></span>
<section class="todoapp">
<header class="header">
<h1>todos</h1>
<input class="new-todo" placeholder="What needs to be done?" autofocus="">
</header>
<section class="main" style="display: block;">
<input id="toggle-all" class="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul class="todo-list">
<%= for item <- @items do %>
<li data-id="<%= item.id %>" class="<%= complete(item) %>">
<div class="view">
<input <%= checked(item) %> class="toggle" type="checkbox">
<label><%= item.text %></label>
<%= link "", class: "destroy",
to: Routes.item_path(@conn, :delete, item), method: :delete,
data: [confirm: "Are you sure?"] %>
</div>
</li>
<% end %>
</ul>
</section>
<footer class="footer" style="display: block;">
<span class="todo-count"><strong>1</strong> item left</span>
<ul class="filters">
<li>
<a href="#/" class="selected">All</a>
</li>
<li>
<a href="#/active">Active</a>
</li>
<li>
<a href="#/completed">Completed</a>
</li>
</ul>
<button class="clear-completed" style="display: block;">Clear completed</button>
</footer>
</section>