Bug 40080: Fix search position on course reserves page

This patch corrects the position of the table search box on the course
reserves details pages by warpping the presented table in a 'rows' class
div.

We also update the search box dom configuration in the datatable itself
to match that of other opac tables.

Test plan
1) Add some course reserves to a course
2) View that course on the OPAC
3) Note that the search box for the table is aligned to the top of the
   main section of the page and over to the far right almost off screen.
4) Apply this patch
5) Confirm that the display of the search box is now nested just above
   the table in the same location as the course reserves list page

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32242f438a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Martin Renvoize 2025-06-05 10:54:14 +01:00 committed by Paul Derscheid
parent 7c06904612
commit d0dc3ffd71
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 3 additions and 1 deletions

View File

@ -60,6 +60,7 @@
</div>
[% IF ( course_reserves ) %]
<div class="rows">
<table id="course-items-table" class="table table-bordered table-striped table-condensed">
<caption class="sr-only">Courses</caption>
<thead>
@ -117,6 +118,7 @@
[% END %]
</tbody>
</table>
</div>
[% ELSE %]
<br style="clear:both;" />
<div class="alert alert-info">
@ -141,7 +143,7 @@
table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_items', 'course-items-table', 'json' ) | $raw %];
$("#course-items-table").kohaTable(
{
dom: '<"top"<"table_controls"f>>t',
dom: '<"top"<"table_controls"f>>rt<"clear">',
sorting: [[1, "asc"]],
language: {
search: "_INPUT_",