Skip to content

Commit e6b2116

Browse files
author
Oleg Zinoviev
committed
MAGETWO-36622: [UI] Merge grid styles
- QA updates
1 parent 6a8321a commit e6b2116

File tree

10 files changed

+105
-96
lines changed

10 files changed

+105
-96
lines changed

app/code/Magento/Sales/view/adminhtml/templates/order/create/items/grid.phtml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,32 @@
1515

1616
<?php $_items = $block->getItems() ?>
1717
<?php if (empty($_items)): ?>
18-
<div class="grid" id="order-items_grid">
19-
<table class="data-table admin__table-primary order-tables">
20-
<thead>
21-
<tr class="headings">
22-
<th class="col-product"><span><?php echo __('Product') ?></span></th>
23-
<th class="col-price"><span><?php echo __('Price') ?></span></th>
24-
<th class="col-qty"><span><?php echo __('Qty') ?></span></th>
25-
<th class="col-subtotal"><span><?php echo __('Subtotal') ?></span></th>
26-
<th class="col-discount"><span><?php echo __('Discount') ?></span></th>
27-
<th class="col-row-total"><span><?php echo __('Row Subtotal') ?></span></th>
28-
<th class="col-action"><span><?php echo __('Action') ?></span></th>
29-
</tr>
30-
</thead>
31-
<tbody>
32-
<tr class="even">
33-
<td class="empty-text" colspan="100"><?php echo __('No ordered items') ?></td>
34-
</tr>
35-
</tbody>
36-
</table>
18+
<div id="order-items_grid">
19+
<div class="admin__table-wrapper">
20+
<table class="data-table admin__table-primary order-tables">
21+
<thead>
22+
<tr class="headings">
23+
<th class="col-product"><span><?php echo __('Product') ?></span></th>
24+
<th class="col-price"><span><?php echo __('Price') ?></span></th>
25+
<th class="col-qty"><span><?php echo __('Qty') ?></span></th>
26+
<th class="col-subtotal"><span><?php echo __('Subtotal') ?></span></th>
27+
<th class="col-discount"><span><?php echo __('Discount') ?></span></th>
28+
<th class="col-row-total"><span><?php echo __('Row Subtotal') ?></span></th>
29+
<th class="col-action"><span><?php echo __('Action') ?></span></th>
30+
</tr>
31+
</thead>
32+
<tbody>
33+
<tr class="even">
34+
<td class="empty-text" colspan="100"><?php echo __('No ordered items') ?></td>
35+
</tr>
36+
</tbody>
37+
</table>
38+
</div>
3739
</div>
3840
<?php else: ?>
3941

40-
<div class="grid" id="order-items_grid">
41-
<div class="hor-scroll">
42+
<div id="order-items_grid">
43+
<div class="admin__table-wrapper">
4244
<?php if (count($_items)>10): ?>
4345
<div class="actions update actions-update">
4446
<?php echo $block->getButtonHtml(__('Update Items and Qty\'s'), 'order.itemsUpdate()', 'action-secondary'); ?>

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616

1717
<?php if (count($_items)) : ?>
18-
<div class="grid">
18+
<div class="admin__table-wrapper">
1919
<table class="data-table admin__table-primary order-creditmemo-tables">
2020
<thead>
2121
<tr class="headings">
@@ -45,10 +45,10 @@
4545
<?php endif; ?>
4646
<?php $i = 0; foreach ($_items as $_item): ?>
4747
<?php if ($_item->getOrderItem()->getParentItem()) {
48-
continue;
49-
} else {
50-
$i++;
51-
} ?>
48+
continue;
49+
} else {
50+
$i++;
51+
} ?>
5252
<tbody class="<?php echo $i%2 ? 'even' : 'odd' ?>">
5353
<?php echo $block->getItemHtml($_item) ?>
5454
<?php echo $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>

