Bug 41582: Tidy kohaTable - opac-course-details.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-01-08 16:44:32 +01:00 committed by Lucas Gass
parent a4cb4d62a7
commit 16b68a516b
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 8 additions and 7 deletions

View File

@ -138,16 +138,17 @@
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
<script>
table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_items', 'course-items-table', 'json' ) | $raw %];
addPrefs({
OPACTableColExpandedByDefault: [% Koha.Preference('OPACTableColExpandedByDefault') ? 1 : 0 | html %],
});
</script>
<script>
$(document).ready(function() {
table_settings = [% TablesSettings.GetTableSettings( 'opac', 'course_items', 'course-items-table', 'json' ) | $raw %];
[% IF ( Koha.Preference('OPACTableColExpandedByDefault') ) %]
var responsive_display = DataTable.Responsive.display.childRowImmediate;
[% ELSE %]
var responsive_display = DataTable.Responsive.display.childRow;
[% END %]
var responsive_display = prefs.OPACTableColExpandedByDefault ? DataTable.Responsive.display.childRowImmediate : DataTable.Responsive.display.childRow;
$("#course-items-table").kohaTable(
{
dom: '<"top"<"table_controls"f>>rt<"clear">',