diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm index 266236179b..25304fbfaf 100644 --- a/C4/UsageStats.pm +++ b/C4/UsageStats.pm @@ -160,7 +160,6 @@ sub _shared_preferences { PrefillItem z3950NormalizeAuthor SpineLabelAutoPrint - SpineLabelShowPrintOnBibDetails BlockReturnOfLostItems BlockReturnOfWithdrawnItems CalculateFinesOnReturn diff --git a/installer/data/mysql/atomicupdate/bug_34353-remove_spinelabelshowprintonbibdetails_syspref.pl b/installer/data/mysql/atomicupdate/bug_34353-remove_spinelabelshowprintonbibdetails_syspref.pl new file mode 100644 index 0000000000..32f79b6b32 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_34353-remove_spinelabelshowprintonbibdetails_syspref.pl @@ -0,0 +1,26 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "34353", + description => "Delete the SpineLabelShowPrintOnBibDetails syspref", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT INTO columns_settings + (module, page, tablename, columnname, cannot_be_toggled, is_hidden) + VALUES + ('catalogue', 'detail', 'holdings_table', 'spinelabel', 0, + (SELECT IFNULL( + (SELECT NOT value FROM systempreferences WHERE variable='SpineLabelShowPrintOnBibDetails'), + 0))) + ON DUPLICATE KEY UPDATE is_hidden=(is_hidden OR VALUES(is_hidden))} + ); + + $dbh->do(q{DELETE FROM systempreferences WHERE variable='SpineLabelShowPrintOnBibDetails'}); + + say_success( $out, "Deleted 'SpineLabelShowPrintOnBibDetails' syspref" ); + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index bb9c7c19d5..c3036df4b6 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -786,7 +786,6 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES ('SpecifyReturnDate','1'), ('SpineLabelAutoPrint','0'), ('SpineLabelFormat',''), -('SpineLabelShowPrintOnBibDetails','0'), ('staffClientBaseURL',''), ('StaffHighlightedWords','1'), ('StaffInterfaceLanguages','en'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index d350f2fca9..43455b4e74 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -42,7 +42,7 @@ [% IF Koha.Preference('EasyAnalyticalRecords') %]Host records[% END %] [% IF ( analyze ) %]Used in[% END %] [% IF Koha.Preference('UseCourseReserves') %]Course reserves[% END %] - [% IF Koha.Preference('SpineLabelShowPrintOnBibDetails') %]Spine label[% END %] + Spine label [% IF ( CAN_user_editcatalogue_edit_items ) %] [% END %] @@ -146,7 +146,6 @@ noItemTypeImages: [% Koha.Preference('noItemTypeImages') ? 1 : 0 | html %], DisplayPublishedDate: [% Koha.Preference('DisplayPublishedDate') ? 1 : 0 | html %], canreservefromotherbranches: [% Koha.Preference('canreservefromotherbranches') ? 1 : 0 | html %], - SpineLabelShowPrintOnBibDetails: [% Koha.Preference('SpineLabelShowPrintOnBibDetails') ? 1 : 0 | html %], }); Koha.addPermissions({ CAN_user_editcatalogue_edit_items: [% CAN_user_editcatalogue_edit_items ? 1 : 0 | html %], @@ -868,21 +867,17 @@ }, ] : []), - ...(Koha.prefs.SpineLabelShowPrintOnBibDetails - ? [ - { - data: "", - searchable: false, - orderable: false, - render: function (data, type, row, meta) { - return ' %s'.format( - escape_str(row.external_id), - escape_str(_("Print label")) - ); - }, - }, - ] - : []), + { + data: "", + searchable: false, + orderable: false, + render: function (data, type, row, meta) { + return ' %s'.format( + escape_str(row.external_id), + escape_str(_("Print label")) + ); + }, + }, ...(Koha.permissions.CAN_user_editcatalogue_edit_items ? [ { @@ -966,13 +961,11 @@ container.find(".bottom.pager").remove(); } - if (Koha.prefs.SpineLabelShowPrintOnBibDetails) { - $(".print-label").on("click", function (e) { - e.preventDefault(); - link = $(this).attr("href"); - openWindow(link, "Print spine label", 400, 400); - }); - } + $(".print-label").on("click", function (e) { + e.preventDefault(); + link = $(this).attr("href"); + openWindow(link, "Print spine label", 400, 400); + }); if (api.data().length) { update_columns_visibility(api, items_table_settings[tab_id], user_colvis[tab_id]); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 816dcb9695..d3a9b15d8e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -70,12 +70,6 @@ Cataloging: - (Enter in columns from the biblio, biblioitems or items tables, surrounded by < and >.) - pref: SpineLabelFormat type: textarea - - - - pref: SpineLabelShowPrintOnBibDetails - choices: - 1: Show - 0: "Don't show" - - buttons on the bibliographic details page to print item spine labels. Record structure: -