Added API response view to second frontend
diff --git a/templates/api-communication.html.ep b/templates/api-communication.html.ep
new file mode 100644
index 0000000..2daaa37
--- /dev/null
+++ b/templates/api-communication.html.ep
@@ -0,0 +1,17 @@
+% use JSON::XS;
+
+% if (stash('test_port') && stash('search.apirequest')) {
+<pre class="query api">
+ <span>API Response for </span>
+ <span style="font-size: 70%"><%= stash('search.apirequest') %></span>
+ <code>
+<%= stash('search.apiresponse') =%>
+ </code>
+</pre>
+%= javascript begin
+hljs.initHighlightingOnLoad();
+$("pre.query.api").on("click", function () {
+ $(this).toggleClass('active');
+});
+% end
+% };
diff --git a/templates/collections.html.ep b/templates/collections.html.ep
index 046a3a8..59f62ce 100644
--- a/templates/collections.html.ep
+++ b/templates/collections.html.ep
@@ -12,3 +12,4 @@
</li>
% };
</ul>
+<p style="font-size: 9pt; padding-left: 1em">Index port: <%= $c->url_for($c->config('KorAP')->{'api-0.1'})->port %></p>
diff --git a/templates/search.html.ep b/templates/search.html.ep
index 0cc4a90..7c96a68 100644
--- a/templates/search.html.ep
+++ b/templates/search.html.ep
@@ -13,6 +13,7 @@
</p>
</div>
%= include 'query'
+%= include 'api-communication'
% };
% unless (stash('search.totalResults') == 0) {
@@ -24,7 +25,6 @@
</ol>
</div>
% };
-
% end
% end