tmc_list.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php /** Created by Anton on 14.02.2020. */
  2. /** @var string $includeForm */
  3. /** @var $cameras */
  4. /** @var $oilMeters */
  5. /** @var $phones */
  6. $devicesWitsTitle = [
  7. 'Камера' => $cameras,
  8. 'Масломер' => $oilMeters,
  9. 'Телефон' => $phones
  10. ];
  11. ?>
  12. <link href="/tmc/css/main.min.css" rel="stylesheet">
  13. <style type="text/css">
  14. .contentBox {
  15. padding: 0 45px 54px;
  16. }
  17. .main_content {
  18. padding: 0;
  19. display: inline-flex;
  20. }
  21. </style>
  22. <div class="menuTask loco-scrol-blue scroller">
  23. <div class="menuTaskHeader">Список устройств</div>
  24. <div class="boxB4">
  25. <div class="inpBox">
  26. <input class="js-search" type="text" placeholder="Поиск">
  27. <img src="/images/find.svg" alt="">
  28. </div>
  29. </div>
  30. <div class="boxB5">
  31. <div class="accordion">
  32. <?php $i = 1?>
  33. <?php foreach ($devicesWitsTitle as $title => $oneTypeDevices): ?>
  34. <div class="trigger">
  35. <input type="checkbox" id="checkbox-<?= $i ?>" class="loco_checkbox"/>
  36. <label for="checkbox-<?= $i ?>" class="checkbox">
  37. <?= $title ?>
  38. <t class="loco_info" style="float:right; margin-right: 35px"><b><?= $oneTypeDevices['inCharge'] ?? 0 ?></b></t>
  39. <t class="loco_info_red" style="float:right; margin-right: 10px"><b><?= $oneTypeDevices['issued'] ?? 0 ?></b></t>
  40. <t class="loco_info" style="padding: 5px; float:right; margin-right: 10px"><b><?= $oneTypeDevices['total'] ?? 0 ?></b></t>
  41. <i></i>
  42. </label>
  43. <div class="tmc-content loco-scrol-null scroller_null">
  44. <?php foreach ($oneTypeDevices['list'] as $device): ?>
  45. <a href="?act=tmc/detail/added&id=<?= $device['id'] ?>">
  46. <div>
  47. <h5><?= $device['title'] ?></h5>
  48. <t class="<?= getColorByStatus($device['status']) ?>"><?= $statuses[$device['status']]['title'] ?></t>
  49. <?php if ($device['name']): ?>
  50. <t class="loco_grey" style="float:right"><?= $device['name'] ?></t>
  51. <?php endif; ?>
  52. <?php if ($device['status'] == 6): ?>
  53. <t class="loco_grey" style="float:right"><?= $device['storage'] ?></t>
  54. <?php endif; ?>
  55. </div>
  56. </a>
  57. <?php endforeach; ?>
  58. </div>
  59. </div>
  60. <?php $i++ ?>
  61. <?php endforeach; ?>
  62. </div>
  63. </div>
  64. </div>
  65. <?php if ($includeForm) {
  66. require (dirname(__DIR__) . '/tmc/forms/' . $includeForm . '.php');
  67. }?>
  68. <div role="log" aria-live="assertive" aria-relevant="additions" class="ui-helper-hidden-accessible"></div>
  69. <script type="application/javascript" src="tmc/js/search.js"></script>