blocked-users.phtml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. /**
  3. * @version 7.10 [rev.7.10.01]
  4. */
  5. /** @var bool $inAdmin */
  6. ?>
  7. <nav class="navbar navbar-filter">
  8. <div class="navbar-left">
  9. <a class="btn btn-default pull-left spacing-right"
  10. href="<?php echo $this->url(array('action' => 'add-blocked-user')); ?>">
  11. <?php echo $this->_('Add Blocked User'); ?>
  12. </a>
  13. </div>
  14. </nav>
  15. <div class="table-responsive">
  16. <table class="table table-striped table-hover">
  17. <caption>
  18. <strong><?php echo $this->paginator->getPages()->totalItemCount; ?></strong> <?php echo $this->_('blocked users found.'); ?>
  19. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  20. <?php echo $this->_('Showing results'); ?>
  21. <strong><?php echo $this->paginator->getPages()->firstItemNumber; ?></strong>
  22. <?php echo $this->_('to'); ?>
  23. <strong><?php echo $this->paginator->getPages()->lastItemNumber; ?></strong>
  24. <?php } ?>
  25. </caption>
  26. <?php if ($this->paginator->getPages()->totalItemCount) { ?>
  27. <thead>
  28. <tr>
  29. <th class="size-small"><?php echo $this->_('Details'); ?></th>
  30. <?php if ($inAdmin) { ?>
  31. <th class="size-mini"><?php echo $this->_('Blocked By'); ?></th>
  32. <?php } ?>
  33. <th class="size-small"><?php echo $this->_('Blocked Actions'); ?></th>
  34. <th><?php echo $this->_('Block Reason'); ?></th>
  35. <th class="size-mini"><?php echo $this->_('Block Date'); ?></th>
  36. <th class="size-mini"><?php echo $this->_('Options'); ?></th>
  37. </tr>
  38. </thead>
  39. <?php } ?>
  40. <tbody>
  41. <?php
  42. /** @var \Ppb\Db\Table\Row\BlockedUser $blockedUser */
  43. foreach ($this->paginator as $blockedUser) {
  44. ?>
  45. <tr>
  46. <td>
  47. <div>
  48. <span class="label label-info">
  49. <?php echo $this->blockStatus($blockedUser)->blockType(); ?>
  50. </span>
  51. </div>
  52. <div>
  53. <?php echo $blockedUser['value']; ?>
  54. </div>
  55. </td>
  56. <?php if ($inAdmin) {
  57. /** @var \Ppb\Db\Table\Row\User $user */
  58. $user = $blockedUser->findParentRow('\Ppb\Db\Table\Users');
  59. ?>
  60. <td>
  61. <?php echo (!empty($user['username'])) ?
  62. $user['username'] : '<span class="label label-primary">' . $this->_('Admin') . '</span>';
  63. ?>
  64. </td>
  65. <?php } ?>
  66. <td>
  67. <?php echo $this->blockStatus()->blockedActions(); ?>
  68. </td>
  69. <td>
  70. <div>
  71. <?php echo ($blockedUser['show_reason']) ?
  72. '<span class="label label-success">' . $this->_('Displayed') . '</span>' :
  73. '<span class="label label-warning">' . $this->_('Hidden') . '</span>'; ?>
  74. </div>
  75. <div>
  76. <small><?php echo $this->fieldDisplay($blockedUser['block_reason']); ?></small>
  77. </div>
  78. </td>
  79. <td>
  80. <?php echo $this->date($blockedUser['created_at'], true); ?>
  81. </td>
  82. <td>
  83. <div class="btn-group">
  84. <a class="btn btn-default btn-sm"
  85. href="<?php echo $this->url(array('action' => 'edit-blocked-user', 'id' => $blockedUser['id']), null, true); ?>"
  86. title="<?php echo $this->_('Edit Blocked User'); ?>">
  87. <i class="fa fa-folder-open"></i>
  88. </a>
  89. <a class="btn btn-danger btn-sm confirm-box"
  90. href="<?php echo $this->url(array('action' => 'delete-blocked-user', 'id' => $blockedUser['id']),
  91. null, true); ?>"
  92. title="<?php echo $this->_('Delete Blocked User'); ?>"
  93. data-message="<?php echo $this->_('Are you sure you want to delete this blocked user?'); ?>">
  94. <i class="fa fa-times"></i>
  95. </a>
  96. </div>
  97. </td>
  98. </tr>
  99. <?php } ?>
  100. </tbody>
  101. </table>
  102. </div>
  103. <?php echo $this->pagination($this->paginator, 'sliding', 'partials/pagination.phtml'); ?>