Bugzilla – Attachment 189995 Details for
Bug 41324
Tidy kohaTable block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41324: Tidy some kohaTable blocks - examples
682524a.patch (text/plain), 4.94 KB, created by
Jonathan Druart
on 2025-11-27 14:32:13 UTC
(
hide
)
Description:
Bug 41324: Tidy some kohaTable blocks - examples
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-11-27 14:32:13 UTC
Size:
4.94 KB
patch
obsolete
>From 682524ae269dd762f65f336e2cfc6c5ca45155e7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 27 Nov 2025 15:29:03 +0100 >Subject: [PATCH] Bug 41324: Tidy some kohaTable blocks - examples > >Commit using --no-verify to ease rebase >--- > .../prog/en/modules/acqui/acqui-home.tt | 5 ++++- > .../prog/en/modules/acqui/basket.tt | 9 ++++++--- > .../prog/en/modules/acqui/basketgroup.tt | 18 ++++++++++++------ > 3 files changed, 22 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >index 53966a5866e..936d28c23f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt >@@ -207,11 +207,14 @@ > [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %] > [% Asset.js("js/acquisitions-menu.js") | $raw %] > [% IF loop_budget %] >+ <script> >+ var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %]; >+ </script> >+ > <script> > dt_overwrite_html_sorting_localeCompare(); > > $(document).ready(function() { >- var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'acq_acqui-home', 'accounts', 'json' ) | $raw %]; > var oTable = $("#accounts").kohaTable({ > drawCallback: function ( oSettings ) { > if ( oSettings.aiDisplay.length == 0 ) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 39e83cc4adc..81c11eb1981 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -1406,7 +1406,6 @@ > </script> > [% END # /UNLESS (closedate) %] > <script> >- $(document).ready(function() { > var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %]; > > let supplier_report_column = table_settings.columns.find(c => c.columnname == 'supplier_report'); >@@ -1434,6 +1433,11 @@ > [% END %] > cancel_column.force_visibility = 1; > >+ let skip_confirm_reopen = [% skip_confirm_reopen ? 1 : 0 %]; >+ </script> >+ >+ <script> >+ $(document).ready(function() { > $("#orders").kohaTable({ > bKohaColumnsUseNames: true, > pagingType: "full", >@@ -1444,8 +1448,7 @@ > pagingType: "full" > }); > $("#reopenform").on("submit",function(e){ >- var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %]; >- var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?")); >+ var is_confirmed = skip_confirm_reopen || confirm(_("Are you sure you want to reopen this basket?")); > if( is_confirmed ){ return true; } > else{ return false } > }); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >index caa57b1f9ec..3ed0223b055 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >@@ -396,6 +396,11 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >+ <script> >+ let listclosed = [% listclosed ? 1 : 0 %]; >+ let grouping = [% grouping ? 1 : 0 %]; >+ </script> >+ > <script> > function submitForm(form) { > if (form.closedbg.checked == true) { >@@ -419,12 +424,13 @@ > } > > $(document).ready(function() { >- [% IF ( listclosed) %] >+ if (listclosed){ > $("#basket_groups a[href='#closed']").tab("show"); >- [% ELSE %] >+ } else { > $("#basket_groups a[href='#opened']").tab("show"); >- [% END %] >- [% UNLESS ( grouping ) %] >+ } >+ >+ if (!grouping){ > let dt_params = { > autoWidth: false, > pagingType: "full", >@@ -433,7 +439,7 @@ > $("#grouped").kohaTable(dt_params); > $("#basket_group_opened").kohaTable(dt_params); > $("#basket_group_closed").kohaTable(dt_params); >- [% ELSE %] >+ } else { > grouped = $("#grouped").kohaTable({ > dom: "t", > autoWidth: false, >@@ -448,7 +454,7 @@ > emptyTable: _("There are no ungrouped baskets"), > }, > }); >- [% END %] >+ } > > $("#basketgroupcolumns").on("click", ".addtogroup", function(){ > const row = $("#" + $(this).data("basketid") ); >-- >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 41324
:
189994
| 189995 |
189996