Skip to content

Commit 1d10637

Browse files
author
Hwashiang Yu
committed
MAGETWO-56444: UI-Related Modules Template Update
- Resolved static failure issues
1 parent a87ea60 commit 1d10637

File tree

18 files changed

+85
-123
lines changed

18 files changed

+85
-123
lines changed

app/code/Magento/Theme/view/adminhtml/templates/browser/content/files.phtml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,21 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/** @var $block \Magento\Theme\Block\Adminhtml\Wysiwyg\Files\Content\Files */
108
?>
119

12-
<?php if ($block->getFilesCount() > 0): ?>
13-
<?php foreach ($block->getFiles() as $file): ?>
10+
<?php if ($block->getFilesCount() > 0) : ?>
11+
<?php foreach ($block->getFiles() as $file) : ?>
1412
<div class="filecnt file-font" id="<?= $block->escapeHtmlAttr($file['id']) ?>">
1513
<p class="nm">
1614
<?= $block->escapeHtml($file['text']) ?>
17-
<?php if (isset($file['thumbnailParams'])): ?>
15+
<?php if (isset($file['thumbnailParams'])) : ?>
1816
<img src="<?= $block->escapeUrl($block->getUrl('*/*/previewImage', $file['thumbnailParams'])) ?>"
1917
alt="<?= $block->escapeHtmlAttr(__('thumbnail')) ?>">
2018
<?php endif; ?>
2119
</p>
2220
</div>
2321
<?php endforeach; ?>
24-
<?php else: ?>
22+
<?php else : ?>
2523
<?= $block->escapeHtml(__('We found no files.')) ?>
2624
<?php endif; ?>

app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
7+
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
98
/** @var $block \Magento\Backend\Block\Widget\Form\Renderer\Fieldset */
109
?>
1110

@@ -62,7 +61,7 @@ jQuery(function($) {
6261
$('body').trigger(
6362
'refreshJsList',
6463
{
65-
jsList: <?= /* @noEscape */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getJsFiles()) ?>
64+
jsList: <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getJsFiles()) ?>
6665
}
6766
);
6867
});

app/code/Magento/Theme/view/base/templates/root.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
76
?>
87
<!doctype html>
98
<html <?= /* @noEscape */ $htmlAttributes ?>>

app/code/Magento/Theme/view/frontend/templates/callouts/left_col.phtml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,22 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
86
?>
97
<div class="block block-banner">
108
<div class="block-content">
11-
<?php if (strtolower(substr($block->getLinkUrl(), 0, 4)) === 'http'): ?>
9+
<?php if (strtolower(substr($block->getLinkUrl(), 0, 4)) === 'http') : ?>
1210
<a href="<?= $block->escapeUrl($block->getLinkUrl()) ?>"
1311
title="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>">
14-
<?php elseif ($block->getLinkUrl()): ?>
12+
<?php elseif ($block->getLinkUrl()) : ?>
1513
<a href="<?= $block->escapeUrl($block->getUrl($block->getLinkUrl())) ?>"
1614
title="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>">
1715
<?php endif; ?>
1816
<img src="<?= $block->escapeUrl($block->getViewFileUrl($block->getImgSrc())) ?>"
19-
<?php if (!$block->getLinkUrl()): ?>
17+
<?php if (!$block->getLinkUrl()) : ?>
2018
title="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>"
2119
<?php endif; ?>
2220
alt="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>" />
23-
<?php if ($block->getLinkUrl()): ?>
21+
<?php if ($block->getLinkUrl()) : ?>
2422
</a>
2523
<?php endif ?>
2624
</div>

app/code/Magento/Theme/view/frontend/templates/callouts/right_col.phtml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,22 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
86
?>
97
<div class="block block-banner">
108
<div class="block-content">
11-
<?php if (strtolower(substr($block->getLinkUrl(), 0, 4)) === 'http'): ?>
9+
<?php if (strtolower(substr($block->getLinkUrl(), 0, 4)) === 'http') : ?>
1210
<a href="<?= $block->escapeUrl($block->getLinkUrl()) ?>"
1311
title="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>">
14-
<?php elseif ($block->getLinkUrl()): ?>
12+
<?php elseif ($block->getLinkUrl()) : ?>
1513
<a href="<?= $block->escapeUrl($block->getUrl($block->getLinkUrl())) ?>"
1614
title="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>">
1715
<?php endif; ?>
1816
<img src="<?= $block->escapeUrl($block->getViewFileUrl($block->getImgSrc())) ?>"
19-
<?php if (!$block->getLinkUrl()): ?>
17+
<?php if (!$block->getLinkUrl()) : ?>
2018
title="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>"
2119
<?php endif; ?>
2220
alt="<?= $block->escapeHtmlAttr(__($block->getImgAlt())) ?>" />
23-
<?php if ($block->getLinkUrl()): ?>
21+
<?php if ($block->getLinkUrl()) : ?>
2422
</a>
2523
<?php endif ?>
2624
</div>

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
86
?>
97
<?php if ($crumbs && is_array($crumbs)) : ?>
108
<div class="breadcrumbs">
@@ -18,7 +16,7 @@
1816
</a>
1917
<?php elseif ($crumbInfo['last']) : ?>
2018
<strong><?= $block->escapeHtml($crumbInfo['label']) ?></strong>
21-
<?php else: ?>
19+
<?php else : ?>
2220
<?= $block->escapeHtml($crumbInfo['label']) ?>
2321
<?php endif; ?>
2422
</li>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
86
?>
97

