Fix inspection template
diff --git a/lib/Korap/Search.pm b/lib/Korap/Search.pm
index 40d1ffe..9166130 100644
--- a/lib/Korap/Search.pm
+++ b/lib/Korap/Search.pm
@@ -7,7 +7,9 @@
$c->layout('default');
$c->title('KorAP');
- $c->stash(test_port => $c->req->url->to_abs->port == 6666 ? 1 : 0);
+ $c->stash(test_port => (
+ $c->req->url->to_abs->port == 6666 ||
+ $c->app->mode eq 'development') ? 1 : 0);
if ((scalar $c->param('action') // '') eq 'inspect') {
my $api = $c->config('KorAP')->{api};
@@ -26,7 +28,7 @@
};
$c->param(cutoff => 1);
- return $c->render(template => 'query');
+ return $c->render(template => 'query_info');
}
elsif ($c->param('snippet')) {
diff --git a/templates/query_info.html.ep b/templates/query_info.html.ep
new file mode 100644
index 0000000..c9a5167
--- /dev/null
+++ b/templates/query_info.html.ep
@@ -0,0 +1,3 @@
+% content main => begin
+%= include 'query'
+% end