Bugzilla – Attachment 191185 Details for
Bug 41582
Tidy kohaTable block - opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41582: Tidy kohaTable - opac-suggestions.tt
21a2385.patch (text/plain), 3.08 KB, created by
Jonathan Druart
on 2026-01-09 14:54:58 UTC
(
hide
)
Description:
Bug 41582: Tidy kohaTable - opac-suggestions.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-09 14:54:58 UTC
Size:
3.08 KB
patch
obsolete
>From 21a2385ea6c6068c7b0fc199b8a4e4e5ba3768a3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 9 Jan 2026 10:30:36 +0100 >Subject: [PATCH] Bug 41582: Tidy kohaTable - opac-suggestions.tt > >--- > .../bootstrap/en/modules/opac-suggestions.tt | 26 ++++++++++++++----- > 1 file changed, 19 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index a409fc97131..4c23680ad26 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -570,7 +570,11 @@ > [% END %] > [% INCLUDE 'datatables.inc' %] > <script> >- [% IF ( loggedinusername ) %] >+ const loggedinusername = [% ( loggedinusername ) ? 1 : 0 | html %]; >+ </script> >+ >+ [% IF ( loggedinusername ) %] >+ <script> > function enableCheckboxActions(){ > // Enable/disable controls if checkboxes are checked > var checkedBoxes = $(".cb:checked"); >@@ -582,9 +586,11 @@ > $(".selections-toolbar .links a").addClass("disabled"); > } > } >- [% END %] >+ </script> >+ [% END %] > >- [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %] >+ [% IF Koha.Preference( 'OPACSuggestionAutoFill' ) %] >+ <script> > $(function() { > $('#isbn').autofill({ > 'volumeInfo.title': {target: 'title', effect: 'flash'}, >@@ -596,13 +602,18 @@ > 'kind': {target: 'itemtype', handle: function(t,v) { t.val('BK'); },}, > }); > }); >- [% END %] >+ </script> >+ [% END %] > >+ <script> > $(function() { > $("#suggestt").kohaTable({ > order: [[ 1, "asc" ]], > columnDefs: [ >- [% IF ( loggedinusername ) %]{ targets: [ 0 ], orderable: false, searchable: false }[% END %], >+ ...( loggedinusername >+ ? [{ targets: [ 0 ], orderable: false, searchable: false }] >+ : [] >+ ), > { className: 'dtr-control', orderable: false, targets: -1 }, > { responsivePriority: 1, targets: 1 } > ], >@@ -613,7 +624,8 @@ > } > }, > }); >- [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>"); >+ if (loggedinusername){ >+ $("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>"); > $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>"); > $("#CheckAll").on("click",function(e){ > e.preventDefault(); >@@ -665,7 +677,7 @@ > }); > } > }); >- [% END %] >+ } > }); > </script> > [% END %] >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41582
:
191174
|
191175
|
191176
|
191177
|
191178
|
191179
|
191180
|
191181
|
191182
|
191183
|
191184
| 191185 |
191186
|
191187
|
191188