[FEATURE] Backend paginate widget
[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 <div id="typo3-dblist-pagination">
13 <f:if condition="{pagination.hasLessPages}">
14 <f:then>
15 <f:be.buttons.icon
16 uri="{f:widget.uri(arguments:{currentPage: 1})}"
17 icon="actions-view-paging-first"
18 title="{f:translate(key:'widget.pagination.first')}"
19 />
20 <f:be.buttons.icon
21 uri="{f:widget.uri(arguments:{currentPage: pagination.previousPage})}"
22 icon="actions-view-paging-previous"
23 title="{f:translate(key:'widget.pagination.previous')}"
24 />
25 </f:then>
26 <f:else>
27 <f:be.buttons.icon
28 uri=""
29 icon="actions-view-paging-first-disabled"
30 />
31 <f:be.buttons.icon
32 uri=""
33 icon="actions-view-paging-previous-disabled"
34 />
35 </f:else>
36 </f:if>
37 <span class="bar"> </span>
38 <span class="pageIndicator">
39 <f:if condition="{recordsLabel}">
40 <f:then>
41 {recordsLabel}
42 </f:then>
43 <f:else>
44 <f:translate key="widget.pagination.records" />
45 </f:else>
46 </f:if>
47 {pagination.startRecord} - {pagination.endRecord}</span>
48 <span class="bar"> </span>
49 <span class="pageIndicator">
50 <f:translate key="widget.pagination.page" />
51 <span>
52 <form id="paginator-form-{position}" onsubmit="goToPage{position}(this); return false;" style="display:inline;">
53 <script type="text/javascript">
54 function goToPage{position}(formObject) {
55 var url = '{f:widget.uri(arguments:{currentPage: 987654321})}';
56 var page = formObject.elements['paginator-target-page'].value;
57 if (page > {pagination.numberOfPages}) {
58 page = {pagination.numberOfPages};
59 } else if (page < 1) {
60 page = 1;
61 }
62 url = url.replace('987654321', page);
63 self.location.href= url;
64 }
65 </script>
66 <f:form.textfield id="paginator-{position}" name="paginator-target-page" size="5" value="{pagination.current}" />
67 </form>
68 </span>
69 / {pagination.numberOfPages}
70 </span>
71 <span class="bar"> </span>
72 <f:if condition="{pagination.hasMorePages}">
73 <f:then>
74 <f:be.buttons.icon
75 uri="{f:widget.uri(arguments:{currentPage: pagination.nextPage})}"
76 icon="actions-view-paging-next"
77 title="{f:translate(key:'widget.pagination.next')}"
78 />
79 <f:be.buttons.icon
80 uri="{f:widget.uri(arguments:{currentPage: pagination.numberOfPages})}"
81 icon="actions-view-paging-last"
82 title="{f:translate(key:'widget.pagination.last')}"
83 />
84 </f:then>
85 <f:else>
86 <f:be.buttons.icon
87 uri="{f:widget.uri(arguments:{currentPage: pagination.nextPage})}"
88 icon="actions-view-paging-next-disabled"
89 />
90 <f:be.buttons.icon
91 uri="{f:widget.uri(arguments:{currentPage: pagination.numberOfPages})}"
92 icon="actions-view-paging-last-disabled"
93 />
94 </f:else>
95 </f:if>
96 <span class="bar"> </span>
97 <f:be.buttons.icon
98 uri="{f:widget.uri(arguments:{currentPage: pagination.current})}"
99 icon="actions-system-refresh"
100 title="{f:translate(key:'widget.pagination.refresh')}"
101 />
102 </div>
103 </f:section>