Bugzilla – Attachment 68488 Details for
Bug 19038
Remove OPACShowBarcode syspref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19038: Remove the OPACShowBarcode syspref
Bug-19038-Remove-the-OPACShowBarcode-syspref.patch (text/plain), 7.20 KB, created by
Nick Clemens (kidclamp)
on 2017-10-24 17:33:48 UTC
(
hide
)
Description:
Bug 19038: Remove the OPACShowBarcode syspref
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-10-24 17:33:48 UTC
Size:
7.20 KB
patch
obsolete
>From 8011d9ab8be40d4d5bed1bf6e0ae881771bc2920 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 4 Aug 2017 18:38:58 -0300 >Subject: [PATCH] Bug 19038: Remove the OPACShowBarcode syspref >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Followed test plan and works as expected. Functionality of patch from bug 16759 >appears intact too. > >Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/UsageStats.pm | 1 - > .../bug_19038_remove_opacshowbarcode_syspref.perl | 21 +++++++++++++++++++++ > installer/data/mysql/sysprefs.sql | 1 - > .../prog/en/modules/admin/preferences/opac.pref | 7 ------- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 5 ++--- > opac/opac-detail.pl | 1 - > t/db_dependent/UsageStats.t | 1 - > 7 files changed, 23 insertions(+), 14 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl > >diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm >index 96e79fa..7524e05 100644 >--- a/C4/UsageStats.pm >+++ b/C4/UsageStats.pm >@@ -243,7 +243,6 @@ sub BuildReport { > OpacMaintenance > OpacPublic > OpacSeparateHoldings >- OPACShowBarcode > OPACShowCheckoutName > OpacShowFiltersPulldownMobile > OPACShowHoldQueueDetails >diff --git a/installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl b/installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl >new file mode 100644 >index 0000000..5b76096 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_19038_remove_opacshowbarcode_syspref.perl >@@ -0,0 +1,21 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ my $hide_barcode = C4::Context->preference('OPACShowBarcode') ? 0 : 1; >+ >+ $dbh->do(q{ >+ DELETE FROM systempreferences >+ WHERE >+ variable='OPACShowBarcode' >+ }); >+ >+ # Configure column visibility if it isn't >+ $dbh->do(q{ >+ INSERT IGNORE INTO columns_settings >+ (module,page,tablename,columnname,cannot_be_toggled,is_hidden) >+ VALUES >+ ('opac','biblio-detail','holdingst','item_barcode',0,?) >+ }, undef, $hide_barcode); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 19038: Remove OPACShowBarcode syspref)\n"; >+} >\ No newline at end of file >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 9d36385..3636b14 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -378,7 +378,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('opacSerialDefaultTab','subscriptions','holdings|serialcollection|subscriptions','Define the default tab for serials in OPAC.','Choice'), > ('OPACSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the OPAC','Integer'), > ('OPACShelfBrowser','1','','Enable/disable Shelf Browser on item details page. WARNING: this feature is very resource consuming on collections with large numbers of items.','YesNo'), >-('OPACShowBarcode','0','','Show items barcode in holding tab','YesNo'), > ('OPACShowCheckoutName','0','','Displays in the OPAC the name of patron who has checked out the material. WARNING: Most sites should leave this off. It is intended for corporate or special sites which need to track who has the item.','YesNo'), > ('OPACShowHoldQueueDetails','none','none|priority|holds|holds_priority','Show holds details in OPAC','Choice'), > ('OpacShowRecentComments','0',NULL,'If ON a link to recent comments will appear in the OPAC masthead','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 b6954ef..e5da663 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 >@@ -165,13 +165,6 @@ OPAC: > no: "Don't show" > - a link to recent comments in the OPAC masthead. > - >- - pref: OPACShowBarcode >- default: 0 >- choices: >- yes: Show >- no: "Don't show" >- - the item's barcode on the holdings tab. >- - > - pref: GoogleIndicTransliteration > default: 0 > choices: >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 528d7d2..d7eb453 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1199,8 +1199,7 @@ > [% IF ( itemdata_itemnotes ) %] > <th id="item_notes" data-colname="item_notes" class="notes">Notes</th>[% END %] > <th id="item_datedue" data-colname="item_datedue" class="date_due">Date due</th> >- [% IF ( OPACShowBarcode ) %] >- <th id="item_barcode" data-colname="item_barcode" class="barcode">Barcode</th>[% END %] >+ <th id="item_barcode" data-colname="item_barcode" class="barcode">Barcode</th> > [% IF holds_count.defined %] > <th id="item_holds" data-colname="item_holds">Item holds</th> > [% ELSIF show_priority %] >@@ -1329,7 +1328,7 @@ > <td class="status">[% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td> > [% IF ( itemdata_itemnotes ) %]<td class="notes" property="description">[% ITEM_RESULT.itemnotes %]</td>[% END %] > <td class="date_due"><span title="[% ITEM_RESULT.datedue %]">[% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 %]</span></td> >- [% IF ( OPACShowBarcode ) %]<td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode %]</td>[% END %] >+ <td class="barcode" property="serialNumber">[% ITEM_RESULT.barcode %]</td> > [% IF holds_count.defined || show_priority %] > <td class="holds_count"> > [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index b31a00f..5afadf1 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -462,7 +462,6 @@ if ($session->param('busc')) { > > $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); > $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); >-$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); > > # adding items linked via host biblios > >diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t >index 532bea9..f778255 100644 >--- a/t/db_dependent/UsageStats.t >+++ b/t/db_dependent/UsageStats.t >@@ -496,7 +496,6 @@ sub mocking_systempreferences_to_a_set_value { > OpacMaintenance > OpacPublic > OpacSeparateHoldings >- OPACShowBarcode > OPACShowCheckoutName > OpacShowFiltersPulldownMobile > OPACShowHoldQueueDetails >-- >2.1.4
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 19038
:
65518
|
66133
|
68476
| 68488 |
68489