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.

49 lines
1.4 KiB

  1. @extends('layouts.map')
  2. @section('content')
  3. @include('partials/logged-in')
  4. <div id="daterange"><div class="in">
  5. <div class="ui form"><div class="fields">
  6. <div class="five wide field"><input type="text" id="range-from" placeholder="from" value="<?= $range_from ?>"></div>
  7. <div class="five wide field"><input type="text" id="range-to" placeholder="to" value="<?= $range_to ?>"></div>
  8. <div class="five wide field"><input type="text" id="timezone" value="<?= $range_tz ?>"></div>
  9. <button class="ui submit button" id="range-go">Go</button>
  10. </div></div>
  11. </div></div>
  12. <div id="calendar">
  13. <div class="scroll">
  14. <?php
  15. $days = array_fill(1,31,['#']);
  16. $start = new DateTime('2008-05-30T00:00:00-0800');
  17. $end = new DateTime();
  18. $end->setTimeZone(new DateTimeZone('America/Los_Angeles'));
  19. $i = clone $start;
  20. while((int)$i->format('Y') <= (int)$end->format('Y') && (int)$i->format('M') <= (int)$end->format('M')) {
  21. ?>
  22. @include('partials/calendar', [
  23. 'year' => $i->format('Y'),
  24. 'month' => $i->format('m'),
  25. 'days' => $days,
  26. 'day_name_length' => 3,
  27. 'month_href' => null,
  28. 'first_day' => 1,
  29. 'pn' => []
  30. ])
  31. <?php
  32. $i = $i->add(new DateInterval('P1M'));
  33. }
  34. ?>
  35. </div>
  36. </div>
  37. <div id="map"></div>
  38. <div id="graphs">
  39. <div id="battery-chart" width="800" height="160"></div>
  40. </div>
  41. <div id="database" data-name="{{ $database->name }}" data-token="{{ $database->read_token }}"></div>
  42. @endsection