61a10bf5c088282f0b2ba0d2df4ee6f60d9bc055
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Resources / Private / Templates / ViewHelpers / Be / Widget / Paginate / Index.html
1 <f:if condition="{configuration.insertAbove}">
2 <f:render section="paginator" arguments="{pagination: pagination, position:'top', recordsLabel: configuration.recordsLabel}" />
3 </f:if>
4
5 <f:renderChildren arguments="{contentArguments}" />
6
7 <f:if condition="{configuration.insertBelow}">
8 <f:render section="paginator" arguments="{pagination: pagination, position:'bottom', recordsLabel: configuration.recordsLabel}" />
9 </f:if>
10
11 <f:section name="paginator">
12 <nav id="typo3-dblist-pagination">
13 <ul class="pagination">
14 <f:if condition="{pagination.hasLessPages}">
15 <f:then>
16 <li>
17 <f:be.buttons.icon
18 uri="{f:widget.uri(arguments:{currentPage: 1})}"
19 icon="actions-view-paging-first"
20 title="{f:translate(key:'widget.pagination.first')}"
21 />
22 </li>
23 <li>
24 <f:be.buttons.icon
25 uri="{f:widget.uri(arguments:{currentPage: pagination.previousPage})}"
26 icon="actions-view-paging-previous"
27 title="{f:translate(key:'widget.pagination.previous')}"
28 />
29 </li>
30 </f:then>
31 <f:else>
32 <li class="disabled">
33 <span>
34 <f:be.buttons.icon
35 uri=""
36 icon="actions-view-paging-first"
37 />
38 </span>
39 </li>
40 <li class="disabled">
41 <span>
42 <f:be.buttons.icon
43 uri=""
44 icon="actions-view-paging-previous"
45 />
46 </span>
47 </li>
48 </f:else>
49 </f:if>
50 <li>
51 <span>
52 <f:if condition="{recordsLabel}">
53 <f:then>
54 {recordsLabel}
55 </f:then>
56 <f:else>
57 <f:translate key="widget.pagination.records" />
58 </f:else>
59 </f:if>
60 {pagination.startRecord} - {pagination.endRecord}
61 </span>
62 </li>
63 <li>
64 <span>
65 <f:translate key="widget.pagination.page" />
66 <span>
67 <form id="paginator-form-{position}" onsubmit="goToPage{position}(this); return false;" style="display:inline;">
68 <script type="text/javascript">
69 function goToPage{position}(formObject) {
70 var url = '{f:widget.uri(arguments:{currentPage: 987654321})}';
71 var page = formObject.elements['paginator-target-page'].value;
72 if (page > {pagination.numberOfPages}) {
73 page = {pagination.numberOfPages};
74 } else if (page < 1) {
75 page = 1;
76 }
77 url = url.replace('987654321', page);
78 self.location.href= url;
79 }
80 </script>
81 <f:form.textfield id="paginator-{position}" name="paginator-target-page" class="paginator-input" size="5" value="{pagination.current}" />
82 </form>
83 </span>
84 / {pagination.numberOfPages}
85 </span>
86 </li>
87 <f:if condition="{pagination.hasMorePages}">
88 <f:then>
89 <li>
90 <f:be.buttons.icon
91 uri="{f:widget.uri(arguments:{currentPage: pagination.nextPage})}"
92 icon="actions-view-paging-next"
93 title="{f:translate(key:'widget.pagination.next')}"
94 />
95 </li>
96 <li>
97 <f:be.buttons.icon
98 uri="{f:widget.uri(arguments:{currentPage: pagination.numberOfPages})}"
99 icon="actions-view-paging-last"
100 title="{f:translate(key:'widget.pagination.last')}"
101 />
102 </li>
103 </f:then>
104 <f:else>
105 <li class="disabled">
106 <span>
107 <f:be.buttons.icon
108 uri=""
109 icon="actions-view-paging-next"
110 />
111 </span>
112 </li>
113 <li class="disabled">
114 <span>
115 <f:be.buttons.icon
116 uri=""
117 icon="actions-view-paging-last"
118 />
119 </span>
120 </li>
121 </f:else>
122 </f:if>
123 <li>
124 <f:be.buttons.icon
125 uri="{f:widget.uri(arguments:{currentPage: pagination.current})}"
126 icon="actions-system-refresh"
127 title="{f:translate(key:'widget.pagination.refresh')}"
128 />
129 </li>
130 </ul>
131 </nav>
132 </f:section>