Skip to content

Commit 9d76e2b

Browse files
authored
Merge pull request #5157 from magento-arcticfoxes/B2B-272
[arcticfoxes] B2B-272: Styling for Order Search fields
2 parents d480fdb + 1ef8626 commit 9d76e2b

File tree

3 files changed

+35
-23
lines changed

3 files changed

+35
-23
lines changed

app/code/Magento/Sales/Block/Order/History.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,14 @@ public function getBackUrl()
188188
{
189189
return $this->getUrl('customer/account/');
190190
}
191+
192+
/**
193+
* Get message for no orders.
194+
*
195+
* @return \Magento\Framework\Phrase
196+
*/
197+
public function getEmptyOrdersMessage()
198+
{
199+
return __('You have placed no orders.');
200+
}
191201
}

app/code/Magento/Sales/view/frontend/templates/order/history.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@
5959
<div class="order-products-toolbar toolbar bottom"><?= $block->getPagerHtml() ?></div>
6060
<?php endif ?>
6161
<?php else : ?>
62-
<div class="message info empty"><span><?= $block->escapeHtml(__('You have placed no orders.')) ?></span></div>
62+
<div class="message info empty"><span><?= $block->escapeHtml($block->getEmptyOrdersMessage()) ?></span></div>
6363
<?php endif ?>

app/code/Magento/Theme/view/frontend/templates/html/pager.phtml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,33 @@
1010
* @see \Magento\Theme\Block\Html\Pager
1111
*/
1212
?>
13-
<?php if ($block->getCollection()->getSize()) : ?>
13+
<?php if ($block->getCollection()->getSize()): ?>
1414

15-
<?php if ($block->getUseContainer()) : ?>
15+
<?php if ($block->getUseContainer()): ?>
1616
<div class="pager">
1717
<?php endif ?>
1818

19-
<?php if ($block->getShowAmounts()) : ?>
19+
<?php if ($block->getShowAmounts()): ?>
2020
<p class="toolbar-amount">
2121
<span class="toolbar-number">
22-
<?php if ($block->getLastPageNum()>1) : ?>
23-
<?= $block->escapeHtml(__('Items %1 to %2 of %3 total', $block->getFirstNum(), $block->getLastNum(), $block->getTotalNum())) ?>
24-
<?php elseif ($block->getTotalNum() == 1) : ?>
22+
<?php if ($block->getLastPageNum()>1): ?>
23+
<?= $block->escapeHtml(
24+
__('Items %1 to %2 of %3 total', $block->getFirstNum(), $block->getLastNum(), $block->getTotalNum())
25+
) ?>
26+
<?php elseif ($block->getTotalNum() == 1): ?>
2527
<?= $block->escapeHtml(__('%1 Item', $block->getTotalNum())) ?>
26-
<?php else : ?>
28+
<?php else: ?>
2729
<?= $block->escapeHtml(__('%1 Item(s)', $block->getTotalNum())) ?>
2830
<?php endif; ?>
2931
</span>
3032
</p>
3133
<?php endif ?>
3234

33-
<?php if ($block->getLastPageNum()>1) : ?>
35+
<?php if ($block->getLastPageNum()>1): ?>
3436
<div class="pages">
3537
<strong class="label pages-label" id="paging-label"><?= $block->escapeHtml(__('Page')) ?></strong>
3638
<ul class="items pages-items" aria-labelledby="paging-label">
37-
<?php if (!$block->isFirstPage()) : ?>
39+
<?php if (!$block->isFirstPage()): ?>
3840
<li class="item pages-item-previous">
3941
<?php $text = $block->getAnchorTextForPrevious() ? $block->getAnchorTextForPrevious() : '';?>
4042
<a class="<?= $block->escapeHtmlAttr($text ? 'link ' : 'action ') ?> previous"
@@ -46,7 +48,7 @@
4648
</li>
4749
<?php endif;?>
4850

