Bugzilla – Attachment 191130 Details for
Bug 41571
Tidy kohaTable block - labels
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41571: Tidy kohaTable - labels/label-edit-batch.tt
c51b71b.patch (text/plain), 3.38 KB, created by
Jonathan Druart
on 2026-01-09 14:48:40 UTC
(
hide
)
Description:
Bug 41571: Tidy kohaTable - labels/label-edit-batch.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-09 14:48:40 UTC
Size:
3.38 KB
patch
obsolete
>From c51b71b99a6352b38156da97d17e06821fed7898 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jan 2026 12:39:35 +0100 >Subject: [PATCH] Bug 41571: Tidy kohaTable - labels/label-edit-batch.tt > >--- > .../en/modules/labels/label-edit-batch.tt | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >index 82a4eb7f84f..5a5e6d7572c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >@@ -231,6 +231,11 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("js/labels-menu.js") | $raw %] >+ <script> >+ const batch_id = "[% batch_id | html %]"; >+ const has_entries = [% table_loop ? 1 : 0 | html %]; >+ </script> >+ > <script> > function dofocus() { // named function req'd for body onload event by some FF and IE7 security models > $(".focus:last").select(); >@@ -278,7 +283,7 @@ > function Add() { > var number_list = document.getElementById("number_list"); > if (number_list.value == '') { >- window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=[% batch_id | html %]&type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes'); >+ window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=" + batch_id + "&type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes'); > } else { > document.forms["add_by_number"].submit(); > } >@@ -290,7 +295,7 @@ > } > > function DeDuplicate() { >- window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&batch_id=[% batch_id | html %]"; >+ window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&batch_id=" + batch_id; > } > > function Xport(mode) { >@@ -314,9 +319,9 @@ > alert(_("Please select at least one label to export.")); > return; // no batch selected > } >- location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]&" + getstr; >+ location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&" + getstr; > } else if (mode == 'batch') { >- location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id | html %]"; >+ location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id; > } else { > // some pass-through error trapping just in case... > } >@@ -340,11 +345,11 @@ > > $(document).ready(function() { > $('.sidebar_menu a[href$="/cgi-bin/koha/labels/label-home.pl"]').addClass("current"); >- [% IF table_loop %] >+ if (has_entries){ > $("#description").show(); >- [% ELSE %] >+ } else { > $("#description").hide(); >- [% END %] >+ } > $("#batcht").kohaTable({ > dom: '<"dt-info"i><"top pager"<"table_entries"lp><"table_controls"f>>tr<"bottom pager"ip>', > autoWidth: false, >-- >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 41571
: 191130 |
191131
|
191132