Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
4b3823cf
Commit
4b3823cf
authored
Feb 23, 2023
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化列表分页数据加载
parent
8e828553
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
152 additions
and
1 deletions
+152
-1
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/amount.phtml
+36
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/limiter.phtml
+31
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/sorter.phtml
+44
-0
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/viewmode.phtml
+40
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar.phtml
View file @
4b3823cf
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<?
php
$widget
=
$this
->
helper
(
\Magento\Framework\Json\Helper\Data
::
class
)
->
jsonDecode
(
$block
->
getWidgetOptionsJson
());
<?
php
$widget
=
$this
->
helper
(
\Magento\Framework\Json\Helper\Data
::
class
)
->
jsonDecode
(
$block
->
getWidgetOptionsJson
());
$widgetOptions
=
$this
->
helper
(
\Magento\Framework\Json\Helper\Data
::
class
)
->
jsonEncode
(
$widget
[
'productListToolbarForm'
]);
$widgetOptions
=
$this
->
helper
(
\Magento\Framework\Json\Helper\Data
::
class
)
->
jsonEncode
(
$widget
[
'productListToolbarForm'
]);
?>
?>
<div
class=
"toolbar toolbar-products"
style=
"display: none;"
data-mage-init=
'{"productListToolbarForm":
<?=
/* @noEscape */
$widgetOptions
?>
}'
>
<div
class=
"toolbar toolbar-products"
data-mage-init=
'{"productListToolbarForm":
<?=
/* @noEscape */
$widgetOptions
?>
}'
>
<?php
if
(
$block
->
getIsBottom
())
:
?>
<?php
if
(
$block
->
getIsBottom
())
:
?>
<?=
$block
->
getPagerHtml
()
?>
<?=
$block
->
getPagerHtml
()
?>
<?=
$block
->
fetchView
(
$block
->
getTemplateFile
(
'Magento_Catalog::product/list/toolbar/limiter.phtml'
))
?>
<?=
$block
->
fetchView
(
$block
->
getTemplateFile
(
'Magento_Catalog::product/list/toolbar/limiter.phtml'
))
?>
...
...
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/amount.phtml
0 → 100644
View file @
4b3823cf
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php
/**
* Product list toolbar
*
* @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar
*/
?>
<p
class=
"toolbar-amount"
id=
"toolbar-amount"
>
<?php
if
(
$block
->
getLastPageNum
()
>
1
)
:?>
<?=
$block
->
escapeHtml
(
__
(
'Items %1-%2 of %3'
,
'<span class="toolbar-number">'
.
$block
->
getFirstNum
()
.
'</span>'
,
'<span class="toolbar-number">'
.
$block
->
getLastNum
()
.
'</span>'
,
'<span class="toolbar-number">'
.
$block
->
getTotalNum
()
.
'</span>'
),
[
'span'
]
)
?>
<?php
elseif
(
$block
->
getTotalNum
()
==
1
)
:?>
<?=
$block
->
escapeHtml
(
__
(
'%1 Item'
,
'<span class="toolbar-number">'
.
$block
->
getTotalNum
()
.
'</span>'
),
[
'span'
]
)
?>
<?php
else
:?>
<?=
$block
->
escapeHtml
(
__
(
'%1 Items'
,
'<span class="toolbar-number">'
.
$block
->
getTotalNum
()
.
'</span>'
),
[
'span'
]
)
?>
<?php
endif
;
?>
</p>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/limiter.phtml
0 → 100644
View file @
4b3823cf
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php
/**
* Product list toolbar
*
* @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar
*/
?>
<div
class=
"field limiter"
style=
"display: none;"
>
<label
class=
"label"
for=
"limiter"
>
<span>
<?=
$block
->
escapeHtml
(
__
(
'Show'
))
?>
</span>
</label>
<div
class=
"control"
>
<select
id=
"limiter"
data-role=
"limiter"
class=
"limiter-options"
>
<?php
foreach
(
$block
->
getAvailableLimit
()
as
$_key
=>
$_limit
)
:?>
<
option
value
=
"<?=
$block->escapeHtmlAttr
(
$_key
) ?>"
<?
php
if
(
$block
->
isLimitCurrent
(
$_key
))
:?>
selected
=
"selected"
<?
php
endif
?>
>
<?=
$block
->
escapeHtml
(
$_limit
)
?>
</option>
<?php
endforeach
;
?>
</select>
</div>
<span
class=
"limiter-text"
>
<?=
$block
->
escapeHtml
(
__
(
'per page'
))
?>
</span>
</div>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/sorter.phtml
0 → 100644
View file @
4b3823cf
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php
/**
* Product list toolbar
*
* @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar
*/
?>
<div
class=
"toolbar-sorter sorter"
>
<label
class=
"sorter-label"
for=
"sorter"
>
<?=
$block
->
escapeHtml
(
__
(
'Sort By'
))
?>
</label>
<select
id=
"sorter"
data-role=
"sorter"
class=
"sorter-options"
>
<?php
foreach
(
$block
->
getAvailableOrders
()
as
$_key
=>
$_order
)
:?>
<
option
value
=
"<?=
$block->escapeHtmlAttr
(
$_key
) ?>"
<?
php
if
(
$block
->
isOrderCurrent
(
$_key
))
:?>
selected
=
"selected"
<?
php
endif
;
?>
>
<?=
$block
->
escapeHtml
(
__
(
$_order
))
?>
</option>
<?php
endforeach
;
?>
</select>
<?php
if
(
$block
->
getCurrentDirection
()
==
'desc'
)
:?>
<
a
title
=
"<?=
$block->escapeHtmlAttr
(__('Set Ascending Direction')) ?>"
href
=
"#"
class
="
action
sorter
-
action
sort
-
desc
"
data-role="
direction
-
switcher
"
data-value="
asc
">
<span><?=
$block->escapeHtml
(__('Set Ascending Direction')) ?></span>
</a>
<?php else :?>
<a title="
<?=
$block
->
escapeHtmlAttr
(
__
(
'Set Descending Direction'
))
?>
"
href="#"
class="action sorter-action sort-asc"
data-role="direction-switcher"
data-value="desc">
<span>
<?=
$block
->
escapeHtml
(
__
(
'Set Descending Direction'
))
?>
</span>
</a>
<?php
endif
;
?>
</div>
app/design/frontend/Joshine/breeze/Magento_Catalog/templates/product/list/toolbar/viewmode.phtml
0 → 100644
View file @
4b3823cf
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php
/**
* Product list toolbar
*
* @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar
*/
?>
<?php
if
(
$block
->
isEnabledViewSwitcher
())
:?>
<
div
class
="
modes
">
<?php
$_modes
=
$block->getModes
(); ?>
<?php if (
$_modes
&& count(
$_modes
) > 1) :?>
<strong class="
modes
-
label
" id="
modes
-
label
"><?=
$block->escapeHtml
(__('View as')) ?></strong>
<?php foreach (
$block->getModes
() as
$_code
=>
$_label
) :?>
<?php if (
$block->isModeActive
(
$_code
)) :?>
<strong title="
<?=
$block
->
escapeHtmlAttr
(
$_label
)
?>
"
class="modes-mode active mode-
<?=
$block
->
escapeHtmlAttr
(
strtolower
(
$_code
))
?>
"
data-value="
<?=
$block
->
escapeHtmlAttr
(
strtolower
(
$_code
))
?>
">
<span>
<?=
$block
->
escapeHtml
(
$_label
)
?>
</span>
</strong>
<?php
else
:?>
<
a
class
="
modes
-
mode
mode
-<?=
$block
->
escapeHtmlAttr
(
strtolower
(
$_code
))
?>
"
title="
<?=
$block
->
escapeHtmlAttr
(
$_label
)
?>
"
href="#"
data-role="mode-switcher"
data-value="
<?=
$block
->
escapeHtmlAttr
(
strtolower
(
$_code
))
?>
"
id="mode-
<?=
$block
->
escapeHtmlAttr
(
strtolower
(
$_code
))
?>
"
aria-labelledby="modes-label mode-
<?=
$block
->
escapeHtmlAttr
(
strtolower
(
$_code
))
?>
">
<span>
<?=
$block
->
escapeHtml
(
$_label
)
?>
</span>
</a>
<?php
endif
;
?>
<?php
endforeach
;
?>
<?php
endif
;
?>
</div>
<?php
endif
;
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment