layout.html.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * Lithium: the most rad php framework
  4. *
  5. * @copyright Copyright 2013, Union of RAD (http://union-of-rad.org)
  6. * @license http://opensource.org/licenses/bsd-license.php The BSD License
  7. */
  8. use lithium\util\Inflector;
  9. ?>
  10. <!doctype html>
  11. <html>
  12. <head>
  13. <!-- Title intentionally left blank, forcing user agents use the current URL as title. -->
  14. <title></title>
  15. <?php $base = $request->env('base'); ?>
  16. <meta charset="utf-8" />
  17. <link rel="stylesheet" href="<?php echo $base; ?>/css/debug.css" />
  18. <link href="<?php echo $base; ?>/favicon.ico" type="image/x-icon" rel="icon" />
  19. <link href="<?php echo $base; ?>/favicon.ico" type="image/x-icon" rel="shortcut icon" />
  20. </head>
  21. <body class="test-dashboard">
  22. <div id="header">
  23. <header>
  24. <h1>
  25. <a href="<?php echo $base ?>/test/">
  26. <span class="triangle"></span> Lithium Test Dashboard
  27. </a>
  28. </h1>
  29. <a class="test-all" href="<?php echo $base ?>/test/all">run all tests</a>
  30. </header>
  31. </div>
  32. <div class="article">
  33. <article>
  34. <div class="test-menu">
  35. <?php echo $report->render("menu", array("menu" => $menu, "base" => $base)) ?>
  36. </div>
  37. <div class="test-content">
  38. <?php if ($report->title) { ?>
  39. <h2><span>test results for </span><?php echo $report->title; ?></h2>
  40. <?php } ?>
  41. <span class="filters">
  42. <?php echo join('', array_map(
  43. function($class) use ($request) {
  44. $url = "?filters[]={$class}";
  45. $name = join('', array_slice(explode("\\", $class), -1));
  46. $key = Inflector::underscore($name);
  47. $isActive = (
  48. isset($request->query['filters']) &&
  49. array_search($class, $request->query['filters']) !== false
  50. );
  51. $active = $isActive ? 'active' : null;
  52. return "<a class=\"{$key} {$active}\" href=\"{$url}\">{$name}</a>";
  53. },
  54. $filters
  55. )); ?>
  56. </span>
  57. <?php
  58. echo $report->render("stats");
  59. foreach ($report->filters() as $filter => $options) {
  60. $data = $report->results['filters'][$filter];
  61. echo $report->render($options['name'], compact('data', 'base'));
  62. }
  63. ?>
  64. </div>
  65. </article>
  66. </div>
  67. <div style="clear:both"></div>
  68. </body>
  69. </html>