Skip to content

Commit 9f3e59e

Browse files
author
Bogdan Plieshka
committed
MAGETWO-32250: Header
- Page main action bar - Added actions, split actions styles - Refactored header and admin lib code
1 parent 437d21d commit 9f3e59e

File tree

38 files changed

+2262
-1315
lines changed

38 files changed

+2262
-1315
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ define([
4646
}
4747
},
4848

49+
// Show popup with notification details
4950
showNotificationDetails = function (notificationEntry) {
5051
var notificationDescription = notificationEntry.find('.notifications-entry-description'),
5152
notificationDescriptionEnd = notificationEntry.find('.notifications-entry-description-end');

app/code/Magento/Backend/view/adminhtml/layout/adminhtml_dashboard_index.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
<argument name="params" xsi:type="string">0</argument>
1515
</action>
1616
</block>
17+
<block class="Magento\Backend\Block\Template" name="refresh_statistics" after="store_switcher" template="Magento_Backend::dashboard/totalbar/refreshstatistics.phtml"/>
1718
</referenceContainer>
1819
<referenceContainer name="content">
19-
<block class="Magento\Backend\Block\Dashboard" name="dashboard">
20-
<block class="Magento\Backend\Block\Template" name="refresh_statistics" template="Magento_Backend::dashboard/totalbar/refreshstatistics.phtml"/>
21-
</block>
20+
<block class="Magento\Backend\Block\Dashboard" name="dashboard"/>
2221
</referenceContainer>
2322
</body>
2423
</page>

app/code/Magento/Backend/view/adminhtml/templates/dashboard/totalbar/refreshstatistics.phtml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@
44
* See COPYING.txt for license details.
55
*/
66
?>
7-
<form action="<?php echo $block->getUrl('*/*/refreshStatistics'); ?>" method="post">
8-
<input name="form_key" type="hidden" value="<?php echo $block->getFormKey(); ?>" />
9-
<button type="submit" style="float:right; margin: 15px" title="Refresh Data">
10-
<?php echo __('Refresh Data') ?>
11-
</button>
12-
</form>
7+
<div class="page-actions">
8+
<div class="page-actions-inner">
9+
<div class="page-actions-buttons">
10+
<form
11+
action="<?php echo $block->getUrl('*/*/refreshStatistics'); ?>"
12+
method="post">
13+
<input
14+
name="form_key"
15+
type="hidden"
16+
value="<?php echo $block->getFormKey(); ?>"/>
17+
<button
18+
class="action-primary"
19+
type="submit"
20+
title="Refresh Data">
21+
<?php echo __('Reload Data') ?>
22+
</button>
23+
</form>
24+
</div>
25+
</div>
26+
</div>

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 55 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<?php if ($websites = $block->getWebsites()): ?>
1212

1313
<div class="store-switcher store-view">
14-
<span class="label"><?php echo __('Scope:') ?></span>
14+
<span class="store-switcher-label"><?php echo __('Store View:') ?></span>
1515
<div class="actions dropdown closable">
1616
<input type="hidden" name="store_switcher" id="store_switcher"
1717
data-role="store-view-id" data-param="<?php echo $block->getStoreVarName() ?>"
@@ -25,27 +25,32 @@
2525
data-role="website-id" data-param="<?php echo $block->getWebsiteVarName() ?>"
2626
value="<?php echo $block->escapeHtml($block->getWebsiteId()) ?>"
2727
onchange="switchScope(this);"<?php echo $block->getUiId()?> />
28-
<button type="button" class="action toggle" data-mage-init='{"dropdown":{}}' data-toggle="dropdown" aria-haspopup="true">
29-
<span><?php echo $block->getCurrentSelectionName() ?></span>
28+
<button
29+
type="button"
30+
class="admin__action-dropdown"
31+
data-mage-init='{"dropdown":{}}'
32+
data-toggle="dropdown"
33+
aria-haspopup="true">
34+
<?php echo $block->getCurrentSelectionName() ?>
3035
</button>
3136
<ul class="dropdown-menu" data-role="stores-list">
3237
<?php if ($block->hasDefaultOption()): ?>
33-
<li class="store-switcher-all <?php if (!($block->getDefaultSelectionName() != $block->getCurrentSelectionName())) {
34-
echo "disabled";
35-
} ?> <?php if (!$block->hasScopeSelected()) {
36-
?> current<?php
37-
}?>">
38+
<li class="store-switcher-all <?php if ( ! ($block->getDefaultSelectionName() != $block->getCurrentSelectionName())) {
39+
echo "disabled";
40+
} ?> <?php if ( ! $block->hasScopeSelected()) {
41+
?> current<?php
42+
} ?>">
3843
<?php if ($block->getDefaultSelectionName() != $block->getCurrentSelectionName()) {
39-
?>
44+
?>
4045
<a data-role="store-view-id" data-value="" href="#">
4146
<?php echo $block->getDefaultSelectionName() ?>
4247
</a>
43-
<?php
44-
} else {
45-
?>
48+
<?php
49+
} else {
50+
?>
4651
<span><?php echo $block->getDefaultSelectionName() ?></span>
47-
<?php
48-
}?>
52+
<?php
53+
} ?>
4954
</li>
5055
<?php endif; ?>
5156
<?php foreach ($websites as $website): ?>
@@ -55,60 +60,60 @@
5560
<?php foreach ($block->getStores($group) as $store): ?>
5661
<?php if ($showWebsite == false): ?>
5762
<?php $showWebsite = true; ?>
58-
<li class="store-switcher-website <?php if (!($block->isWebsiteSwitchEnabled() && !$block->isWebsiteSelected($website))) {
59-
echo "disabled";
60-
} ?> <?php if ($block->isWebsiteSelected($website)) {
61-
?> current<?php
62-
}?>">
63-
<?php if ($block->isWebsiteSwitchEnabled() && !$block->isWebsiteSelected($website)) {
64-
?>
63+
<li class="store-switcher-website <?php if ( ! ($block->isWebsiteSwitchEnabled() && ! $block->isWebsiteSelected($website))) {
64+
echo "disabled";
65+
} ?> <?php if ($block->isWebsiteSelected($website)) {
66+
?> current<?php
67+
} ?>">
68+
<?php if ($block->isWebsiteSwitchEnabled() && ! $block->isWebsiteSelected($website)) {
69+
?>
6570
<a data-role="website-id" data-value="<?php echo $block->escapeHtml($website->getId()) ?>" href="#">
6671
<?php echo $block->escapeHtml($website->getName()) ?>
6772
</a>
68-
<?php
69-
} else {
70-
?>
73+
<?php
74+
} else {
75+
?>
7176
<span><?php echo $block->escapeHtml($website->getName()) ?></span>
72-
<?php
73-
}?>
77+
<?php
78+
} ?>
7479
</li>
7580
<?php endif; ?>
7681
<?php if ($showGroup == false): ?>
7782
<?php $showGroup = true; ?>
78-
<li class="store-switcher-store <?php if (!($block->isStoreGroupSwitchEnabled() && !$block->isStoreGroupSelected($group))) {
79-
echo "disabled";
80-
} ?> <?php if ($block->isStoreGroupSelected($group)) {
81-
?> current<?php
82-
}?>">
83-
<?php if ($block->isStoreGroupSwitchEnabled() && !$block->isStoreGroupSelected($group)) {
84-
?>
83+
<li class="store-switcher-store <?php if ( ! ($block->isStoreGroupSwitchEnabled() && ! $block->isStoreGroupSelected($group))) {
84+
echo "disabled";
85+
} ?> <?php if ($block->isStoreGroupSelected($group)) {
86+
?> current<?php
87+
} ?>">
88+
<?php if ($block->isStoreGroupSwitchEnabled() && ! $block->isStoreGroupSelected($group)) {
89+
?>
8590
<a data-role="store-group-id" data-value="<?php echo $block->escapeHtml($group->getId()) ?>" href="#">
8691
<?php echo $block->escapeHtml($group->getName()) ?>
8792
</a>
88-
<?php
89-
} else {
90-
?>
93+
<?php
94+
} else {
95+
?>
9196
<span><?php echo $block->escapeHtml($group->getName()) ?></span>
92-
<?php
93-
}?>
97+
<?php
98+
} ?>
9499
</li>
95100
<?php endif; ?>
96-
<li class="store-switcher-store-view <?php if (!($block->isStoreSwitchEnabled() && !$block->isStoreSelected($store))) {
97-
echo "disabled";
98-
} ?> <?php if ($block->isStoreSelected($store)) {
99-
?> current<?php
100-
}?>">
101-
<?php if ($block->isStoreSwitchEnabled() && !$block->isStoreSelected($store)) {
102-
?>
101+
<li class="store-switcher-store-view <?php if ( ! ($block->isStoreSwitchEnabled() && ! $block->isStoreSelected($store))) {
102+
echo "disabled";
103+
} ?> <?php if ($block->isStoreSelected($store)) {
104+
?> current<?php
105+
} ?>">
106+
<?php if ($block->isStoreSwitchEnabled() && ! $block->isStoreSelected($store)) {
107+
?>
103108
<a data-role="store-view-id" data-value="<?php echo $block->escapeHtml($store->getId()) ?>" href="#">
104109
<?php echo $block->escapeHtml($store->getName()) ?>
105110
</a>
106-
<?php
107-
} else {
108-
?>
111+
<?php
112+
} else {
113+
?>
109114
<span><?php echo $block->escapeHtml($store->getName()) ?></span>
110-
<?php
111-
}?>
115+
<?php
116+
} ?>
112117
</li>
113118
<?php endforeach; ?>
114119
<?php endforeach; ?>

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
data-mage-init='<?php echo $block->escapeHtml($this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getWidgetInitOptions()))?>'>
2121
<button
2222
type="submit"
23-
class="search-global-action"><?php echo __('Search') ?></button>
23+
class="search-global-action"
24+
title="<?php echo __('Search') ?>"
25+
></button>
2426
</div>
2527
</form>
2628
<script data-template="search-suggest" type="text/x-magento-template">

