Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Edirom-Online
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Edirom
Edirom-Online
Commits
6ea41e04
Commit
6ea41e04
authored
2 years ago
by
Nikolaos Beer
Browse files
Options
Downloads
Patches
Plain Diff
Hide source image previews of restricted sources in annotation view, see
#7
parent
1c673809
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
add/data/xql/getAnnotationPreviews.xql
+19
-6
19 additions, 6 deletions
add/data/xql/getAnnotationPreviews.xql
with
19 additions
and
6 deletions
add/data/xql/getAnnotationPreviews.xql
+
19
−
6
View file @
6ea41e04
...
...
@@ -33,6 +33,8 @@ import module namespace edition="http://www.edirom.de/xquery/edition" at "../xqm
import module namespace functx = "http://www.functx.com" at "../xqm/functx-1.0-nodoc-2007-01.xq";
import module namespace console="http://exist-db.org/xquery/console";
declare namespace exist="http://exist.sourceforge.net/NS/exist";
declare namespace request="http://exist-db.org/xquery/request";
declare namespace mei="http://www.music-encoding.org/ns/mei";
...
...
@@ -348,12 +350,23 @@ declare function local:toJSON($type as xs:string, $label as xs:string, $mdiv as
$page as xs:string?, $source as xs:string, $siglum as xs:string?, $digilibBaseParams as xs:string?,
$digilibSizeParams as xs:string?, $hiddenData as xs:string?, $content as xs:string?, $linkUri as xs:string?) as xs:string {
let $digilibURL := concat($digilibBaseParams, 'dw=600&dh=600', $digilibSizeParams)
let $single-serv-registerURL := doc('xmldb:exist:///db/apps/mriExistDBconf/config.xml')//conf:single-serv-registerURL/string()
let $singel-serv-resolveURL := doc('xmldb:exist:///db/apps/mriExistDBconf/config.xml')//conf:single-serv-resolveURL/string()
let $docuservURL := doc('xmldb:exist:///db/apps/mriExistDBconf/config.xml')//conf:docuservURL/string()
let $docuservURLinternal := doc('xmldb:exist:///db/apps/mriExistDBconf/config.xml')//conf:docuservURLinternal/string()
let $singleURL := if (matches($digilibBaseParams, 'music/editions'))
let $configResource := doc('xmldb:exist:///db/apps/mriExistDBconf/config.xml')
let $sourcesRestricted := doc($configResource//conf:sourcesRestricted/text())//mei:source/@corresp/string()
let $sourcesHidden := doc($configResource//conf:sourcesHidden/text())//mei:source/@corresp/string()
let $docuservLockedSourcePath := $configResource//conf:docuservLockedSourcePath/text()
let $docuservURL := $configResource//conf:docuservURL/string()
let $env := $configResource//conf:env/text()
let $digilibURL :=
if ($env = ('dev', 'stage'))
then (concat($digilibBaseParams, 'dw=600&dh=600', $digilibSizeParams))
else if (exists($sourcesRestricted) and not(functx:contains-any-of($digilibBaseParams, ($sourcesRestricted))))
then (concat($digilibBaseParams, 'dw=600&dh=600', $digilibSizeParams))
else (concat($docuservURL, $docuservLockedSourcePath, '?dw=600&dh=600&mo=fit'))
let $single-serv-registerURL := $configResource//conf:single-serv-registerURL/string()
let $singel-serv-resolveURL := $configResource//conf:single-serv-resolveURL/string()
let $docuservURLinternal := $configResource//conf:docuservURLinternal/string()
let $singleURL :=
if (matches($digilibBaseParams, 'music/editions'))
then
try {
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment