You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 lines
2.6 KiB

  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Account activity template
  8. *
  9. * @var $block \Magento\Security\Block\Adminhtml\Session\Activity
  10. */
  11. $sessionInfoCollection = $block->getSessionInfoCollection();
  12. ?>
  13. <header>
  14. <div class="page-title-wrapper">
  15. <h1 class="page-title" align="center"><?= $block->escapeHtml(__('Account Activity')) ?></h1>
  16. <?php
  17. if ($block->areMultipleSessionsActive()) {
  18. echo $block->escapeHtml(__(
  19. 'This administrator account is open in more than one location. '
  20. .'Note that other locations might be different browsers or sessions on the same computer.'
  21. ));
  22. } ?>
  23. </div>
  24. </header>
  25. <div class="page-content">
  26. <?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
  27. <div>
  28. <div class="information-title"><?= $block->escapeHtml(__('Concurrent session information:')) ?></div>
  29. <table cellspacing="0" border="1" class="information-table">
  30. <thead>
  31. <tr>
  32. <th><?= $block->escapeHtml(__('IP Address')) ?></th>
  33. <th><?= $block->escapeHtml(__('Time of session start')) ?></th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <?php
  38. foreach ($sessionInfoCollection as $item) : ?>
  39. <tr>
  40. <td><?= $block->escapeHtml($item->getFormattedIp()) ?></td>
  41. <td><?= $block->escapeHtml($block->formatDateTime($item->getCreatedAt())) ?></td>
  42. </tr>
  43. <?php endforeach; ?>
  44. </tbody>
  45. </table>
  46. <div class="button-container">
  47. <button type="button"
  48. <?php if ($block->areMultipleSessionsActive()) : ?>
  49. data-mage-init='{"confirmRedirect":{
  50. "message": "<?=
  51. $block->escapeJs(__('Are you sure that you want to log out all other sessions?'))
  52. ?>",
  53. "url":"<?=
  54. $block->escapeJs($block->escapeUrl($block->getUrl('security/session/logoutAll')))
  55. ?>"
  56. }}'
  57. <?php else : ?>disabled<?php
  58. endif ?>
  59. title="<?= $block->escapeHtmlAttr(__('Log out all other sessions')) ?>">
  60. <?= $block->escapeHtml(__('Log out all other sessions')) ?>
  61. </button>
  62. </div>
  63. <div><?= $block->escapeHtml(__('This computer is using IP address %1.', $block->getRemoteIp())) ?></div>
  64. </div>
  65. </div>