diff --git a/src/Bridges/ApplicationTracy/RoutingPanel.php b/src/Bridges/ApplicationTracy/RoutingPanel.php index a69c429dc..bbfd16777 100644 --- a/src/Bridges/ApplicationTracy/RoutingPanel.php +++ b/src/Bridges/ApplicationTracy/RoutingPanel.php @@ -45,7 +45,7 @@ public function getTab(): string ); return Nette\Utils\Helpers::capture(function () { $matched = $this->matched; - require __DIR__ . '/templates/RoutingPanel.tab.phtml'; + require __DIR__ . '/dist/tab.phtml'; }); } @@ -61,7 +61,7 @@ public function getPanel(): string $source = $this->matched ? $this->findSource() : null; $url = $this->httpRequest->getUrl(); $method = $this->httpRequest->getMethod(); - require __DIR__ . '/templates/RoutingPanel.panel.phtml'; + require __DIR__ . '/dist/panel.phtml'; }); } diff --git a/src/Bridges/ApplicationTracy/dist/panel.phtml b/src/Bridges/ApplicationTracy/dist/panel.phtml new file mode 100644 index 000000000..add492e07 --- /dev/null +++ b/src/Bridges/ApplicationTracy/dist/panel.phtml @@ -0,0 +1,193 @@ + + + + + + +
+ = Tracy\Helpers::escapeHtml($method) ?>
+ = Tracy\Helpers::escapeHtml($url->getBaseUrl()) ?>
+
= Tracy\Helpers::escapeHtml($source) ?> (class not found)
+ + + +No routes defined.
+ +
+ = Tracy\Helpers::escapeHtml($path) ?>
+
+ = isset($route->mask) ? str_replace(['/', '-'], ['/', '-'], htmlspecialchars($route->mask)) : str_replace('\\', '\\', htmlspecialchars($route->class)) ?>
+
+
+
+defaults as $key => $value): ?>
+ = Tracy\Helpers::escapeHtml($key) ?> = = Tracy\Helpers::escapeHtml($value) ?>
= Dumper::toHtml($value, [Dumper::COLLAPSE => true, Dumper::LIVE => true]) ?>
+
+
+
+
+params ?>
+
+ = Tracy\Helpers::escapeHtml($params['presenter']) ?>:= Tracy\Helpers::escapeHtml($params[Presenter::ActionKey] ?? Presenter::DefaultAction) ?>
+
+
+
+ $value): ?>
+ = Tracy\Helpers::escapeHtml($key) ?> = = Tracy\Helpers::escapeHtml($value) ?>
= Dumper::toHtml($value, [Dumper::COLLAPSE => true, Dumper::LIVE => true]) ?>
+
+
+
+error): ?>
+ = Tracy\Helpers::escapeHtml($route->error->getMessage()) ?>
+
+
+ {$method}
+ {$url->getBaseUrl()}
+
{$source} (class not found)
+ {elseif $source} + + {/if} +No routes defined.
+ {else} +
+ {if $path !== ''}{$path}{/if}
+ {isset($route->mask) ? str_replace(['/', '-'], ['/', '-'], htmlspecialchars($route->mask)) : str_replace('\\', '\\', htmlspecialchars($route->class))|noescape}
+
+
+ {foreach $route->defaults as $key => $value}
+ {$key} = {if is_string($value)}{$value}
{Dumper::toHtml($value, [Dumper::COLLAPSE => true, Dumper::LIVE => true])}{/if}
+ {/foreach}
+
+
+ {do $params = $route->params}
+ {if isset($params[Presenter::PresenterKey])}
+ {$params[presenter]}:{$params[Presenter::ActionKey] ?? Presenter::DefaultAction}
+
+ {do unset($params[Presenter::PresenterKey], $params[Presenter::ActionKey])}
+ {/if}
+ {foreach $params as $key => $value}
+ {$key} = {if is_string($value)}{$value}
{Dumper::toHtml($value, [Dumper::COLLAPSE => true, Dumper::LIVE => true])}{/if}
+ {/foreach}
+
+ {elseif $route->error}
+ {$route->error->getMessage()}
+ {/if}
+ = Helpers::escapeHtml($method) ?>
- = Helpers::escapeHtml($url->getBaseUrl()) ?>
= Helpers::escapeHtml($source) ?> (class not found)
- - - -No routes defined.
- - -=
- $path === '' ? '' : '' . Helpers::escapeHtml($path) . '',
- isset($route->mask) ? str_replace(['/', '-'], ['/', '-'], Helpers::escapeHtml($route->mask)) : str_replace('\\', '\\', Helpers::escapeHtml($route->class))
- ?>
- defaults as $key => $value): ?>
- = Helpers::escapeHtml($key), ' = ', is_string($value) ? Helpers::escapeHtml($value) . '
' : Dumper::toHtml($value, [Dumper::COLLAPSE => true, Dumper::LIVE => true]) ?>
-
-
- params; ?>
-
- = Helpers::escapeHtml($params['presenter'] . ':' . ($params[Presenter::ActionKey] ?? Presenter::DefaultAction)) ?>
-
-
- $value): ?>
- = Helpers::escapeHtml($key), ' = ', is_string($value) ? Helpers::escapeHtml($value) . '
' : Dumper::toHtml($value, [Dumper::COLLAPSE => true, Dumper::LIVE => true]) ?>
-
-
error): ?>= Helpers::escapeHtml($route->error->getMessage()) ?>