app/code/Magento/Theme/view/adminhtml/page_layout/admin-1column.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727
<container name="page.content" as="page_content" htmlTag="main" htmlId="anchor-content" htmlClass="page-content">
2828
<container name="main.top" as="main-top" label="main-top"/>
29-
<container name="page.main.actions" as="page_main_actions" htmlTag="div" htmlClass="page-main-actions"/>
29+
<container name="page.main.actions.wrapper" htmlTag="div" htmlClass="admin__scope">
30+
<container name="page.main.actions" as="page_main_actions" htmlTag="div" htmlClass="page-main-actions"/>
31+
</container>
3032
<container name="message-wrapper.scope" htmlTag="div" htmlClass="admin__scope">
3133
<container name="messages.wrapper" as="messages.wrapper" htmlTag="div" htmlId="messages">
3234
<container name="page.messages" as="page.messages"/>

app/code/Magento/Theme/view/adminhtml/page_layout/admin-2columns-left.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727
<container name="page.content" as="page_content" htmlTag="main" htmlId="anchor-content" htmlClass="page-content">
2828
<container name="main.top" as="main-top" label="main-top"/>
29-
<container name="page.main.actions" as="page_main_actions" htmlTag="div" htmlClass="page-main-actions"/>
29+
<container name="page.main.actions.wrapper" htmlTag="div" htmlClass="admin__scope">
30+
<container name="page.main.actions" as="page_main_actions" htmlTag="div" htmlClass="page-main-actions"/>
31+
</container>
3032
<container name="message-wrapper.scope" htmlTag="div" htmlClass="admin__scope">
3133
<container name="messages.wrapper" as="messages.wrapper" htmlTag="div" htmlId="messages">
3234
<container name="page.messages" as="page.messages"/>

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/_module.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
@import 'module/_menu';
1111
@import 'module/_header';
1212
@import 'module/_footer';
13+
@import 'module/_main';
1314

1415
//
1516
// Pages
1617
// _____________________________________________
1718

18-
@import 'module/_dashboard';
19+
@import 'module/pages/_dashboard';

0 commit comments

Comments
 (0)