@@ -26,9 +26,6 @@ $reports = $block->getReports();
26
26
.store {
27
27
margin-bottom: 15px;
28
28
}
29
- .store-info {
30
- display: none;
31
- }
32
29
</style>
33
30
<select class="store">
34
31
<?php foreach ($ reports as $ report ): ?>
@@ -42,46 +39,71 @@ $reports = $block->getReports();
42
39
<?php $ catalog = $ report ['catalog_id ' ]; ?>
43
40
<?php $ storeId = $ report ['store_id ' ]; ?>
44
41
<table class="store-info store-<?= $ escaper ->escapeHtmlAttr ($ report ['store_id ' ]) ?> ">
45
- <tr>
46
- <th><?= $ escaper ->escapeHtml (__ ('Title ' )) ?> </th>
47
- <th><?= $ escaper ->escapeHtml (__ ('Severity ' )) ?> </th>
48
- <th><?= $ escaper ->escapeHtml (__ ('Type ' )) ?> </th>
49
- <th><?= $ escaper ->escapeHtml (__ ('Diagnostics Description ' )) ?> </th>
50
- </tr>
51
-
52
- <?php foreach ($ report ['data ' ] as $ item ): ?>
42
+ <thead>
53
43
<tr>
54
- <td><?= $ escaper ->escapeHtml ($ item ['title ' ]) ?> </td>
55
- <td><?= $ escaper ->escapeHtml ($ item ['severity ' ]) ?> </td>
56
- <td><?= $ escaper ->escapeHtml ($ item ['type ' ]) ?> </td>
57
- <td class="diagnostic-description">
58
- <?php $ diagnostics = $ item ['diagnostics ' ]; ?>
59
- <ul>
60
- <?php foreach ($ diagnostics as $ diagnostic ): ?>
61
- <li><div><?= $ escaper ->escapeHtml ($ diagnostic ['description ' ]) ?> </div>
62
- <?php $ products = $ block ->getSampleAffectedItems ($ diagnostic , $ catalog , $ storeId ); ?>
63
- <?php if ($ products ): ?>
64
- <div class="sample-affected-items">
65
- <p><?= $ escaper ->escapeHtml (__ ('Sample affected items: ' )) ?> </p>
66
- <ul>
67
- <?php foreach ($ products as $ product ): ?>
68
- <?php $ adminUrl = $ block ->getAdminUrl ($ product , $ store ); ?>
44
+ <th><?= $ escaper ->escapeHtml (__ ('Title ' )) ?> </th>
45
+ <th><?= $ escaper ->escapeHtml (__ ('Severity ' )) ?> </th>
46
+ <th><?= $ escaper ->escapeHtml (__ ('Type ' )) ?> </th>
47
+ <th><?= $ escaper ->escapeHtml (__ ('Diagnostics Description ' )) ?> </th>
48
+ </tr>
49
+ </thead>
50
+ <tbody>
51
+ <?php foreach ($ report ['data ' ] as $ item ): ?>
52
+ <tr>
53
+ <td><?= $ escaper ->escapeHtml ($ item ['title ' ]) ?> </td>
54
+ <td><?= $ escaper ->escapeHtml ($ item ['severity ' ]) ?> </td>
55
+ <td><?= $ escaper ->escapeHtml ($ item ['type ' ]) ?> </td>
56
+ <td class="diagnostic-description">
57
+ <?php $ diagnostics = $ item ['diagnostics ' ]; ?>
58
+ <ul>
59
+ <?php foreach ($ diagnostics as $ diagnostic ): ?>
60
+ <?php $ products = $ block ->getSampleAffectedItems ($ diagnostic , $ catalog , $ storeId ); ?>
61
+ <?php if ($ products ): ?>
69
62
<li>
70
- <?= $ escaper ->escapeHtml ($ product ->getName ()) ?>
71
- (<a href="<?= $ escaper ->escapeHtml ($ adminUrl ) ?> ">
72
- <?= $ escaper ->escapeHtml ($ product ->getSku ()) ?>
73
- </a>)
63
+ <div>
64
+ <strong>
65
+ <?= $ escaper ->escapeHtml (__ ('Description: ' )) ?>
66
+ </strong>
67
+ <?= $ escaper ->escapeHtml ($ diagnostic ['description ' ]) ?>
68
+ </div>
69
+ <div>
70
+ <strong>
71
+ <?= $ escaper ->escapeHtml (__ ('Type: ' )) ?>
72
+ </strong>
73
+ <?= $ escaper ->escapeHtml ($ diagnostic ['type ' ]) ?>
74
+ </div>
75
+ <?php if ($ diagnostic ['call_to_action ' ]): ?>
76
+ <div>
77
+ <strong>
78
+ <?= $ escaper ->escapeHtml (__ ('Call to Action: ' )) ?>
79
+ </strong>
80
+ <?= $ escaper ->escapeHtml ($ diagnostic ['call_to_action ' ]) ?>
81
+ </div>
82
+ <?php endif ; ?>
83
+ <div class="sample-affected-items">
84
+ <strong>
85
+ <?= $ escaper ->escapeHtml (__ ('Sample affected items: ' )) ?>
86
+ </strong>
87
+ <ul>
88
+ <?php foreach ($ products as $ product ): ?>
89
+ <?php $ adminUrl = $ block ->getAdminUrl ($ product , $ storeId ); ?>
90
+ <li>
91
+ <?= $ escaper ->escapeHtml ($ product ->getName ()) ?>
92
+ (<a href="<?= $ escaper ->escapeHtml ($ adminUrl ) ?> ">
93
+ <?= $ escaper ->escapeHtml ($ product ->getSku ()) ?>
94
+ </a>)
95
+ </li>
96
+ <?php endforeach ; ?>
97
+ </ul>
98
+ </div>
74
99
</li>
75
- <?php endforeach ; ?>
76
- </ul>
77
- </div>
78
- <?php endif ; ?>
79
- </li>
80
- <?php endforeach ; ?>
81
- </ul>
82
- </td>
83
- </tr>
84
- <?php endforeach ; ?>
100
+ <?php endif ; ?>
101
+ <?php endforeach ; ?>
102
+ </ul>
103
+ </td>
104
+ </tr>
105
+ <?php endforeach ; ?>
106
+ </tbody>
85
107
</table>
86
108
<?php endforeach ; ?>
87
109
<?php else : ?>
0 commit comments