app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/view/items.phtml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,31 @@
1313
<span class="title"><?php echo __('Items Refunded') ?></span>
1414
</div>
1515
<div class="admin__page-section-content">
16-
<table class="data-table admin__table-primary order-creditmemo-tables">
17-
<thead>
18-
<tr class="headings">
19-
<th class="col-product"><span><?php echo __('Product') ?></span></th>
20-
<th class="col-price"><span><?php echo __('Price') ?></span></th>
21-
<th class="col-qty"><span><?php echo __('Qty') ?></span></th>
22-
<th class="col-subtotal"><span><?php echo __('Subtotal') ?></span></th>
23-
<th class="col-tax"><span><?php echo __('Tax Amount') ?></span></th>
24-
<th class="col-discount"><span><?php echo __('Discount Amount') ?></span></th>
25-
<th class="col-total last"><span><?php echo __('Row Total') ?></span></th>
26-
</tr>
27-
</thead>
28-
<?php $i = 0; foreach ($_items as $_item): ?>
29-
<?php if ($_item->getOrderItem()->getParentItem()) {
30-
continue;
31-
} else {
32-
$i++;
33-
} ?>
34-
<tbody class="<?php echo $i%2 ? 'even' : 'odd' ?>">
35-
<?php echo $block->getItemHtml($_item) ?>
36-
<?php echo $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
37-
</tbody>
38-
<?php endforeach; ?>
39-
</table>
16+
<div class="admin__table-wrapper">
17+
<table class="data-table admin__table-primary order-creditmemo-tables">
18+
<thead>
19+
<tr class="headings">
20+
<th class="col-product"><span><?php echo __('Product') ?></span></th>
21+
<th class="col-price"><span><?php echo __('Price') ?></span></th>
22+
<th class="col-qty"><span><?php echo __('Qty') ?></span></th>
23+
<th class="col-subtotal"><span><?php echo __('Subtotal') ?></span></th>
24+
<th class="col-tax"><span><?php echo __('Tax Amount') ?></span></th>
25+
<th class="col-discount"><span><?php echo __('Discount Amount') ?></span></th>
26+
<th class="col-total last"><span><?php echo __('Row Total') ?></span></th>
27+
</tr>
28+
</thead>
29+
<?php $i = 0; foreach ($_items as $_item): ?>
30+
<?php if ($_item->getOrderItem()->getParentItem()) {
31+
continue;
32+
} else {
33+
$i++;
34+
} ?>
35+
<tbody class="<?php echo $i%2 ? 'even' : 'odd' ?>">
36+
<?php echo $block->getItemHtml($_item) ?>
37+
<?php echo $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
38+
</tbody>
39+
<?php endforeach; ?>
40+
</table>
41+
</div>
4042
</div>
4143
</div>

app/code/Magento/Sales/view/adminhtml/templates/order/invoice/create/items.phtml

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,43 @@
1414
<span class="title"><?php echo __('%1', $_itemsGridLabel) ?></span>
1515
</div>
1616
<div class="admin__page-section-content grid">
17-
<table class="data-table admin__table-primary order-invoice-tables">
18-
<thead>
19-
<tr class="headings">
20-
<th class="col-product"><span><?php echo __('Product') ?></span></th>
21-
<th class="col-price"><span><?php echo __('Price') ?></span></th>
22-
<th class="col-ordered-qty"><span><?php echo __('Qty') ?></span></th>
23-
<th class="col-qty-invoice"><span><?php echo __('Qty to Invoice') ?></span></th>
24-
<th class="col-subtotal"><span><?php echo __('Subtotal') ?></span></th>
25-
<th class="col-tax"><span><?php echo __('Tax Amount') ?></span></th>
26-
<th class="col-discount"><span><?php echo __('Discount Amount') ?></span></th>
27-
<th class="col-total last"><span><?php echo __('Row Total') ?></span></th>
28-
</tr>
29-
</thead>
30-
<?php if ($block->canEditQty()): ?>
31-
<tfoot>
32-
<tr>
33-
<td colspan="2">&nbsp;</td>
34-
<td colspan="3"><?php echo $block->getUpdateButtonHtml() ?></td>
35-
<td colspan="3">&nbsp;</td>
36-
</tr>
37-
</tfoot>
38-
<?php endif; ?>
39-
<?php $_items = $block->getInvoice()->getAllItems() ?>
40-
<?php $_i = 0; foreach ($_items as $_item): ?>
41-
<?php if ($_item->getOrderItem()->getParentItem()) {
42-
continue;
43-
} else {
44-
$_i++;
45-
} ?>
46-
<tbody class="<?php echo $_i%2 ? 'even' : 'odd' ?>">
47-
<?php echo $block->getItemHtml($_item) ?>
48-
<?php echo $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
49-
</tbody>
50-
<?php endforeach; ?>
51-
</table>
17+
<div class="admin__table-wrapper">
18+
<table class="data-table admin__table-primary order-invoice-tables">
19+
<thead>
20+
<tr class="headings">
21+
<th class="col-product"><span><?php echo __('Product') ?></span></th>
22+
<th class="col-price"><span><?php echo __('Price') ?></span></th>
23+
<th class="col-ordered-qty"><span><?php echo __('Qty') ?></span></th>
24+
<th class="col-qty-invoice"><span><?php echo __('Qty to Invoice') ?></span></th>
25+
<th class="col-subtotal"><span><?php echo __('Subtotal') ?></span></th>
26+
<th class="col-tax"><span><?php echo __('Tax Amount') ?></span></th>
27+
<th class="col-discount"><span><?php echo __('Discount Amount') ?></span></th>
28+
<th class="col-total last"><span><?php echo __('Row Total') ?></span></th>
29+
</tr>
30+
</thead>
31+
<?php if ($block->canEditQty()): ?>
32+
<tfoot>
33+
<tr>
34+
<td colspan="2">&nbsp;</td>
35+
<td colspan="3"><?php echo $block->getUpdateButtonHtml() ?></td>
36+
<td colspan="3">&nbsp;</td>
37+
</tr>
38+
</tfoot>
39+
<?php endif; ?>
40+
<?php $_items = $block->getInvoice()->getAllItems() ?>
41+
<?php $_i = 0; foreach ($_items as $_item): ?>
42+
<?php if ($_item->getOrderItem()->getParentItem()) {
43+
continue;
44+
} else {
45+
$_i++;
46+
} ?>
47+
<tbody class="<?php echo $_i%2 ? 'even' : 'odd' ?>">
48+
<?php echo $block->getItemHtml($_item) ?>
49+
<?php echo $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>
50+
</tbody>
51+
<?php endforeach; ?>
52+
</table>
53+
</div>
5254
</div>
5355
</section>
5456

