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

add filter option for "facsimile available" #361

Merged
merged 14 commits into from
Sep 16, 2020
Prev Previous commit
output zero for unavailable options
  • Loading branch information
peterstadler committed Sep 16, 2020
commit 449494f4cf4ec176eb29649e01bebd279c02c1cc
8 changes: 6 additions & 2 deletions modules/facets.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ declare
for $i in $selected
(: let $log := util:log-system-out($i):)
let $display-term := facets:display-term($facet, $i, $lang)
order by $display-term
let $freq :=
if ($selectedObjs?*[?value = $i]?frequency castable as xs:int)
then $selectedObjs?*[?value = $i]?frequency
else 0
order by $display-term
return
element option {
attribute selected {'selected'},
attribute value {$i},
$display-term || ' (' || $selectedObjs?*[?value = $i]?frequency || ')'
$display-term || ' (' || $freq || ')'
}
}
};
Expand Down