Skip to content

Commit f900a72

Browse files
author
Bogdan Plieshka
committed
MAGETWO-32250: Header
- CR changes
1 parent e28caa0 commit f900a72

File tree

9 files changed

+46
-21
lines changed

9 files changed

+46
-21
lines changed

app/code/Magento/AdminNotification/view/adminhtml/web/toolbar_entry.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,18 @@ define([
7373

7474
// Remove corresponding notification from the list and mark it as read
7575
$('.notifications-close').on('click.removeNotification', function (event) {
76-
var notificationsList = $(this).closest('.notifications-list'),
77-
notificationEntries = notificationsList.find('.notifications-entry'),
78-
notificationEntry = $(this).closest('.notifications-entry'),
76+
var notificationEntry = $(this).closest('.notifications-entry'),
7977
notificationId = notificationEntry.attr('data-notification-id');
8078

8179
markNotificationAsRead(notificationId);
8280
removeNotificationFromList(notificationEntry);
8381

8482
// Checking for last unread notification to hide dropdown
85-
if (notificationEntries.length == 2 && notificationCount == 0) {
83+
if (notificationCount == 0) {
8684
$('.notifications-wrapper').removeClass('active')
8785
.find('.notifications-action').removeAttr('data-toggle')
8886
.off('click.dropdown');
8987
}
90-
9188
event.stopPropagation();
9289
});
9390

app/code/Magento/Backend/Block/System/Design.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function _prepareLayout()
2424
]
2525
);
2626

27-
$this->getLayout()->getBlock('page-title-wrapper')->setPageTitle('Store Design Schedule');
27+
$this->getLayout()->getBlock('page.title')->setPageTitle('Store Design Schedule');
2828

2929
return parent::_prepareLayout();
3030
}

app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,52 @@
1111
<?php switch ($block->getShowPart()):
1212
case 'logo': ?>
1313
<?php $edition = $block->getEdition() ? 'data-edition="' . $block->getEdition() . '"' : ''; ?>
14-
<a href="<?php echo $block->getHomeLink() ?>" <?php echo $edition; ?> class="logo" title="<?php echo __('Magento Admin Panel') ?>">
14+
<a
15+
href="<?php echo $block->getHomeLink() ?>"
16+
<?php echo $edition; ?>
17+
class="logo"
18+
title="<?php echo $this->escapeHtml(__('Magento Admin Panel')) ?>">
1519
<img class="logo-img" src="<?php echo $block->getViewFileUrl('images/magento-icon.svg') ?>" alt="<?php echo __('Magento Admin Panel') ?>"/>
1620
</a>
1721
<?php break; ?>
1822
<?php case 'user': ?>
1923
<div class="admin-user">
20-
<a href="<?php echo $block->getUrl('adminhtml/system_account/index') ?>" class="admin-user-account" title="<?php echo __('My Account') ?>" data-mage-init='{"dropdown":{}}' data-toggle="dropdown">
24+
<a
25+
href="<?php echo $block->getUrl('adminhtml/system_account/index') ?>"
26+
class="admin-user-account"
27+
title="<?php echo $this->escapeHtml(__('My Account')) ?>"
28+
data-mage-init='{"dropdown":{}}'
29+
data-toggle="dropdown">
2130
<span class="admin-user-account-text-wrapper">
2231
<span class="admin-user-account-text"><?php echo $block->escapeHtml($block->getUser()->getUsername()); ?></span>
2332
</span>
2433
</a>
2534
<ul class="admin-user-menu">
2635
<?php if ($block->getAuthorization()->isAllowed('Magento_Backend::myaccount')): ?>
2736
<li>
28-
<a href="<?php echo $block->getUrl('adminhtml/system_account/index') ?>" <?php echo $block->getUiId('user', 'account', 'settings')?> title="<?php echo __('Account Setting') ?>"><?php echo __('Account Setting') ?> (<span class="admin-user-name"><?php echo $block->escapeHtml($block->getUser()->getUsername()); ?></span>)</a>
37+
<a
38+
href="<?php echo $block->getUrl('adminhtml/system_account/index') ?>"
39+
<?php echo $block->getUiId('user', 'account', 'settings')?>
40+
title="<?php echo $this->escapeHtml(__('Account Setting')) ?>">
41+
<?php echo __('Account Setting') ?> (<span class="admin-user-name"><?php echo $block->escapeHtml($block->getUser()->getUsername()); ?></span>)
42+
</a>
2943
</li>
3044
<?php endif; ?>
31-
<li><a href="<?php echo $block->getBaseUrl(); ?>" title="<?php echo __('Customer View'); ?>" target="_blank" class="store-front"><?php echo __('Customer View'); ?></a></li>
3245
<li>
33-
<a href="<?php echo $block->getLogoutLink() ?>" class="account-signout" title="<?php echo __('Sign Out') ?>"><?php echo __('Sign Out') ?></a>
46+
<a
47+
href="<?php echo $block->getBaseUrl(); ?>"
48+
title="<?php echo $this->escapeHtml(__('Customer View')); ?>"
49+
target="_blank" class="store-front">
50+
<?php echo __('Customer View'); ?>
51+
</a>
52+
</li>
53+
<li>
54+
<a
55+
href="<?php echo $block->getLogoutLink() ?>"
56+
class="account-signout"
57+
title="<?php echo $this->escapeHtml(__('Sign Out')) ?>">
58+
<?php echo __('Sign Out') ?>
59+
</a>
3460
</li>
3561
</ul>
3662
</div>