108
<div class="block <?= $block->escapeHtmlAttr($block->getBlockCss()) ?>">

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

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,37 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/**
108
* @var \Magento\Theme\Block\Html\Header $block
119
*/
1210
$welcomeMessage = $block->getWelcome();
1311
?>
14-
<?php switch ($block->getShowPart()):
15-
case 'welcome': ?>
16-
<li class="greet welcome" data-bind="scope: 'customer'">
17-
<!-- ko if: customer().fullname -->
18-
<span class="logged-in"
19-
data-bind="text: new String('<?= $block->escapeHtml(__('Welcome, %1!', '%1')) ?>').replace('%1', customer().fullname)">
20-
</span>
21-
<!-- /ko -->
22-
<!-- ko ifnot: customer().fullname -->
23-
<span class="not-logged-in"
24-
data-bind='html:"<?= $block->escapeHtml($welcomeMessage) ?>"'></span>
25-
<?= $block->getBlockHtml('header.additional') ?>
26-
<!-- /ko -->
27-
</li>
28-
<script type="text/x-magento-init">
29-
{
30-
"*": {
31-
"Magento_Ui/js/core/app": {
32-
"components": {
33-
"customer": {
34-
"component": "Magento_Customer/js/view/customer"
35-
}
12+
<?php if ($block->getShowPart() == 'welcome') : ?>
13+
<li class="greet welcome" data-bind="scope: 'customer'">
14+
<!-- ko if: customer().fullname -->
15+
<span class="logged-in"
16+
data-bind="text: new String('<?= $block->escapeHtml(__('Welcome, %1!', '%1')) ?>').replace('%1', customer().fullname)">
17+
</span>
18+
<!-- /ko -->
19+
<!-- ko ifnot: customer().fullname -->
20+
<span class="not-logged-in"
21+
data-bind='html:"<?= $block->escapeHtml($welcomeMessage) ?>"'></span>
22+
<?= $block->getBlockHtml('header.additional') ?>
23+
<!-- /ko -->
24+
</li>
25+
<script type="text/x-magento-init">
26+
{
27+
"*": {
28+
"Magento_Ui/js/core/app": {
29+
"components": {
30+
"customer": {
31+
"component": "Magento_Customer/js/view/customer"
3632
}
3733
}
3834
}
3935
}
40-
</script>
41-
<?php break; ?>
42-
43-
<?php case 'other': ?>
44-
<?= $block->getChildHtml() ?>
45-
<?php break; ?>
46-
47-
<?php endswitch; ?>
36+
}
37+
</script>
38+
<?php elseif ($block->getShowPart() == 'other') :?>
39+
<?= $block->getChildHtml() ?>
40+
<?php endif ?>

app/code/Magento/Theme/view/frontend/templates/html/header/logo.phtml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/**
108
* @var \Magento\Theme\Block\Html\Header\Logo $block
119
*/
@@ -20,7 +18,7 @@ $storeName = $block->getThemeName() ? $block->getThemeName() : $block->getLogoAl
2018
<img src="<?= $block->escapeUrl($block->getLogoSrc()) ?>"
2119
title="<?= $block->escapeHtmlAttr($block->getLogoAlt()) ?>"
2220
alt="<?= $block->escapeHtmlAttr($block->getLogoAlt()) ?>"
23-
<?= $block->getLogoWidth() ? 'width="' . $block->escapeHtmlAttr($block->getLogoWidth()) . '"' : '' ?>
24-
<?= $block->getLogoHeight() ? 'height="' . $block->escapeHtmlAttr($block->getLogoHeight()) . '"' : '' ?>
21+
<?= $block->getLogoWidth() ? 'width="' . $block->escapeHtmlAttr($block->getLogoWidth()) . '"' : '' ?>
22+
<?= $block->getLogoHeight() ? 'height="' . $block->escapeHtmlAttr($block->getLogoHeight()) . '"' : '' ?>
2523
/>
2624
</a>

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/**
108
* @var $block \Magento\Theme\Block\Html\Notices
119
*/
1210
?>
13-
<?php if ($block->displayNoscriptNotice()): ?>
11+
<?php if ($block->displayNoscriptNotice()) : ?>
1412
<noscript>
1513
<div class="message global noscript">
1614
<div class="content">
@@ -22,7 +20,7 @@
2220
</div>
2321
</noscript>
2422
<?php endif; ?>
25-
<?php if ($block->displayNoLocalStorageNotice()): ?>
23+
<?php if ($block->displayNoLocalStorageNotice()) : ?>
2624
<div class="notice global site local_storage" style="display: none;">
2725
<div class="content">
2826
<p>
@@ -49,7 +47,7 @@ require(['jquery'], function(jQuery){
4947
});
5048
</script>
5149
<?php endif; ?>
52-
<?php if ($block->displayDemoNotice()): ?>
50+
<?php if ($block->displayDemoNotice()) : ?>
5351
<div class="message global demo">
5452
<div class="content">
5553
<p><?= $block->escapeHtml(__('This is a demo store. No orders will be fulfilled.')) ?></p>

0 commit comments

Comments
 (0)