Tutorial queries can now be unavailable for certain corpora

Change-Id: Ib52cf6dfc2a020893dd6b252a3d1f5ddd53e936c
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index b89b968..485c14a 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -7,14 +7,14 @@
 use File::Temp qw/tmpnam/;
 
 # Minor version - may be patched from package.json
-our $VERSION = '0.24';
+our $VERSION = '0.25';
 
 # TODO: Use CSRF!!!
 # TODO: The FAQ-Page has a contact form for new questions
 # TODO: Embed query serialization
 # TODO: Embed collection statistics
+# TODO: Show further meta data per click
 # TODO: Implement tab opener for matches and the tutorial
-# TODO: Make the tutorial ql sensitive
 # TODO: Implement a "projects" system
 
 # Start the application and register all routes and plugins
@@ -220,7 +220,7 @@
 
 =head2 COPYRIGHT AND LICENSE
 
-Copyright (C) 2015-2017, L<IDS Mannheim|http://www.ids-mannheim.de/>
+Copyright (C) 2015-2018, L<IDS Mannheim|http://www.ids-mannheim.de/>
 Author: L<Nils Diewald|http://nils-diewald.de/>
 
 Kalamar is developed as part of the L<KorAP|http://korap.ids-mannheim.de/>
diff --git a/lib/Kalamar/Plugin/KalamarHelpers.pm b/lib/Kalamar/Plugin/KalamarHelpers.pm
index 855a92b..4ef68a7 100644
--- a/lib/Kalamar/Plugin/KalamarHelpers.pm
+++ b/lib/Kalamar/Plugin/KalamarHelpers.pm
@@ -191,6 +191,18 @@
     doc_query => sub {
       my ($c, $ql, $q, %param) = @_;
 
+      # Query is not supported in the corpus
+      if ($q =~ s/^\*\*\s*//) {
+        # Escape query for html embedding
+        $q = xml_escape $q;
+
+        return b(
+          '<pre class="query tutorial unsupported">' .
+            "<code>$q</code>" .
+            '<span title="' . $c->loc('notAvailInCorpus') . '">*</span>' .
+            '</pre>');
+      };
+
       # Escape query for html embedding
       $q = xml_escape $q;