app/code/Magento/Sales/Block/Adminhtml/Order/Create.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ protected function _construct()
9191
protected function _prepareLayout()
9292
{
9393
$pageTitle = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\Create\Header')->toHtml();
94-
if (is_object($this->getLayout()->getBlock('page-title-wrapper'))) {
95-
$this->getLayout()->getBlock('page-title-wrapper')->setPageTitle($pageTitle);
94+
if (is_object($this->getLayout()->getBlock('page.title'))) {
95+
$this->getLayout()->getBlock('page.title')->setPageTitle($pageTitle);
9696
}
9797
return parent::_prepareLayout();
9898
}

app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public function _construct()
2020
parent::_construct();
2121
$this->_blockGroup = 'Magento_Theme';
2222
$this->_controller = 'Adminhtml_System_Design_Theme';
23-
if (is_object($this->getLayout()->getBlock('page-title-wrapper'))) {
24-
$this->getLayout()->getBlock('page-title-wrapper')->setPageTitle('Themes');
23+
if (is_object($this->getLayout()->getBlock('page.title'))) {
24+
$this->getLayout()->getBlock('page.title')->setPageTitle('Themes');
2525
}
2626

2727
$this->buttonList->remove('add');

app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ protected function _prepareLayout()
4343
$this->_controller = 'Adminhtml_System_Design_Theme';
4444
$this->setId('theme_edit');
4545

46-
if (is_object($this->getLayout()->getBlock('page-title-wrapper'))) {
47-
$this->getLayout()->getBlock('page-title-wrapper')->setPageTitle($this->getHeaderText());
46+
if (is_object($this->getLayout()->getBlock('page.title'))) {
47+
$this->getLayout()->getBlock('page.title')->setPageTitle($this->getHeaderText());
4848
}
4949

5050
/** @var $theme \Magento\Framework\View\Design\ThemeInterface */

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/header/actions-group/_notifications.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@
115115
}
116116
}
117117
+ .notifications-entry-last {
118-
padding-bottom: .6rem;
119118
border-top: 1px solid @color-light-gray;
119+
padding-bottom: .6rem;
120120
}
121121
// Case with cutted message description
122122
._cutted {
@@ -135,6 +135,7 @@
135135
font-size: @notifications__font-size;
136136
font-weight: @font-weight__bold;
137137
margin-bottom: .7rem;
138+
margin-right: 1em;
138139
}
139140

140141
.notifications-entry-description {

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/header/actions-group/_user.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
max-width: @user-menu__min-width;
120120
overflow: hidden;
121121
text-overflow: ellipsis;
122-
white-space: nowrap;
123122
vertical-align: text-top;
123+
white-space: nowrap;
124124
}
125125
}

app/design/adminhtml/Magento/backend/web/css/override.less

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,8 +3080,8 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger {
30803080
max-width: 20rem;
30813081
overflow: hidden;
30823082
text-overflow: ellipsis;
3083-
white-space: nowrap;
30843083
vertical-align: text-top;
3084+
white-space: nowrap;
30853085
}
30863086
.search-global {
30873087
float: right;
@@ -3264,8 +3264,8 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger {
32643264
background-color: transparent;
32653265
}
32663266
.notifications-entry + .notifications-entry-last {
3267-
padding-bottom: .6rem;
32683267
border-top: 1px solid #dddddd;
3268+
padding-bottom: .6rem;
32693269
}
32703270
.notifications-entry ._cutted {
32713271
cursor: pointer;
@@ -3279,6 +3279,7 @@ fieldset[disabled] .admin__control-text + .ui-datepicker-trigger {
32793279
font-size: 1.1rem;
32803280
font-weight: 700;
32813281
margin-bottom: .7rem;
3282+
margin-right: 1em;
32823283
}
32833284
.notifications-entry-description {
32843285
color: #333333;

0 commit comments

Comments
 (0)