Bugzilla – Attachment 187859 Details for
Bug 30633
Move OPACHoldingsDefaultSortField to table settings configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30633: Remove OPACHoldingsDefaultSortField
Bug-30633-Remove-OPACHoldingsDefaultSortField.patch (text/plain), 5.09 KB, created by
Jonathan Druart
on 2025-10-14 10:01:25 UTC
(
hide
)
Description:
Bug 30633: Remove OPACHoldingsDefaultSortField
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-10-14 10:01:25 UTC
Size:
5.09 KB
patch
obsolete
>From 09065c6a7a0ed15b19c8a6edb2ffabec777319c8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 14 Oct 2025 11:26:27 +0200 >Subject: [PATCH] Bug 30633: Remove OPACHoldingsDefaultSortField > >It's no longer needed >--- > .../data/mysql/atomicupdate/bug_30633.pl | 19 +++++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 1 - > .../en/modules/admin/preferences/opac.pref | 7 ------- > .../bootstrap/en/modules/opac-detail.tt | 9 --------- > 4 files changed, 19 insertions(+), 17 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_30633.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30633.pl b/installer/data/mysql/atomicupdate/bug_30633.pl >new file mode 100755 >index 00000000000..5d071919389 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30633.pl >@@ -0,0 +1,19 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "30633", >+ description => "Remove system preference OPACHoldingsDefaultSortField", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ >+ DELETE FROM systempreferences >+ WHERE variable="OPACHoldingsDefaultSortField"; >+ } >+ ) == 1 >+ && say $out "Removed system preference 'OPACHoldingsDefaultSortField'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 0d77d5ba947..f692aae2e88 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -514,7 +514,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('OpacHiddenItemsExceptions','',NULL,'List of borrower categories, separated by comma, that can see items otherwise hidden by OpacHiddenItems','Textarea'), > ('OpacHiddenItemsHidesRecord','1','','Hide biblio record when all its items are hidden because of OpacHiddenItems','YesNo'), > ('OpacHighlightedWords','1','','If Set, then queried words are higlighted in OPAC','YesNo'), >-('OPACHoldingsDefaultSortField','first_column','first_column|homebranch|holdingbranch','Default sort field for the holdings table at the OPAC','choice'), > ('OpacHoldNotes','0','','Show hold notes on OPAC','YesNo'), > ('OPACHoldRequests','1',NULL,'If ON, globally enables patron holds on OPAC','YesNo'), > ('OPACHoldsHistory','0','','If ON, enables display of Patron Holds History in OPAC','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index e7645752111..8b4769c17e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -317,13 +317,6 @@ OPAC: > homebranch: 'home library' > holdingbranch: 'holding library' > - "is the logged in patrons's library. The second tab will contain all other items." >- - >- - pref: OPACHoldingsDefaultSortField >- choices: >- first_column: First column of the table >- homebranch: Home library >- holdingbranch: Holding library >- - "is the default sort field for the holdings table." > - > - Display up to > - pref: OpacMaxItemsToDisplay >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 3d16146ea60..e9bf3fb6a8a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -2002,15 +2002,6 @@ > }); > [% END %] > >- [%# Note that there is no way atm to target a column with its class name to set it as the default sort order %] >- [% IF Koha.Preference('OpacLocationBranchToDisplay') == 'home' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND item_level_itypes OR Koha.Preference('OpacLocationBranchToDisplay') == 'holding' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'holdingbranch' AND item_level_itypes OR Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND NOT item_level_itypes OR Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'holdingbranch' AND item_level_itypes %] >- var default_order_index = 1; >- [% ELSIF Koha.Preference('OpacLocationBranchToDisplay') == 'both' AND Koha.Preference('OPACHoldingsDefaultSortField') == 'homebranch' AND item_level_itypes %] >- var default_order_index = 2; >- [% ELSE %] >- var default_order_index = 0; >- [% END %] >- > [% IF ( query_desc ) %] > [% IF ( OpacHighlightedWords ) %] > var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >-- >2.34.1
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 30633
:
187856
|
187857
|
187858
|
187859
|
187886
|
187887
|
187888
|
187889