view.phtml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. ?>
  6. <?php /** @var \Temando\Shipping\Block\Adminhtml\Dispatch\View $block */ ?>
  7. <?php /** @var \Temando\Shipping\Model\Dispatch $dispatch */ ?>
  8. <?php $dispatch = $block->getDispatch(); ?>
  9. <?php if ($dispatch) : ?>
  10. <?php $messages = $dispatch->getCarrierMessages(); ?>
  11. <?php if (!empty($messages)) : ?>
  12. <?php foreach ($messages as $message) : ?>
  13. <p class="message message-notice"><?= $block->escapeHtml($message) ?></p>
  14. <?php endforeach; ?>
  15. <?php endif; ?>
  16. <section class="admin__page-section">
  17. <div class="admin__page-section-title">
  18. <span class="title"><?= $block->escapeHtml(__('Dispatch Information')); ?></span>
  19. </div>
  20. <div class="admin__table-wrapper dispatch-information">
  21. <table class="admin__table-secondary">
  22. <tbody>
  23. <tr>
  24. <th><?= $block->escapeHtml(__('Carrier Name')); ?></th>
  25. <td><?= $block->escapeHtml($dispatch->getCarrierName()); ?></td>
  26. </tr>
  27. <tr>
  28. <th><?= $block->escapeHtml(__('Date Created')); ?></th>
  29. <?php // @codingStandardsIgnoreLine ?>
  30. <td><?= $block->escapeHtml($block->getDate($dispatch->getCreatedAtDate())->format('Y-m-d g:i a')); ?></td>
  31. </tr>
  32. <tr>
  33. <th><?= $block->escapeHtml(__('Ready At')); ?></th>
  34. <?php // @codingStandardsIgnoreLine ?>
  35. <td><?= $block->escapeHtml($block->getDate($dispatch->getReadyAtDate())->format('Y-m-d g:i a')); ?></td>
  36. </tr>
  37. <tr>
  38. <th><?= $block->escapeHtml(__('Number of included shipments')); ?></th>
  39. <td><?= /* @noEscape */ count($dispatch->getIncludedShipments()); ?></td>
  40. </tr>
  41. <?php $failedShipmentCount = count($dispatch->getFailedShipments()); ?>
  42. <?php if ($failedShipmentCount) : ?>
  43. <tr>
  44. <th><?= $block->escapeHtml(__('Number of failed shipments')); ?></th>
  45. <td><?= /* @noEscape */ $failedShipmentCount ?>
  46. <a href="<?= $block->escapeUrl($block->getSolveUrl()); ?>">
  47. <?= $block->escapeHtml(__('Find Solutions')); ?>
  48. </a>
  49. </td>
  50. </tr>
  51. <?php endif; ?>
  52. <?php $pickupNumbers = $dispatch->getPickupNumbers(); ?>
  53. <?php if (!empty($pickupNumbers)) : ?>
  54. <tr>
  55. <th><?= $block->escapeHtml(__('Pickup Request No.')); ?></th>
  56. <td><?= $block->escapeHtml(implode(', ', $pickupNumbers)); ?></td>
  57. </tr>
  58. <?php endif; ?>
  59. </tbody>
  60. </table>
  61. </div>
  62. </section>
  63. <?= /* @noEscape */ $block->getChildHtml('charges_listing') ?>
  64. <?= /* @noEscape */ $block->getChildHtml('documentation_listing') ?>
  65. <?php endif; ?>