Support CQP in frontend
Change-Id: Ibcbd6d383c0a0eee148b369f98d266cee788cda2
diff --git a/Changes b/Changes
index 262f721..b88b243 100755
--- a/Changes
+++ b/Changes
@@ -1,9 +1,10 @@
-0.51 2023-07-21
+0.51 2023-09-18
- Support defined log file in configuration. (diewald)
- Remove experimental_client_registration setting
and make client registration mandatory in OAuth
(diewald)
- Introduce 'reserved terms' in documentation (diewald)
+ - Support CQP in frontend (diewald)
0.50 2023-05-08
- Improvement of NKJP-annotation helper. (diewald)
diff --git a/kalamar.dict b/kalamar.dict
index 1166d80..e6332fe 100644
--- a/kalamar.dict
+++ b/kalamar.dict
@@ -106,6 +106,9 @@
'#default-foundries' => 'Standard Foundries',
'development' => 'Entwicklung',
'faq' => 'FAQ'
+ },
+ QL => {
+ cqp => 'CQP (neu)'
}
},
-en => {
@@ -163,6 +166,7 @@
poliqarp => 'Poliqarp',
cosmas2 => 'Cosmas II',
annis => 'Annis QL',
+ cqp => 'CQP (new)',
cql => 'CQL v1.2',
fcsql => 'FCSQL'
},
diff --git a/lib/Kalamar/Controller/Search.pm b/lib/Kalamar/Controller/Search.pm
index c2f48c0..54d1dc4 100644
--- a/lib/Kalamar/Controller/Search.pm
+++ b/lib/Kalamar/Controller/Search.pm
@@ -31,7 +31,7 @@
my $v = $c->validation;
$v->optional('q', 'trim')->size(1,4096);
- $v->optional('ql')->in(qw/poliqarp cosmas2 annis cql fcsql/);
+ $v->optional('ql')->in(qw/poliqarp cosmas2 annis cqp cql fcsql/);
$v->optional('collection', 'trim'); # Legacy
$v->optional('cq', 'trim'); # New
$v->optional('cutoff', 'trim')->in(qw/1 0 true false/);
diff --git a/package.json b/package.json
index a15edd7..7cdb258 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "Kalamar",
"description": "Mojolicious-based Frontend for KorAP",
"license": "BSD-2-Clause",
- "version": "0.50.1",
+ "version": "0.51.2",
"pluginVersion": "0.2.2",
"engines": {
"node": ">=6.0.0"
diff --git a/t/intro.t b/t/intro.t
index f93ea73..fe56167 100644
--- a/t/intro.t
+++ b/t/intro.t
@@ -19,6 +19,9 @@
->content_unlike(qr!onload!)
->text_is('#link-guided-tour', 'guided tour')
->text_is('nav > a[href=/doc/korap/kalamar]', 'V 0.47.999')
+ ->element_exists('select#ql-field option[value=poliqarp]')
+ ->element_exists('select#ql-field option[value=cqp]')
+ ->element_exists_not('select#ql-field option[value=noliqart]')
;
# Only routed when existing
diff --git a/templates/partial/header.html.ep b/templates/partial/header.html.ep
index fe0ce0e..5622d32 100644
--- a/templates/partial/header.html.ep
+++ b/templates/partial/header.html.ep
@@ -17,7 +17,7 @@
<%= loc 'with' %>
<span class="select">
- %= select_field 'ql', [[loc('QL_poliqarp') => 'poliqarp'], [loc('QL_cosmas2') => 'cosmas2'], [loc('QL_annis') => 'annis'], [loc('QL_cql') => 'cql'], [loc('QL_fcsql') => 'fcsql']], id => 'ql-field'
+ %= select_field 'ql', [[loc('QL_poliqarp') => 'poliqarp'], [loc('QL_cosmas2') => 'cosmas2'], [loc('QL_annis') => 'annis'], [loc('QL_cqp') => 'cqp'], [loc('QL_cql') => 'cql'], [loc('QL_fcsql') => 'fcsql']], id => 'ql-field'
</span>
<div class="button right">
% param(cutoff => 1) unless param 'q';