var/cache/dev/twig/cc/ccaba8574237c0213efa25c4feb29750.php line 44

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* debug/hobit.html.twig */
  16. class __TwigTemplate_fc0bb7c7e61f728652e54e007bd578dd extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'body' => [$this, 'block_body'],
  29. 'javascripts' => [$this, 'block_javascripts'],
  30. ];
  31. }
  32. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  33. {
  34. // line 1
  35. return "base.html.twig";
  36. }
  37. protected function doDisplay(array $context, array $blocks = []): iterable
  38. {
  39. $macros = $this->macros;
  40. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/hobit.html.twig"));
  42. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "debug/hobit.html.twig"));
  44. $this->parent = $this->load("base.html.twig", 1);
  45. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48. }
  49. // line 3
  50. /**
  51. * @return iterable<null|scalar|\Stringable>
  52. */
  53. public function block_body(array $context, array $blocks = []): iterable
  54. {
  55. $macros = $this->macros;
  56. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  58. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  60. // line 4
  61. yield " <div class=\"page\">
  62. <div class=\"container\">
  63. <div class=\"row animated fadeIn delay-0-2s\">
  64. <div class=\"col-12 mb-3 mb-lg-5\">
  65. <div class=\"\">
  66. <h2>Magic hobit</h2>
  67. </div>
  68. <div class=\"\">
  69. ";
  70. // line 13
  71. if ((($tmp = (isset($context["debugAndFlush"]) || array_key_exists("debugAndFlush", $context) ? $context["debugAndFlush"] : (function () { throw new RuntimeError('Variable "debugAndFlush" does not exist.', 13, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  72. // line 14
  73. yield " <p>Debug and flush : Yes</p>
  74. ";
  75. } else {
  76. // line 16
  77. yield " <p>Debug and flush : No</p>
  78. ";
  79. }
  80. // line 18
  81. yield " </div>
  82. <hr></hr>
  83. </div>
  84. </div>
  85. </div>
  86. ";
  87. // line 25
  88. if ((($tmp = (isset($context["tabHobit"]) || array_key_exists("tabHobit", $context) ? $context["tabHobit"] : (function () { throw new RuntimeError('Variable "tabHobit" does not exist.', 25, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  89. // line 26
  90. yield " ";
  91. if ((($tmp = (isset($context["debugAndFlush"]) || array_key_exists("debugAndFlush", $context) ? $context["debugAndFlush"] : (function () { throw new RuntimeError('Variable "debugAndFlush" does not exist.', 26, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  92. // line 27
  93. yield " <div class=\"container\">
  94. <div class=\"row\">
  95. ";
  96. // line 29
  97. $context["i"] = 3;
  98. // line 30
  99. yield " ";
  100. $context["number"] = 1;
  101. // line 31
  102. yield "
  103. ";
  104. // line 32
  105. $context['_parent'] = $context;
  106. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["tabHobit"]) || array_key_exists("tabHobit", $context) ? $context["tabHobit"] : (function () { throw new RuntimeError('Variable "tabHobit" does not exist.', 32, $this->source); })()));
  107. foreach ($context['_seq'] as $context["_key"] => $context["hobit"]) {
  108. // line 33
  109. yield " <div class=\"col-12 col-lg-4 mb-3 mb-lg-5\">
  110. <div class=\"card animated fadeIn delay-0-";
  111. // line 34
  112. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 34, $this->source); })()), "html", null, true);
  113. yield "s\" style=\"width: 100%;\">
  114. <div class=\"card-img-top animated fadeIn delay-0-8s\" style='text-align:center;'><iframe
  115. width='100%'
  116. height='300'
  117. frameborder='0' style='border:0'
  118. src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  119. &q=";
  120. // line 40
  121. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 40), "latitude", [], "any", false, false, false, 40), "html", null, true);
  122. yield ",";
  123. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 40), "longitude", [], "any", false, false, false, 40), "html", null, true);
  124. yield "'
  125. allowfullscreen>
  126. </iframe>
  127. </div>
  128. <div class=\"card-body\">
  129. <h5 class=\"card-title\">Hobit ";
  130. // line 45
  131. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 45, $this->source); })()), "html", null, true);
  132. yield "</h5>
  133. <p class=\"card-text\">Date start : ";
  134. // line 46
  135. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "startDateTime", [], "array", false, false, false, 46), "d/m/Y H:i"), "html", null, true);
  136. yield "</p>
  137. <p class=\"card-text\">Date end : ";
  138. // line 47
  139. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "endDateTime", [], "array", false, false, false, 47), "d/m/Y H:i"), "html", null, true);
  140. yield "</p>
  141. <p class=\"card-text\">Latitude : ";
  142. // line 48
  143. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 48), "latitude", [], "any", false, false, false, 48), "html", null, true);
  144. yield "</p>
  145. <p class=\"card-text\">Longitude : ";
  146. // line 49
  147. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 49), "longitude", [], "any", false, false, false, 49), "html", null, true);
  148. yield "</p>
  149. <p class=\"card-text\">Number : ";
  150. // line 50
  151. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "number", [], "array", false, false, false, 50), "html", null, true);
  152. yield "</p>
  153. </div>
  154. </div>
  155. </div>
  156. ";
  157. // line 54
  158. $context["i"] = ((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 54, $this->source); })()) + 1);
  159. // line 55
  160. yield " ";
  161. $context["number"] = ((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 55, $this->source); })()) + 1);
  162. // line 56
  163. yield " ";
  164. }
  165. $_parent = $context['_parent'];
  166. unset($context['_seq'], $context['_key'], $context['hobit'], $context['_parent']);
  167. $context = array_intersect_key($context, $_parent) + $_parent;
  168. yield "
  169. </div>
  170. </div>
  171. ";
  172. } else {
  173. // line 60
  174. yield " <div class=\"container\">
  175. <div class=\"row\">
  176. ";
  177. // line 62
  178. $context["number"] = 1;
  179. // line 63
  180. yield " ";
  181. $context['_parent'] = $context;
  182. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["tabHobit"]) || array_key_exists("tabHobit", $context) ? $context["tabHobit"] : (function () { throw new RuntimeError('Variable "tabHobit" does not exist.', 63, $this->source); })()));
  183. foreach ($context['_seq'] as $context["_key"] => $context["hobit"]) {
  184. // line 64
  185. yield " <div class=\"col-12 col-lg-6\">
  186. <div class=\"accordion\" id=\"accordionExample\">
  187. <div class=\"accordion-item\">
  188. <div class=\"title\">
  189. ";
  190. // line 70
  191. if ((CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "activityType", [], "array", false, false, false, 70) == "still")) {
  192. // line 71
  193. yield " <i class=\"fas fa-chair\"></i>
  194. ";
  195. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 72
  196. $context["hobit"], "activityType", [], "array", false, false, false, 72) == "on_foot")) {
  197. // line 73
  198. yield " <i class=\"fas fa-walking\"></i>
  199. ";
  200. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 74
  201. $context["hobit"], "activityType", [], "array", false, false, false, 74) == "on_bicycle")) {
  202. // line 75
  203. yield " <i class=\"fas fa-bicycle\"></i>
  204. ";
  205. } elseif ((CoreExtension::getAttribute($this->env, $this->source, // line 76
  206. $context["hobit"], "activityType", [], "array", false, false, false, 76) == "in_vehicle")) {
  207. // line 77
  208. yield " <i class=\"fas fa-car\"></i>
  209. ";
  210. }
  211. // line 79
  212. yield "
  213. ";
  214. // line 80
  215. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "activityType", [], "array", false, false, false, 80), "html", null, true);
  216. yield "
  217. </div>
  218. ";
  219. // line 83
  220. if (((CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", true, true, false, 83) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 83), "latitude", [], "any", false, false, false, 83)) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 83), "longitude", [], "any", false, false, false, 83))) {
  221. // line 84
  222. yield " <div>
  223. <iframe
  224. width='100%'
  225. height='300'
  226. frameborder='0' style='border:0'
  227. src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  228. &q=";
  229. // line 90
  230. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 90), "latitude", [], "any", false, false, false, 90), "html", null, true);
  231. yield ",";
  232. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "data", [], "array", false, false, false, 90), "longitude", [], "any", false, false, false, 90), "html", null, true);
  233. yield "'
  234. allowfullscreen>
  235. </iframe>
  236. </div>
  237. ";
  238. } else {
  239. // line 95
  240. yield " <div data-positions='";
  241. yield json_encode(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "positions", [], "array", false, false, false, 95));
  242. yield "' id=\"map-multi-";
  243. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 95, $this->source); })()), "html", null, true);
  244. yield "\" class=\"animated fadeIn delay-0-8s map-multi\" style=\"width: 100%; height: 300px;\"></div>
  245. ";
  246. }
  247. // line 97
  248. yield "
  249. <div>
  250. <button class=\"accordion-button button black mt-3 mb-3\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#tab-";
  251. // line 99
  252. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 99, $this->source); })()), "html", null, true);
  253. yield "-main\" aria-expanded=\"true\" aria-controls=\"collapseOne\">Open</button>
  254. </div>
  255. <div id=\"tab-";
  256. // line 102
  257. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 102, $this->source); })()), "html", null, true);
  258. yield "-main\" class=\"accordion-collapse collapse\" aria-labelledby=\"tab-";
  259. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 102, $this->source); })()), "html", null, true);
  260. yield "-main-label\" data-bs-parent=\"#accordionExample\">
  261. <div class=\"accordion-body\">
  262. <div class=\"line\"><strong>Start date time : </strong><code>";
  263. // line 104
  264. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "startDateTime", [], "array", false, false, false, 104), "d/m/Y H:i", "Europe/Paris"), "html", null, true);
  265. yield "</code></div>
  266. <div class=\"line\"><strong>Start date time server : </strong><code>";
  267. // line 105
  268. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "startDateTimeServer", [], "array", false, false, false, 105), "d/m/Y H:i", "Europe/Paris"), "html", null, true);
  269. yield "</code></div>
  270. <div class=\"line\"><strong>End date time hobbit : </strong><code>";
  271. // line 106
  272. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "endDateTime", [], "array", false, false, false, 106), "d/m/Y H:i", "Europe/Paris"), "html", null, true);
  273. yield "</code></div>
  274. <div class=\"line\"><strong>Type activity : </strong><code>";
  275. // line 108
  276. yield $this->extensions['Symfony\Bridge\Twig\Extension\DumpExtension']->dump($this->env, $context, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "activityType", [], "array", false, false, false, 108));
  277. yield "</code></div>
  278. ";
  279. // line 109
  280. if (CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "id", [], "array", true, true, false, 109)) {
  281. // line 110
  282. yield " <div class=\"line\"><strong>Id : </strong><code>";
  283. yield $this->extensions['Symfony\Bridge\Twig\Extension\DumpExtension']->dump($this->env, $context, CoreExtension::getAttribute($this->env, $this->source, $context["hobit"], "id", [], "array", false, false, false, 110));
  284. yield "</code></div>
  285. ";
  286. }
  287. // line 112
  288. yield "
  289. <div class=\"line\"><strong>Data : </strong><code>";
  290. // line 113
  291. yield $this->extensions['Symfony\Bridge\Twig\Extension\DumpExtension']->dump($this->env, $context, $context["hobit"]);
  292. yield "</code></div>
  293. </div>
  294. </div>
  295. </div>
  296. ";
  297. // line 117
  298. $context["number"] = ((isset($context["number"]) || array_key_exists("number", $context) ? $context["number"] : (function () { throw new RuntimeError('Variable "number" does not exist.', 117, $this->source); })()) + 1);
  299. // line 118
  300. yield "
  301. </div>
  302. </div>
  303. ";
  304. }
  305. $_parent = $context['_parent'];
  306. unset($context['_seq'], $context['_key'], $context['hobit'], $context['_parent']);
  307. $context = array_intersect_key($context, $_parent) + $_parent;
  308. // line 122
  309. yield " </div>
  310. </div>
  311. ";
  312. }
  313. // line 126
  314. yield "
  315. ";
  316. } else {
  317. // line 128
  318. yield " <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  319. ";
  320. }
  321. // line 130
  322. yield " </div>
  323. ";
  324. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  325. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  326. yield from [];
  327. }
  328. // line 134
  329. /**
  330. * @return iterable<null|scalar|\Stringable>
  331. */
  332. public function block_javascripts(array $context, array $blocks = []): iterable
  333. {
  334. $macros = $this->macros;
  335. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  336. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  337. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  338. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  339. // line 135
  340. yield " ";
  341. yield from $this->yieldParentBlock("javascripts", $context, $blocks);
  342. yield "
  343. <script>
  344. \$(window).on('load', function() {
  345. \$(\".map-multi\").each(function( index ) {
  346. console.log(JSON.parse(\$(this).attr(\"data-positions\")));
  347. initMap(\$(this).attr(\"id\"));
  348. });
  349. function initMap(idMap) {
  350. var positions = JSON.parse(\$(\"#\" + idMap).attr(\"data-positions\"));
  351. //var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  352. var mapOptions = {
  353. zoom: 16,
  354. center: new google.maps.LatLng(positions[0]['dataGps']['latitude'],positions[0]['dataGps']['longitude'])
  355. }
  356. var map = new google.maps.Map(document.getElementById(idMap), mapOptions);
  357. var markers = [];
  358. positions.forEach(function(element) {
  359. markers.push(new google.maps.Marker({
  360. position: new google.maps.LatLng(element['dataGps']['latitude'], element['dataGps']['longitude']),
  361. //title: element[2] + \" - \" + element[0] + \" - \" + element[1]
  362. }));
  363. });
  364. // To add the marker to the map, call setMap();
  365. //markers[0].setMap(map);
  366. //marker2.setMap(map);
  367. markers.forEach(function(element) {
  368. element.setMap(map);
  369. });
  370. }
  371. });
  372. </script>
  373. ";
  374. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  375. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  376. yield from [];
  377. }
  378. /**
  379. * @codeCoverageIgnore
  380. */
  381. public function getTemplateName(): string
  382. {
  383. return "debug/hobit.html.twig";
  384. }
  385. /**
  386. * @codeCoverageIgnore
  387. */
  388. public function isTraitable(): bool
  389. {
  390. return false;
  391. }
  392. /**
  393. * @codeCoverageIgnore
  394. */
  395. public function getDebugInfo(): array
  396. {
  397. return array ( 373 => 135, 360 => 134, 347 => 130, 343 => 128, 339 => 126, 333 => 122, 324 => 118, 322 => 117, 315 => 113, 312 => 112, 306 => 110, 304 => 109, 300 => 108, 295 => 106, 291 => 105, 287 => 104, 280 => 102, 274 => 99, 270 => 97, 262 => 95, 252 => 90, 244 => 84, 242 => 83, 236 => 80, 233 => 79, 229 => 77, 227 => 76, 224 => 75, 222 => 74, 219 => 73, 217 => 72, 214 => 71, 212 => 70, 204 => 64, 199 => 63, 197 => 62, 193 => 60, 182 => 56, 179 => 55, 177 => 54, 170 => 50, 166 => 49, 162 => 48, 158 => 47, 154 => 46, 150 => 45, 140 => 40, 131 => 34, 128 => 33, 124 => 32, 121 => 31, 118 => 30, 116 => 29, 112 => 27, 109 => 26, 107 => 25, 98 => 18, 94 => 16, 90 => 14, 88 => 13, 77 => 4, 64 => 3, 41 => 1,);
  398. }
  399. public function getSourceContext(): Source
  400. {
  401. return new Source("{% extends 'base.html.twig' %}
  402. {% block body %}
  403. <div class=\"page\">
  404. <div class=\"container\">
  405. <div class=\"row animated fadeIn delay-0-2s\">
  406. <div class=\"col-12 mb-3 mb-lg-5\">
  407. <div class=\"\">
  408. <h2>Magic hobit</h2>
  409. </div>
  410. <div class=\"\">
  411. {% if debugAndFlush %}
  412. <p>Debug and flush : Yes</p>
  413. {% else %}
  414. <p>Debug and flush : No</p>
  415. {% endif %}
  416. </div>
  417. <hr></hr>
  418. </div>
  419. </div>
  420. </div>
  421. {% if tabHobit %}
  422. {% if debugAndFlush %}
  423. <div class=\"container\">
  424. <div class=\"row\">
  425. {% set i = 3 %}
  426. {% set number = 1 %}
  427. {% for hobit in tabHobit %}
  428. <div class=\"col-12 col-lg-4 mb-3 mb-lg-5\">
  429. <div class=\"card animated fadeIn delay-0-{{ i }}s\" style=\"width: 100%;\">
  430. <div class=\"card-img-top animated fadeIn delay-0-8s\" style='text-align:center;'><iframe
  431. width='100%'
  432. height='300'
  433. frameborder='0' style='border:0'
  434. src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  435. &q={{ hobit['data'].latitude }},{{ hobit['data'].longitude }}'
  436. allowfullscreen>
  437. </iframe>
  438. </div>
  439. <div class=\"card-body\">
  440. <h5 class=\"card-title\">Hobit {{ number }}</h5>
  441. <p class=\"card-text\">Date start : {{ hobit['startDateTime']|date(\"d/m/Y H:i\") }}</p>
  442. <p class=\"card-text\">Date end : {{ hobit['endDateTime']|date(\"d/m/Y H:i\") }}</p>
  443. <p class=\"card-text\">Latitude : {{ hobit['data'].latitude }}</p>
  444. <p class=\"card-text\">Longitude : {{ hobit['data'].longitude }}</p>
  445. <p class=\"card-text\">Number : {{ hobit['number'] }}</p>
  446. </div>
  447. </div>
  448. </div>
  449. {% set i = i + 1 %}
  450. {% set number = number + 1 %}
  451. {% endfor %}
  452. </div>
  453. </div>
  454. {% else %}
  455. <div class=\"container\">
  456. <div class=\"row\">
  457. {% set number = 1 %}
  458. {% for hobit in tabHobit %}
  459. <div class=\"col-12 col-lg-6\">
  460. <div class=\"accordion\" id=\"accordionExample\">
  461. <div class=\"accordion-item\">
  462. <div class=\"title\">
  463. {% if hobit['activityType'] == \"still\" %}
  464. <i class=\"fas fa-chair\"></i>
  465. {% elseif hobit['activityType'] == \"on_foot\" %}
  466. <i class=\"fas fa-walking\"></i>
  467. {% elseif hobit['activityType'] == \"on_bicycle\" %}
  468. <i class=\"fas fa-bicycle\"></i>
  469. {% elseif hobit['activityType'] == \"in_vehicle\" %}
  470. <i class=\"fas fa-car\"></i>
  471. {% endif %}
  472. {{ hobit['activityType'] }}
  473. </div>
  474. {% if hobit[\"data\"] is defined and hobit[\"data\"].latitude and hobit[\"data\"].longitude %}
  475. <div>
  476. <iframe
  477. width='100%'
  478. height='300'
  479. frameborder='0' style='border:0'
  480. src='https://www.google.com/maps/embed/v1/place?key=AIzaSyAmbx9RsGi01srCnH_-2TVdH26TpjwvFDs
  481. &q={{ hobit[\"data\"].latitude }},{{ hobit[\"data\"].longitude }}'
  482. allowfullscreen>
  483. </iframe>
  484. </div>
  485. {% else %}
  486. <div data-positions='{{ hobit['positions']|json_encode()|raw }}' id=\"map-multi-{{ number }}\" class=\"animated fadeIn delay-0-8s map-multi\" style=\"width: 100%; height: 300px;\"></div>
  487. {% endif %}
  488. <div>
  489. <button class=\"accordion-button button black mt-3 mb-3\" type=\"button\" data-bs-toggle=\"collapse\" data-bs-target=\"#tab-{{ number }}-main\" aria-expanded=\"true\" aria-controls=\"collapseOne\">Open</button>
  490. </div>
  491. <div id=\"tab-{{ number }}-main\" class=\"accordion-collapse collapse\" aria-labelledby=\"tab-{{ number }}-main-label\" data-bs-parent=\"#accordionExample\">
  492. <div class=\"accordion-body\">
  493. <div class=\"line\"><strong>Start date time : </strong><code>{{ hobit['startDateTime']|date(\"d/m/Y H:i\", \"Europe/Paris\") }}</code></div>
  494. <div class=\"line\"><strong>Start date time server : </strong><code>{{ hobit['startDateTimeServer']|date(\"d/m/Y H:i\", \"Europe/Paris\") }}</code></div>
  495. <div class=\"line\"><strong>End date time hobbit : </strong><code>{{ hobit['endDateTime']|date(\"d/m/Y H:i\", \"Europe/Paris\") }}</code></div>
  496. <div class=\"line\"><strong>Type activity : </strong><code>{{ dump(hobit['activityType']) }}</code></div>
  497. {% if hobit['id'] is defined %}
  498. <div class=\"line\"><strong>Id : </strong><code>{{ dump(hobit['id']) }}</code></div>
  499. {% endif %}
  500. <div class=\"line\"><strong>Data : </strong><code>{{ dump(hobit) }}</code></div>
  501. </div>
  502. </div>
  503. </div>
  504. {% set number = number + 1 %}
  505. </div>
  506. </div>
  507. {% endfor %}
  508. </div>
  509. </div>
  510. {% endif %}
  511. {% else %}
  512. <div class=\"text-center animated fadeIn delay-0-4s\" style=\"font-size: 30px;\">No data...</div>
  513. {% endif %}
  514. </div>
  515. {% endblock %}
  516. {% block javascripts %}
  517. {{ parent() }}
  518. <script>
  519. \$(window).on('load', function() {
  520. \$(\".map-multi\").each(function( index ) {
  521. console.log(JSON.parse(\$(this).attr(\"data-positions\")));
  522. initMap(\$(this).attr(\"id\"));
  523. });
  524. function initMap(idMap) {
  525. var positions = JSON.parse(\$(\"#\" + idMap).attr(\"data-positions\"));
  526. //var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  527. var mapOptions = {
  528. zoom: 16,
  529. center: new google.maps.LatLng(positions[0]['dataGps']['latitude'],positions[0]['dataGps']['longitude'])
  530. }
  531. var map = new google.maps.Map(document.getElementById(idMap), mapOptions);
  532. var markers = [];
  533. positions.forEach(function(element) {
  534. markers.push(new google.maps.Marker({
  535. position: new google.maps.LatLng(element['dataGps']['latitude'], element['dataGps']['longitude']),
  536. //title: element[2] + \" - \" + element[0] + \" - \" + element[1]
  537. }));
  538. });
  539. // To add the marker to the map, call setMap();
  540. //markers[0].setMap(map);
  541. //marker2.setMap(map);
  542. markers.forEach(function(element) {
  543. element.setMap(map);
  544. });
  545. }
  546. });
  547. </script>
  548. {% endblock %}", "debug/hobit.html.twig", "/var/www/vhosts/webpro-developpement.fr/follow.webpro-developpement.fr/public/templates/debug/hobit.html.twig");
  549. }
  550. }