Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove 'no portrait available' tooltip from work icons #476

Merged
merged 2 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions modules/img.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,11 @@ declare
return
element {node-name($node)} {
$node/@*[not(local-name(.) = ('src', 'title', 'alt'))],
attribute title {$model('portrait')('caption')},
attribute alt {$model('portrait')('caption')},
if($model('portrait')('caption')) then (
attribute title {$model('portrait')('caption')},
attribute alt {$model('portrait')('caption')}
)
else attribute alt {'Preview Icon'},
attribute src {$url}
}
else $node
Expand All @@ -491,9 +494,13 @@ declare %private function img:get-generic-portrait($model as map(*), $lang as xs
else if($model('doc')//mei:term/data(@class) = 'http://d-nb.info/standards/elementset/gnd#MusicalWork') then 'musicalWork'
else if(config:is-work($model('docID')) and not($model('doc')//mei:term/data(@class) = 'http://d-nb.info/standards/elementset/gnd#MusicalWork')) then 'otherWork'
else $model('doc')//tei:sex/text()
let $caption :=
if(config:is-person($model('docID')))
then 'no portrait available'
else ()
return
map {
'caption' : 'no portrait available',
'caption' : $caption,
'linkTarget' : (),
'source' : 'Carl-Maria-von-Weber-Gesamtausgabe',
'url' : function($size) {
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080005.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080005.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080033.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080033.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080043.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080043.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080052.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080052.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080059.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080059.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080114.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080114.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080124.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080124.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080126.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080126.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080135.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080135.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080146.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080146.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080158.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080158.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/orgs/A080219.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A080219.txt">Plain Text <i class="fa fa-

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_orgs_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/places/A130291.html
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A130291.txt">Plain Text <i class="fa fa-
<div class="col-md-3 col-sm-6">
<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_places_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_places_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020002.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002068/Werke/A020002.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020010.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002068/Werke/A020010.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020034.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002068/Werke/A020034.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020072.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002068/Werke/A020072.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020081.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002068/Werke/A020081.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020209.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002068/Werke/A020209.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020456.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A000584/Werke/A020456.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A020772.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A001864/Werke/A020772.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A021059.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A001420/Werke/A021059.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_works_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_works_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A021447.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A000354/Werke/A021447.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A021531.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002025/Werke/A021531.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down
2 changes: 1 addition & 1 deletion testing/expected-results/works/A021539.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ <h4><a href="/exist/apps/WeGA-WebApp/de/A002361/Werke/A021539.xml?format=mei_all

<div class="portrait large">
<div class="front">
<img class="img-fluid" title="no portrait available" alt="no portrait available" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
<img class="img-fluid" alt="Preview Icon" src="/exist/apps/WeGA-WebApp/resources/img/icons/icon_musicalWorks_gross.png" />
</div>
<div class="back colored">
<h3>Bildquelle</h3>
Expand Down