Skip to content

Commit

Permalink
Merge pull request #396 from srophe/main
Browse files Browse the repository at this point in the history
Bump deploy
  • Loading branch information
wsalesky authored Aug 13, 2024
2 parents f0aaf83 + d07bdd6 commit 43df97f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
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.53" spec="1.0">
<package xmlns="http://expath.org/ns/pkg" name="http://syriaca.org/britishLibrary" abbrev="britishLibrary" version="2.54" spec="1.0">
<title>Syriac Manuscripts in the British Library</title>
<dependency package="http://exist-db.org/apps/shared"/>
</package>
2 changes: 1 addition & 1 deletion modules/app.xql
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ return
<span class="glyphicon glyphicon-print" aria-hidden="true"></span>
</a>, '&#160;')
else if($f = 'email') then
(<a href="mailto:[email protected]?subject=Shelf mark:{$shelfMark} Record URI: {$url}" type="button" class="btn btn-default btn-sm" data-toggle="tooltip" title="Click to report a correction via e-mail." >
(<a href="mailto:[email protected]?subject=Shelf mark:{$shelfMark} Record URI: {$url}" type="button" class="btn btn-default btn-sm" data-toggle="tooltip" title="Click to report a correction via e-mail." >
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> Corrections
</a>, '&#160;')
else if($f = 'ghIssue') then
Expand Down
22 changes: 16 additions & 6 deletions modules/lib/data.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ declare function data:create-query($collection as xs:string?) as xs:string?{
data:element-search('idno',request:get-parameter('idno', '')),
data:relation-search(),
data:orginPlaceSearch(),
data:bl-shelfmark(),
data:ref()
)
(:
Expand Down Expand Up @@ -679,26 +680,35 @@ let $limits :=
string-join(
(
if(request:get-parameter('syrOtherLimit', '') = 'true') then
concat("ft:query(descendant::tei:quote[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:foreign[@xml:lang='syr'],'",($cleanString),"',data:search-options())")
concat("[ft:query(descendant::tei:quote[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:foreign[@xml:lang='syr'],'",($cleanString),"',data:search-options())]")
else(),
if(request:get-parameter('syrColophonsLimit', '') = 'true') then
concat("ft:query(descendant::tei:additions/descendant::tei:item[tei:label = 'Colophon'],'",($cleanString),"',data:search-options())")
concat("[ft:query(descendant::tei:additions/descendant::tei:item[tei:label = 'Colophon'],'",($cleanString),"',data:search-options())]")
else(),
if(request:get-parameter('syrExplicitsLimit', '') = 'true') then
concat("ft:query(descendant::tei:explicit,'",($cleanString),"',data:search-options())")
concat("[ft:query(descendant::tei:explicit,'",($cleanString),"',data:search-options())]")
else(),
if(request:get-parameter('syrIncipitsLimit', '') = 'true') then
concat("ft:query(descendant::tei:incipit,'",($cleanString),"',data:search-options())")
concat("[ft:query(descendant::tei:incipit,'",($cleanString),"',data:search-options())]")
else(),
if(request:get-parameter('syrFinalRubricsLimit', '') = 'true') then
concat("ft:query(descendant::tei:finalRubric,'",($cleanString),"',data:search-options())")
concat("[ft:query(descendant::tei:finalRubric,'",($cleanString),"',data:search-options())]")
else(),
if(request:get-parameter('syrRubricsLimit', '') = 'true') then
concat("ft:query(descendant::tei:title[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:rubric,'",($cleanString),"',data:search-options())")
concat("[ft:query(descendant::tei:title[@xml:lang='syr'],'",($cleanString),"',data:search-options()) or ft:query(descendant::tei:rubric,'",($cleanString),"',data:search-options())]")
else()
),' or ')
return
if($query != '' and $limits != '') then
concat("[",$limits,"]")
else ()
};

declare function data:bl-shelfmark(){
let $shelfmark := request:get-parameter('shelfmark', '')
let $cleanString := data:clean-string($shelfmark[1])
return
if($cleanString != '') then
concat("[descendant::tei:idno[@type='BL-Shelfmark' or @type='BL-Shelfmark-simplified'][ft:query(.,'",($cleanString),"',data:search-options())]]")
else ()
};
11 changes: 11 additions & 0 deletions modules/search/search.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,17 @@ declare function search:bl-search-form($node as node(), $model as map(*)) {
</div>
<!-- origPlaceLimit -->
</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 ">
<div class="input-group">
<input type="text" id="shelfmark" name="shelfmark" class="form-control keyboard"/>
{if(request:get-parameter('shelfmark', '') != '') then
attribute value {request:get-parameter('shelfmark', '')}
else()}
</div>
</div>
</div>
<!--
<hr/>
<div class="form-group">
Expand Down

0 comments on commit 43df97f

Please sign in to comment.