-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
95 lines (85 loc) · 3.28 KB
/
index.html
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Users</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/defaults.css">
<link rel="stylesheet" href="css/users.css">
</head>
<body>
<main class="main-content">
</main>
<script id="user-edit" type="text/html">
<header class="page-header">
<a class="secondary-action page-action" href="#users">←</a>
<h1 class="page-title"><%- m.title %></h1>
</header>
<form class="user-form stack-form page-content">
<div class="form-field">
<input name="id" type="text" placeholder="user id" value="<%- m.user.id %>"
autofocus
required
pattern="[a-zA-Z0-9]+[a-zA-Z0-9\-]*"
data-parsley-error-message="Ids must be alphanumeric">
</div>
<div class="form-field">
<input name="name" type="text" placeholder="user name" value="<%- m.user.name %>"
pattern="[\w]+\W[\w]+" required
data-parsley-error-message="Full name is required">
</div>
<div class="form-field">
<input name="email" type="email" placeholder="user email" value="<%- m.user.email %>" required>
</div>
<div class="form-field">
<button class="btn btn-primary">Save</button>
</div>
<% if (m.isDeletable) { %>
<div class="form-field">
<button class="delete-user btn btn-warning" type="button">Delete</button>
</div>
<% } %>
</form>
</script>
<script id="404" type="text/html">
<header clss="page-header">
<h1 class="page-title">404 not found</h1>
</header>
<div class="page-content stack-form">
<a href="#users" class="btn btn-primary">View all users</a>
</div>
</script>
<script id="user-list" type="text/html">
<header class="page-header">
<a class="primary-action page-action" href="#users/new">+</a>
<h1 class="page-title">Users</h1>
</header>
<ul class="user-list page-content">
<% _.chain(m.users.values).sortBy('name').forEach(function (user) { %>
<li class="user">
<a class="user-link" href="#users/<%- user.id %>">
<span class="user-name"><%- user.name %></span>
<span class="user-email"><%- user.email %></span>
</a>
</li>
<% }) %>
</ul>
</script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/underscore/underscore-min.js"></script>
<script src="bower_components/backbone/backbone-min.js"></script>
<script src="bower_components/parsleyjs/dist/parsley.min.js"></script>
<script src="js/app.js"></script>
<script src="js/router.js"></script>
<script src="js/goto.js"></script>
<script src="js/show.js"></script>
<script src="js/user.js"></script>
<script src="js/serialize-form.js"></script>
<script src="js/object-store.js"></script>
<script src="js/users-controller.js"></script>
<script src="js/users-edit-controller.js"></script>
<script src="js/users-new-controller.js"></script>
<script src="js/init.js"></script>
</body>
</html>