forked from toranb/ember-pagination-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
61 lines (49 loc) · 1.57 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
<!DOCTYPE html>
<html>
<head>
<title>Pagination Example</title>
</head>
<body>
<script type="text/x-handlebars" data-template-name="application">
<div id="main">
{{ outlet }}
</div>
</script>
<script type="text/x-handlebars" data-template-name="person">
<table width="250px">
<thead>
<th>id</th>
<th>username</th>
</thead>
<tbody>
{{#each person in controller.paginatedContent}}
<tr>
<td>{{person.id}}</td>
<td>{{view Ember.TextField valueBinding="person.username"}}</td>
</tr>
{{/each}}
</tbody>
</table>
<div name="prev">{{#linkTo 'person.page' prevPage target="controller"}}Prev{{/linkTo}}</div>
<ul class="pagination gui-text">
{{#each pages}}
{{view PersonApp.PaginationView contentBinding="this"}}
{{/each}}
</ul>
<div name="next">{{#linkTo 'person.page' nextPage target="controller"}}Next{{/linkTo}}</div>
</script>
<script type="text/x-handlebars" data-template-name="pagination">
{{#with view}}
{{#linkTo 'person.page' page}}
{{content.page_id}}
{{/linkTo}}
{{/with}}
</script>
<script src="example/static/script/vendor/jquery-1.9.1.js" type="text/javascript"></script>
<script src="example/static/script/vendor/handlebars-1.0.0-rc.4.js" type="text/javascript"></script>
<script src="example/static/script/vendor/ember-1.0.0-rc.5.js" type="text/javascript"></script>
<script src="example/static/script/vendor/ember-data.js" type="text/javascript"></script>
<script src="example/static/script/vendor/pagination.js" type="text/javascript"></script>
<script src="example/static/script/app/person.js" type="text/javascript"></script>
</body>
</html>