Bug 29939: Use the REST API for ratings
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 16 Aug 2022 10:14:06 +0000 (12:14 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 22 Aug 2022 14:31:15 +0000 (11:31 -0300)
commit7e991d0702dac22e1a578b9544c2029f73a34f17
treea8873d02e394064035f8361fd99daf851067e30e
parent9c11c588c11bf50888796a6d1fe175a2ddc853bd
Bug 29939: Use the REST API for ratings

This patch replaces opac-ratings-ajax.pl with a new REST API route
POST /public/biblios/42/ratings

Note that we could go further and refactor the 'start_rating' select
code.

Test plan:
Test the "star ratings" feature at the OPAC, on the different page
where it's displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/REST/V1/Biblios.pm
api/v1/swagger/paths/biblios.yaml
api/v1/swagger/swagger.yaml
koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/bootstrap/js/global.js
koha-tmpl/opac-tmpl/bootstrap/js/ratings.js
opac/opac-ratings-ajax.pl [deleted file]
t/db_dependent/api/v1/biblios.t