Skip to content

Commit

Permalink
Merge pull request #398 from srophe/main
Browse files Browse the repository at this point in the history
Bump for redeploy
  • Loading branch information
wsalesky authored Aug 27, 2024
2 parents 43df97f + c56950a commit 8979d44
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion expath-pkg.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://expath.org/ns/pkg" name="http://syriaca.org/britishLibrary" abbrev="britishLibrary" version="2.54" spec="1.0">
<package xmlns="http://expath.org/ns/pkg" name="http://syriaca.org/britishLibrary" abbrev="britishLibrary" version="2.55" spec="1.0">
<title>Syriac Manuscripts in the British Library</title>
<dependency package="http://exist-db.org/apps/shared"/>
</package>
13 changes: 13 additions & 0 deletions modules/lib/data.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -711,4 +712,16 @@ return
if($cleanString != '') then
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
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 ()
};
31 changes: 31 additions & 0 deletions modules/search/search.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,37 @@ declare function search:bl-search-form($node as node(), $model as map(*)) {
</div>
<!-- origPlaceLimit -->
</div>
<div class="form-group">
<label for="decorations" class="col-sm-2 col-md-3 control-label">Decorations: </label>
<div class="col-sm-6 col-md-5 ">
<div class="input-group">
<input type="text" id="decorations" name="decorations" class="form-control keyboard"/>
{if(request:get-parameter('decorations', '') != '') then
attribute value {request:get-parameter('decorations', '')}
else()}
<div class="input-group-btn">
{global:keyboard-select-menu('decorations')}
</div>

</div>

</div>
<label for="decorationsType" class="col-sm-1 col-md-1 control-label">Type: </label>
<div class="col-sm-3 col-md-2 ">
<select name="decorationsType" id="decorationsType" class="form-control">
<option value="" selected="selected">All</option>
<option value="border">border</option>
<option value="diagram">diagram</option>
<option value="illustration">illustration</option>
<option value="initial">initial</option>
<option value="marginal">marginal</option>
<option value="ornamentation">ornamentation</option>
<option value="paratext">paratext</option>
<option value="rubrication">rubrication</option>
<option value="other">other</option>
</select>
</div>
</div>
<div class="form-group">
<label for="shelfmark" class="col-sm-2 col-md-3 control-label">Shelfmark: </label>
<div class="col-sm-10 col-md-9 ">
Expand Down

0 comments on commit 8979d44

Please sign in to comment.