app/code/Magento/Sales/view/adminhtml/templates/order/invoice/view/items.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// @codingStandardsIgnoreFile
88

99
?>
10-
<div class="grid">
10+
<div class="admin__table-wrapper">
1111
<table class="data-table admin__table-primary order-invoice-tables">
1212
<thead>
1313
<tr class="headings">
@@ -23,10 +23,10 @@
2323
<?php $_items = $block->getInvoice()->getAllItems() ?>
2424
<?php $i = 0; foreach ($_items as $_item): ?>
2525
<?php if ($_item->getOrderItem()->getParentItem()) {
26-
continue;
27-
} else {
28-
$i++;
29-
} ?>
26+
continue;
27+
} else {
28+
$i++;
29+
} ?>
3030
<tbody class="<?php echo $i%2 ? 'even' : 'odd' ?>">
3131
<?php echo $block->getItemHtml($_item) ?>
3232
<?php echo $block->getItemExtraInfoHtml($_item->getOrderItem()) ?>

app/code/Magento/Sales/view/adminhtml/templates/order/view/items.phtml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
?>
1010
<?php $_order = $block->getOrder() ?>
11-
<div class="grid">
12-
<div class="hor-scroll">
11+
<div class="admin__table-wrapper">
1312
<table class="data-table admin__table-primary edit-order-table">
1413
<thead>
1514
<tr class="headings">
@@ -38,5 +37,4 @@
3837
</tbody>
3938
<?php endforeach; ?>
4039
</table>
41-
</div>
4240
</div>

app/code/Magento/Shipping/view/adminhtml/templates/create/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="admin__page-section-title">
1313
<span class="title"><?php echo __('Items to Ship') ?></span>
1414
</div>
15-
<div class="grid">
15+
<div class="admin__table-wrapper">
1616
<table class="data-table admin__table-primary order-shipment-table">
1717
<thead>
1818
<tr class="headings">

app/code/Magento/Shipping/view/adminhtml/templates/view/items.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// @codingStandardsIgnoreFile
88

99
?>
10-
<div class="grid">
10+
<div class="admin__table-wrapper">
1111
<table class="data-table admin__table-primary order-shipment-table">
1212
<thead>
1313
<tr class="headings">

app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/_order.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
// ---------------------------------------------
162162

163163
.tree-store-scope {
164-
max-width: 50rem;
165164
.admin__field {
166165
margin: 0 0 1rem;
167166
}

app/design/adminhtml/Magento/backend/web/css/source/_tables.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ table {
3838
}
3939
}
4040

41+
.admin__table-wrapper {
42+
max-width: 100%;
43+
overflow-x: auto;
44+
overflow-y: hidden;
45+
}
46+
4147
.admin__table-primary,
4248
.admin__table-secondary {
4349
width: 100%;

0 commit comments

Comments
 (0)