[Koha] Ebook display in the opac
Katharina Klausner
katharina.klausner at aei.mpg.de
Wed Feb 6 22:22:57 NZDT 2019
Hi all,
I'm trying to make our e-book display nicer in the catalog following
these guidelines:
https://bywatersolutions.com/education/koha-electronic-resources
While the report works after some changes, the JS doesn't do anything.
Can anybody tell me if the source code is correct?
I'd be also happy about any other ideas on how to highlight ebook
records in the opac.
$(document).ready(function() {
$.getJSON("https://YOUR.KOHA.SERVER.DOMAIN.NAME/cgi-bin/koha/svc/report?id=YOUR_REPORT_ID",
function(data) {
for (var i = 0; i < data.length; i++) {
var URL = data[i][0];
$("#userresults table td a[href^='" + URL + "']").each(function(index) {
var link = $(this);
var parent = link.parent();
var grandparent = parent.parent();
link.text('Available Online');
link.addClass('ebook');
parent.children('.label').hide();
grandparent.children('.availability').hide();
grandparent.children('.actions-menu').hide();
grandparent.children('#location').hide();
});
}
});
});
Cheers
Katharina
--
Katharina Klausner
Head of the Library / Leiterin der Bibliothek
Max-Planck-Institut für Gravitationsphysik (Albert-Einstein-Institut)
Am Mühlenberg 1
D-14476 Potsdam
Tel.: +49 331 567-7400
E-Mail: katharina.klausner at aei.mpg.de <mailto:katharina.klausner at aei.mpg.de>
More information about the Koha
mailing list