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