File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
app/code/Magento/Ui/view/base/web Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,26 @@ define([
110
110
return this ;
111
111
} ,
112
112
113
+ /**
114
+ * Gets first item index on current page.
115
+ *
116
+ * @returns {Number }
117
+ */
118
+ getFirstItemIndex : function ( ) {
119
+ return this . pageSize * ( this . current - 1 ) + 1 ;
120
+ } ,
121
+
122
+ /**
123
+ * Gets last item index on current page.
124
+ *
125
+ * @returns {Number }
126
+ */
127
+ getLastItemIndex : function ( ) {
128
+ var lastItem = this . getFirstItemIndex ( ) + this . pageSize - 1 ;
129
+
130
+ return this . totalRecords < lastItem ? this . totalRecords : lastItem ;
131
+ } ,
132
+
113
133
/**
114
134
* Sets cursor to the provied value.
115
135
*
Original file line number Diff line number Diff line change
1
+ <!--
2
+ /**
3
+ * Copyright © 2016 Magento. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ -->
7
+ < div class ="admin__control-support-text ">
8
+ <!-- ko if: totalRecords -->
9
+ < strong >
10
+ < text args ="getFirstItemIndex() "/> -
11
+ < text args ="getLastItemIndex() "/>
12
+ </ strong >
13
+ <!-- ko i18n: 'of' --> <!-- /ko -->
14
+ <!-- /ko -->
15
+ < strong text ="totalRecords "/>
16
+ <!-- ko i18n: 'records found' --> <!-- /ko -->
17
+ <!-- ko if: totalSelected -->
18
+ (< text args ="totalSelected "/> <!-- ko i18n: 'selected' --> <!-- /ko --> )
19
+ <!-- /ko -->
20
+ </ div >
You can’t perform that action at this time.
0 commit comments