Template für das VuFind-System Web-URI der Bibliothek (inklusive Protokoll) Eventuell benötigte zusätzliche Parameter für den Login accounturl := $baseurl || "/MyResearch/"
{$form := form(., ({"username": $username, "password": $password}, get("loginParams",())[1]))}
{ string() ! (if (matches(., "Ungültige Login-?angaben")) then vl:raise-login(.) else vl:raise(.)) }
?
loggedIn := true()
vl:delete-current-books() form := request-combine({"url": x"{$accounturl}/CheckedOut", "method": "POST"}, ($renew-books!{"renewSelectedIDS[]": .("_renewID")}, "renewSelected=1", "confirm=1") ) form := request-combine({"url": x"{$accounturl}/Holds", "method": "POST"}, ($cancel-books!{"cancelSelectedIDS[]": .("_cancelID")}, "cancelSelected=1", "confirm=1") ) searchurl := $baseurl || "/Search/"
{$search-branches := $search-branch-values := (), $search-branch-id:=0, $search-request := {"url": resolve-html(@action) || "?", "method": (@method, "GET")[1]}, $daterange := (.//input[@name = "daterange[]"]/@value, "publishDate")[1] } ?
page := 1, search-keys := {"author": "Author", "title": "Title", "keywords": "Subject", "isbn": "ISN"}, search-next-page := request-combine($search-request, ( "sort=relevance", "join=AND", {"bool0[]": "AND"}, for $key in jn:keys($book) where boolean($book($key)) and exists($search-keys($key)) return {"lookfor0[]": $book($key), "type0[]": $search-keys($key)}, if (boolean($book.year)) then if (contains($book.year, "-")) then ({"daterange[]": $daterange}, { $daterange || "from": substring-before($book.year, "-"), $daterange || "to": substring-after($book.year, "-") }) else {"lookfor0[]": $book.year, "type0[]": "year"} else (), $search-branch-values[$search-branch-id] ! {"filter[]": .} )) item-statuses := (), params := join( $new-books/_recordId ! ("id%5B%5D="||.), $amp)
Accept: application/json,*/*
$page := $page + 1, for $b in $new-books let $id := $b._recordId let $status := $item-statuses[id = $id][not(missing_data = true())][1] return $book := if (empty($status)) then $b else {| $b, $status!{"statusId": switch (availability) case "true" return "available" case "false" return "lend" default return "virtual"}, $status.callnumber[.]!{"id": .} |}
$holding._orderUrl := .//a/@href[contains(., "Hold?")] {let $af := ancestor::form[1] return (vl:confirm("internal-order-confirmed", @value || $line-ending || join( ($af//div[contains(@class, "form-group")]/normalize-space()) , $line-ending )), form := form($af, .))}
{$book.status := "ordered"}
{vl:raise(.)}
{$book.status := "ordered"}
-->