Browse Source

Merge pull request #17434 from cakephp/5.x-missing-route-collapsible

5.x: make available routes table in missing route exception collapsible
Mark Story 2 years ago
parent
commit
2e17bc7fe5
1 changed files with 15 additions and 11 deletions
  1. 15 11
      templates/Error/missing_route.php

+ 15 - 11
templates/Error/missing_route.php

@@ -42,15 +42,19 @@ Add a matching route to <?= 'config' . DIRECTORY_SEPARATOR . 'routes.php' ?></p>
 </div>
 <?php endif; ?>
 
-<h3>Connected Routes</h3>
-<table cellspacing="0" cellpadding="0" width="100%">
-<tr><th>Template</th><th>Defaults</th><th>Options</th></tr>
-<?php foreach (Router::routes() as $route): ?>
-    <tr>
-        <td><?= h($route->template) ?></td>
-        <td><div class="cake-debug" data-open-all="true"><?= Debugger::exportVar($route->defaults) ?></div></td>
-        <td><div class="cake-debug" data-open-all="true"><?= Debugger::exportVar($route->options) ?></div></td>
-    </tr>
-<?php endforeach; ?>
-</table>
+<details>
+    <summary style="font-size: 1.25rem; cursor: pointer">Connected Routes</summary>
+    <div>
+        <table cellspacing="0" cellpadding="0" width="100%">
+            <tr><th>Template</th><th>Defaults</th><th>Options</th></tr>
+            <?php foreach (Router::routes() as $route): ?>
+                <tr>
+                    <td><?= h($route->template) ?></td>
+                    <td><div class="cake-debug" data-open-all="true"><?= Debugger::exportVar($route->defaults) ?></div></td>
+                    <td><div class="cake-debug" data-open-all="true"><?= Debugger::exportVar($route->options) ?></div></td>
+                </tr>
+            <?php endforeach; ?>
+        </table>
+    </div>
+</details>
 <?php $this->end() ?>