-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
77 lines (76 loc) · 3.97 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
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<title>Lunch app</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="styles/app.css">
</head>
<body>
<div class="container" ng-controller="LunchController as vm">
<div>
<div class="jumbotron">
<h1>Lunch App</h1>
<p>Check where your teammates are going to have lunch!</p>
</div>
</div>
<div class="lunch-app row">
<div class="col-md-4">
<form name="lunchForm" novalidate>
<div class="form-group">
<label for="name">Your name and surname</label>
<input type="text" class="form-control" id="name" ng-model="vm.formData.name" placeholder="Name Surname" required>
</div>
<div class="form-group">
<label for="project">Your project</label>
<input type="text" class="form-control" id="project" ng-model="vm.formData.project" placeholder="Project" required>
</div>
<div class="form-group">
<label for="team">Your team</label>
<input type="text" class="form-control" id="team" ng-model="vm.formData.team" placeholder="Team" required>
</div>
<div class="form-group">
<label for="place">Desired place</label>
<input type="text" class="form-control" id="place" ng-model="vm.formData.place" placeholder="Place" required>
</div>
<div class="form-group">
<label for="time">Optimal time</label>
<input type="text" class="form-control" id="time" ng-model="vm.formData.time" placeholder="Time" required>
</div>
<input type="submit" class="btn btn-success btn-block" ng-disabled="lunchForm.$invalid" ng-click="vm.sendFormData()" value="Join us!">
</form>
</div>
<div class="col-md-8">
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Person</th>
<th>Project</th>
<th>Team</th>
<th>Place</th>
<th>Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="lunch in vm.lunchResults track by $index">
<td>{{ lunch.name }}</td>
<td>{{ lunch.project }}</td>
<td>{{ lunch.team }}</td>
<td>{{ lunch.place }}</td>
<td>{{ lunch.time }}</td>
</tr>
</tbody>
</table>
</div>
<button class="btn btn-danger pull-right" ng-click="vm.removeResults()">Clear the table</button>
</div>
</div>
</div>
<script type="text/javascript" src="http://www.parsecdn.com/js/parse-1.6.7.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
<script src="js/app.module.js"></script>
<script src="js/lunch.controller.js"></script>
<script src="js/lunch.service.js"></script>
</body>
</html>