diff --git a/add/data/xql/getAnnotationPreviews.xql b/add/data/xql/getAnnotationPreviews.xql index dc505ef63..2f3556f1b 100644 --- a/add/data/xql/getAnnotationPreviews.xql +++ b/add/data/xql/getAnnotationPreviews.xql @@ -74,7 +74,7 @@ declare function local:getTextParticipants($participants as xs:string*, $doc as let $id := substring-after($participant, '#') let $hiddenData := concat('uri:', $doc, '__$$__participantId:', $id) return - local:toJSON('text', 'Textstelle', (), (), (), teitext:getLabel($doc), (), (), (), $hiddenData, normalize-space(local:getTextNoteContent($doc, $id)), $participant) (: TODO: "Textstelle" durch sinnvolleres ersetzen :) + local:toJSON('text', 'Textstelle', (), (), (), teitext:getLabel($doc), (), (), (), (), $hiddenData, normalize-space(local:getTextNoteContent($doc, $id)), $participant) (: TODO: "Textstelle" durch sinnvolleres ersetzen :) }; declare function local:getTextNoteContent($doc as xs:string, $id as xs:string) as xs:string { @@ -126,6 +126,8 @@ declare function local:getSourceParticipants($participants as xs:string*, $doc a let $siglum := $sourceSiglum let $part := string-join(distinct-values(for $e in $elems return $e/ancestor::mei:part/@label),'-') + let $disclaimer := doc($doc)//mei:pubStmt//mei:useRestrict[@type = 'disclaimer'][if (./@xml:lang) then (./@xml:lang = $lang) else (.)]/string() => replace('\n', '
') + let $graphic := $zones[1]/../mei:graphic[@type = 'facsimile'] let $imgWidth := number($graphic/@width) let $imgHeight := number($graphic/@height) @@ -141,7 +143,7 @@ declare function local:getSourceParticipants($participants as xs:string*, $doc a where not($elems[1]/root()//mei:availability[@type = 'rwaOnline'] = 'hidden') return - local:toJSON($type, $label, $mdiv, $part, $page, $source, $siglum, $digilibBaseParams, $digilibSizeParams, $hiddenData, (), $linkUri) + local:toJSON($type, $label, $mdiv, $part, $page, $source, $siglum, $disclaimer, $digilibBaseParams, $digilibSizeParams, $hiddenData, (), $linkUri) }; declare function local:getSourceLinkTarget($elems as node()*, $zones as node()*) as xs:string { @@ -360,7 +362,7 @@ declare function local:getItemLabel($elems as element()*) as xs:string { (: Test: single url for images in annotation view :) declare function local:toJSON($type as xs:string, $label as xs:string, $mdiv as xs:string?, $part as xs:string?, - $page as xs:string?, $source as xs:string, $siglum as xs:string?, $digilibBaseParams as xs:string?, + $page as xs:string?, $source as xs:string, $siglum as xs:string?, $disclaimer 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 $configResource := doc('xmldb:exist:///db/apps/mriExistDBconf/config.xml') @@ -404,6 +406,7 @@ declare function local:toJSON($type as xs:string, $label as xs:string, $mdiv as '","page":"',$page, '","source":"',$source, '","siglum":"',$siglum, + '","disclaimer":"',$disclaimer, '","digilibURL":"', $singleURL, '","hiddenData":"',$hiddenData, '","content":"',$content, diff --git a/app/view/window/AnnotationView.js b/app/view/window/AnnotationView.js index aae56665b..fdd7e10b8 100644 --- a/app/view/window/AnnotationView.js +++ b/app/view/window/AnnotationView.js @@ -460,7 +460,7 @@ Ext.define('EdiromOnline.view.window.AnnotationView', { tplImg.compile(); var tplText = dh.createTemplate({tag:'div', cls: 'previewItem', - html:'
{1}
{2}
'}); + html:'
{1}
s{2}
'}); tplText.compile(); var elems = new Array(); @@ -479,6 +479,7 @@ Ext.define('EdiromOnline.view.window.AnnotationView', { var page = participant['page']; var source = participant['source']; var siglum = participant['siglum']; + var disclaimer = participant['disclaimer']; var part = participant['part']; // var digilibBaseParams = participant['digilibBaseParams']; // var digilibSizeParams = participant['digilibSizeParams']; @@ -487,6 +488,7 @@ Ext.define('EdiromOnline.view.window.AnnotationView', { var content = participant['content']; label = (siglum == ''?source:siglum) + (part == ''?'':', '+part);// + ": " + label; + label = disclaimer == '' ? label : label + '
'+disclaimer+'
'; if(type == 'text') { diff --git a/resources/css/EdiromOnlineRWA.css b/resources/css/EdiromOnlineRWA.css index 58e9f0da4..5e8f04653 100644 --- a/resources/css/EdiromOnlineRWA.css +++ b/resources/css/EdiromOnlineRWA.css @@ -36,6 +36,13 @@ span.uline { text-decoration: underline; } +.annotView .previewArea .previewItem .imgBox { + bottom: 40px; +} + +.annotView .previewArea .previewItem .label { + height: 32px; +} span.title { font-style: italic;