49-
<?php if ($block->canShowFirst()) : ?>
51+
<?php if ($block->canShowFirst()): ?>
5052
<li class="item">
5153
<a class="page first" href="<?= $block->escapeUrl($block->getFirstPageUrl()) ?>">
5254
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
@@ -55,7 +57,7 @@
5557
</li>
5658
<?php endif;?>
5759

58-
<?php if ($block->canShowPreviousJump()) : ?>
60+
<?php if ($block->canShowPreviousJump()): ?>
5961
<li class="item">
6062
<a class="page previous jump"
6163
title=""
@@ -65,15 +67,15 @@
6567
</li>
6668
<?php endif;?>
6769

68-
<?php foreach ($block->getFramePages() as $_page) : ?>
69-
<?php if ($block->isPageCurrent($_page)) : ?>
70+
<?php foreach ($block->getFramePages() as $_page): ?>
71+
<?php if ($block->isPageCurrent($_page)): ?>
7072
<li class="item current">
7173
<strong class="page">
7274
<span class="label"><?= $block->escapeHtml(__('You\'re currently reading page')) ?></span>
7375
<span><?= $block->escapeHtml($_page) ?></span>
7476
</strong>
7577
</li>
76-
<?php else : ?>
78+
<?php else: ?>
7779
<li class="item">
7880
<a href="<?= $block->escapeUrl($block->getPageUrl($_page)) ?>" class="page">
7981
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
@@ -83,15 +85,15 @@
8385
<?php endif;?>
8486
<?php endforeach;?>
8587

86-
<?php if ($block->canShowNextJump()) : ?>
88+
<?php if ($block->canShowNextJump()): ?>
8789
<li class="item">
8890
<a class="page next jump" title="" href="<?= $block->escapeUrl($block->getNextJumpUrl()) ?>">
8991
<span>...</span>
9092
</a>
9193
</li>
9294
<?php endif;?>
9395

94-
<?php if ($block->canShowLast()) : ?>
96+
<?php if ($block->canShowLast()): ?>
9597
<li class="item">
9698
<a class="page last" href="<?= $block->escapeUrl($block->getLastPageUrl()) ?>">
9799
<span class="label"><?= $block->escapeHtml(__('Page')) ?></span>
@@ -100,7 +102,7 @@
100102
</li>
101103
<?php endif;?>
102104

103-
<?php if (!$block->isLastPage()) : ?>
105+
<?php if (!$block->isLastPage()): ?>
104106
<li class="item pages-item-next">
105107
<?php $text = $block->getAnchorTextForNext() ? $block->getAnchorTextForNext() : '';?>
106108
<a class="<?= /* @noEscape */ $text ? 'link ' : 'action ' ?> next"
@@ -115,13 +117,13 @@
115117
</div>
116118
<?php endif; ?>
117119

118-
<?php if ($block->isShowPerPage()) : ?>
120+
<?php if ($block->isShowPerPage()): ?>
119121
<div class="limiter">
120122
<strong class="limiter-label"><?= $block->escapeHtml(__('Show')) ?></strong>
121123
<select id="limiter" data-mage-init='{"redirectUrl": {"event":"change"}}' class="limiter-options">
122-
<?php foreach ($block->getAvailableLimit() as $_key => $_limit) : ?>
123-
<option value="<?= $block->escapeHtmlAttr($block->getLimitUrl($_key)) ?>"
124-
<?php if ($block->isLimitCurrent($_key)) : ?>
124+
<?php foreach ($block->getAvailableLimit() as $_key => $_limit): ?>
125+
<option value="<?= $block->escapeUrl($block->getLimitUrl($_key)) ?>"
126+
<?php if ($block->isLimitCurrent($_key)): ?>
125127
selected="selected"<?php endif ?>>
126128
<?= $block->escapeHtml($_limit) ?>
127129
</option>
@@ -131,7 +133,7 @@
131133
</div>
132134
<?php endif ?>
133135

134-
<?php if ($block->getUseContainer()) : ?>
136+
<?php if ($block->getUseContainer()): ?>
135137
</div>
136138
<?php endif ?>
137139

0 commit comments

Comments
 (0)