From a541c6b876f2272ad7b7112f88ee50f6c157fe51 Mon Sep 17 00:00:00 2001 From: Winona Salesky Date: Wed, 14 Aug 2024 17:37:59 -0400 Subject: [PATCH 1/3] Add decoNote to search --- modules/lib/data.xqm | 11 ++++++++++- modules/search/search.xqm | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/modules/lib/data.xqm b/modules/lib/data.xqm index 4e856cd..22856e8 100644 --- a/modules/lib/data.xqm +++ b/modules/lib/data.xqm @@ -287,6 +287,7 @@ declare function data:create-query($collection as xs:string?) as xs:string?{ data:bl-place(), data:bl-person(), data:bl-syrText(), + data:bl-decorations(), data:field-search('syrTitle',data:clean-string(request:get-parameter('syrTitle', ''))), data:element-search('idno',request:get-parameter('idno', '')), data:relation-search(), @@ -711,4 +712,12 @@ return if($cleanString != '') then concat("[descendant::tei:idno[@type='BL-Shelfmark' or @type='BL-Shelfmark-simplified'][ft:query(.,'",($cleanString),"',data:search-options())]]") else () -}; \ No newline at end of file +}; +declare function data:bl-decorations(){ +let $decorations := request:get-parameter('decorations', '') +let $cleanString := data:clean-string($decorations[1]) +return + if($cleanString != '') then + concat("[descendant::tei:decoNote[ft:query(.,'",($cleanString),"',data:search-options())]]") + else () +}; diff --git a/modules/search/search.xqm b/modules/search/search.xqm index ea74dd5..066b70f 100644 --- a/modules/search/search.xqm +++ b/modules/search/search.xqm @@ -381,6 +381,21 @@ declare function search:bl-search-form($node as node(), $model as map(*)) { +
+ +
+
+ + {if(request:get-parameter('decorations', '') != '') then + attribute value {request:get-parameter('decorations', '')} + else()} +
+ {global:keyboard-select-menu('decorations')} +
+
+ +
+
From 7ee446682d607b3ca5a229bcd10840ba6b5aaadc Mon Sep 17 00:00:00 2001 From: Winona Salesky Date: Wed, 14 Aug 2024 17:55:35 -0400 Subject: [PATCH 2/3] Add decoNote type --- modules/lib/data.xqm | 8 ++++++-- modules/search/search.xqm | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/modules/lib/data.xqm b/modules/lib/data.xqm index 22856e8..ad0130c 100644 --- a/modules/lib/data.xqm +++ b/modules/lib/data.xqm @@ -713,11 +713,15 @@ return concat("[descendant::tei:idno[@type='BL-Shelfmark' or @type='BL-Shelfmark-simplified'][ft:query(.,'",($cleanString),"',data:search-options())]]") else () }; + declare function data:bl-decorations(){ let $decorations := request:get-parameter('decorations', '') +let $decorationsType := request:get-parameter('decorationsType', '') let $cleanString := data:clean-string($decorations[1]) return if($cleanString != '') then - concat("[descendant::tei:decoNote[ft:query(.,'",($cleanString),"',data:search-options())]]") + if($decorationsType != '') then + concat("[descendant::tei:decoNote[@type='",$decorationsType,"'][ft:query(.,'",($cleanString),"',data:search-options())]]") + else concat("[descendant::tei:decoNote[ft:query(.,'",($cleanString),"',data:search-options())]]") else () -}; +}; \ No newline at end of file diff --git a/modules/search/search.xqm b/modules/search/search.xqm index 066b70f..dabb115 100644 --- a/modules/search/search.xqm +++ b/modules/search/search.xqm @@ -383,7 +383,7 @@ declare function search:bl-search-form($node as node(), $model as map(*)) {
-
+
{if(request:get-parameter('decorations', '') != '') then @@ -392,9 +392,25 @@ declare function search:bl-search-form($node as node(), $model as map(*)) {
{global:keyboard-select-menu('decorations')}
+
+ +
+ +
From c56950a65279d127264d5a187014a7cc2baa0cd5 Mon Sep 17 00:00:00 2001 From: Winona Salesky Date: Tue, 27 Aug 2024 08:57:38 -0400 Subject: [PATCH 3/3] Bump for redeploy --- expath-pkg.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/expath-pkg.xml b/expath-pkg.xml index cd41994..8d2114e 100644 --- a/expath-pkg.xml +++ b/expath-pkg.xml @@ -1,5 +1,5 @@ - + Syriac Manuscripts in the British Library