/
pagination-input.html
41 lines (39 loc) · 1.67 KB
/
pagination-input.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
<% if (!_.isMobile()) { %>
<span><%- _.__('oro.datagrid.pagination.label') %>:</span>
<% } %>
<% _.each(handles, function (handle) { %>
<% if (handle.type == "input") { %>
<input type="number"
class="grid-toolbar-input"
value="<%- state.firstPage == 0 ? state.currentPage + 1 : state.currentPage %>"
<% if (disabled) { %>disabled<% } %>
data-grid-pagination-trigger-input aria-label="<%- _.__('oro.datagrid.pagination.input-aria') %>"
>
<% } else { %>
<%
var buttonClassNames = _.isDesktop() ? 'btn btn-icon btn-light pagination-trigger ' : 'btn btn-icon pagination-trigger ';
buttonClassNames += handle.className ? handle.className : '';
buttonClassNames += disabled ? ' disabled': '';
%>
<button class="<%- buttonClassNames %>"
<% if (handle.title) { %> title="<%- handle.title %>"<% } %>
data-grid-pagination-trigger
data-grid-pagination-direction="<%- handle.direction %>"
title="<%- handle.label %>"
>
<% if (handle.wrapClass) { %>
<span<% if (handle.wrapClass) { %> class="<%- handle.wrapClass %>"<% } %>
aria-hidden="true"
>
<%- handle.label %>
</span>
<% } else { %>
<%- handle.label %>
<% } %>
</button>
<% } %>
<% }); %>
<% if (!_.isMobile()) { %>
<span><%- _.__('oro.datagrid.pagination.totalPages', {totalPages: state.totalPages || 1}) %></span>
<span class="totals-label"><%- _.__('oro.datagrid.pagination.totalRecords', {totalRecords: state.totalRecords}) %></span>
<% } %>