-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (90 loc) · 3.62 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
96
97
98
99
100
101
<html>
<head>
<title>My Angular App!</title>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="bower_components/angular-local-storage/dist/angular-local-storage.min.js"></script>
<script src="app.js"></script>
<style> .glyphicon-thumbs-up {cursor:pointer} </style>
</head>
<body ng-app="flapperNews" ng-controller="MainCtrl">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="page-header">
<h1>Universities</h1>
</div>
<table class="table">
<th>University</th>
<th>Country</th>
<th>Preference</th>
<th>Term</th>
<th>Rating</th>
<tr ng-repeat="univ in univs | orderBy:'-preference'">
<td style="margin-left:10px;">
<a ng-show="univ.link" href="{{univ.link}}">
{{univ.university}}
</a>
<span ng-hide="univ.link">
{{univ.university}}
</span>
</td>
<td>{{univ.country}}</td>
<td>{{univ.preference}}</td>
<td>{{univ.term}}</td>
<td>{{univ.rating}}</td>
<td ng-click="deleteUniv($index)">Delete<td>
</tr>
</table>
<form ng-submit="addUniv()" style="margin-top:30px;">
<h3>Add a new Univesity</h3>
<div class="form-group">
<input type="text"
class="form-control"
placeholder="University"
ng-model="university"></input>
</div>
<div class="form-group">
<input type="text"
class="form-control"
placeholder="Country"
ng-model="country"></input>
</div>
<div class="form-group">
<input type="text"
class="form-control"
placeholder="link"
ng-model="link"></input>
</div>
<div class="form-group">
Preference:
<input type="number"
name="Preference"
min="0"
max="10"
class="form-control"
ng-model="preference"></input>
</div>
<div class="form-group">
Rating:
<input type="number"
name="rating"
class="form-control"
ng-model="rating"></input>
</div>
<div class="form-group">
Term:
<input type="number"
name="term"
min="0"
max="1"
class="form-control"
ng-model="term"></input>
</div>
<button type="submit" class="btn btn-primary">Add</button>
</form>
</div>
</div>
</body>
</html>