browse.html.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. include '../../common/view/header.html.php';
  3. include '../../common/view/datepicker.html.php'
  4. ?>
  5. <div class='row'>
  6. <div class='col-md-12'>
  7. <div class='clearfix'>
  8. <div class='panel'>
  9. <div class='panel-heading' style='padding: 15px;'>
  10. <strong><i class='icon-comments'></i> <?php echo $logTitle; ?></strong>
  11. <div class="pull-right panel-actions form-container">
  12. <form method='post' class='form-search pull-right'>
  13. <?php echo html::select('objectType', $lang->log->typeArray, $objectType, "class='form-control' required") ?>
  14. <?php echo html::input('search', $search, "class='form-control search-query' placeholder='{$lang->user->inputAccount}'"); ?>
  15. <input id="date" name="date" type="text" class="form-control form-date" placeholder="<?php echo $lang->log->datePlaceholder; ?>" readonly="readonly" value="<?php echo $date; ?>">
  16. <span class="btn-group">
  17. <?php echo html::submitButton($lang->user->searchUser, "btn btn-primary"); ?>
  18. <?php echo html::a(inlink('browse'), $lang->log->reset, "class='btn'"); ?>
  19. </span>
  20. </form>
  21. </div>
  22. </div>
  23. <table class='table table-hover table-striped table-bordered tablesorter table-fixed'>
  24. <thead>
  25. <tr>
  26. <?php $vars = "orderBy=%s&objectType={$objectType}&search={$search}&date={$date}&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
  27. <th>ID</th>
  28. <th><?php echo $lang->log->objectType; ?></th>
  29. <th><?php echo $lang->log->objectId; ?></th>
  30. <th><?php echo $lang->log->actor; ?></th>
  31. <th><?php echo $lang->log->action; ?></th>
  32. <th><?php echo $lang->log->result; ?></th>
  33. <th><?php echo $lang->log->ip; ?></th>
  34. <th><?php commonModel::printOrderLink('date', $orderBy, $vars, $lang->log->date); ?></th>
  35. <th><?php echo $lang->log->comment; ?></th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. <?php $index = 0; ?>
  40. <?php foreach($records as $record) : ?>
  41. <tr>
  42. <td><?php echo ++$index + ($pager->pageID - 1) * intval($pager->recPerPage); ?></td>
  43. <td><?php echo $lang->log->typeArray[$record->objectType]; ?></td>
  44. <td><?php echo $record->objectID; ?></td>
  45. <td><?php echo $userPairs[$record->actor]; ?></td>
  46. <td><?php echo isset($lang->log->actionName[$record->action]) ? $lang->log->actionName[$record->action] : $record->action; ?></td>
  47. <td><?php echo $lang->log->resultName[$record->result]; ?></td>
  48. <td><?php echo $record->ip; ?></td>
  49. <td><?php echo $record->date; ?></td>
  50. <td>
  51. <?php
  52. echo empty($record->comment)
  53. ? '--'
  54. : "<a class='show-comment' data-toggle='modal' data-target='#comment-modal' data-comment={$record->comment}>{$lang->log->view}</a>"
  55. ?>
  56. </td>
  57. </tr>
  58. <?php endforeach; ?>
  59. </tbody>
  60. </table>
  61. <div class='table-footer'><?php $pager->show(); ?></div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="modal fade" id="comment-modal">
  67. <div class="modal-dialog">
  68. <div class="modal-content">
  69. <div class="modal-header">
  70. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
  71. <h4 class="modal-title"><?php echo $lang->log->comment; ?></h4>
  72. </div>
  73. <div class="modal-body" style="word-break: break-word;">
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <?php include '../../common/view/footer.html.php'; ?>