When helping adapt bug 38340 to our coding guidelines and general style, I found the need to rewrite a manually crafted datatable using kohaTable. What I found is that key pieces (like x-koha-request-id handling) are missing. I propose we port the intranet version into the OPAC. With some caveats.
Created attachment 181444 [details] [review] Bug 39739: Sync OPAC's datatables.js with the staff interface's version This patch overwrites the OPAC version of `datatables,js` with the one for the staff interface. A block code adding links to the columns configuration page is removed as it doesn't apply to the OPAC and produces errors in the console for missing variable definitions that would be inherited from the caller context (looking for `CAN_user_parameters_manage_column_config`). To test: 1. Apply this patch 2. Find templates using `kohaTable`: $ cd koha-tmpl/opac-tmpl $ git grep kohaTable 3. Play in the UI with those pages => SUCCESS: Tables work, nothing's broken 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 181506 [details] [review] Bug 39739: Sync OPAC's datatables.js with the staff interface's version This patch overwrites the OPAC version of `datatables,js` with the one for the staff interface. A block code adding links to the columns configuration page is removed as it doesn't apply to the OPAC and produces errors in the console for missing variable definitions that would be inherited from the caller context (looking for `CAN_user_parameters_manage_column_config`). To test: 1. Apply this patch 2. Find templates using `kohaTable`: $ cd koha-tmpl/opac-tmpl $ git grep kohaTable 3. Play in the UI with those pages => SUCCESS: Tables work, nothing's broken 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Simple resync.. agree with the singular removed function that's a staff only requirement and I've tested various tables in the OPAC. Happy it's all working.. QA script reports some new console.logs but I don't think there's anything to worry about here. Passing QA (I do think there's some tidying up we can do down the line to both the staff and opac versions of this.. feels like we're duplicating some code when I looked)
Pushed for 25.05! Well done everyone, thank you!