https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39196
--- Comment #6 from Eric Phetteplace <[email protected]> --- If others are interested in it, below is an excerpt from our OpacUserJS where we add a note about new ILL requests in the "pending area". It could be adapted to also show pending ILL requests. I imagine the patch for this bug would be similar, if the intent is to use the REST API. ------------ if (location.pathname.match('/cgi-bin/koha/mainpage.pl') || location.pathname == "/") { $(() => { // if there are ILL requests with status = NEW if ($('.biglinks-list .icon_ill').length) { fetch("/api/v1/ill/requests?_order_by=-requested_date") .then(response => response.json()) .then(requests => { const numNewRequests = requests.filter(r => r.status === "NEW").length if (numNewRequests) { // add a link beside suggestions/article requests pending const areaPending = $('#area-pending') const newILLHTML = `<div class="pending-info" id="illrequests_pending">New ILL requests: <a href="/cgi-bin/koha/ill/ill-requests.pl"> <span class="pending-number-link">${numNewRequests}</span></a></div>` if (areaPending.length) { areaPending.append(newILLHTML) } else { $('.row .col-sm-12').eq(0).append(`<div id="area-pending" class="page-section">${newILLHTML}</div>`) } } }) .catch(e => { console.error("Error fetching ILL requests from Koha REST API", e) }) } }) } -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
