Bugzilla – Attachment 10248 Details for
Bug 6774
Optionally display barcode on OPAC detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6774 Display barcode on OPAC detail page(Correcting Typo)
0001-Bug-6774-Display-barcode-on-OPAC-detail-page-Correct.patch (text/plain), 5.30 KB, created by
Julian Maurice
on 2012-06-12 13:02:26 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6774 Display barcode on OPAC detail page(Correcting Typo)
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-06-12 13:02:26 UTC
Size:
5.30 KB
patch
obsolete
>From b56e682e737686606fc28fd29ff053c7eed31f60 Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@osslabs.biz> >Date: Fri, 7 Oct 2011 10:57:24 +0530 >Subject: [PATCH] Bug 6774 Display barcode on OPAC detail page(Correcting > Typo). > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Rebased to current master, works in my tests, but needs another set of eyes. >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > installer/data/mysql/sysprefs.sql | 2 ++ > installer/data/mysql/updatedatabase.pl | 6 ++++++ > .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 7 +++++++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 4 +++- > opac/opac-detail.pl | 3 ++- > 5 files changed, 20 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index c4060fe..75208df 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -369,3 +369,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsIntranet', '1', NULL , 'Allow holds to be suspended from the intranet.', 'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('SuspendHoldsOpac', '1', NULL , 'Allow holds to be suspended from the OPAC.', 'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('DefaultLanguageField008','','Fill in the default language for field 008 Range 35-37 (e.g. eng, nor, ger, see <a href="http://www.loc.gov/marc/languages/language_code.html">MARC Code List for Languages</a>)','','Free'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACShowBarcode','0','Show items barcode in holding tab','','YesNo'); >+ >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 9b02cb9..835b6f2 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -5369,6 +5369,12 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.09.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACShowBarcode','0','Show items barcode in holding tab','','YesNo')"); >+ print "Upgrade to $DBversion done (Add syspref OPACShowBarcode)\n"; >+ SetVersion ($DBversion); >+} > > =head1 FUNCTIONS > >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 e4ea15b..4f9092b 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 >@@ -108,6 +108,13 @@ 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" >+ - Show items barcode in holding tab. >+ - > - pref: OpacHighlightedWords > choices: > yes: Highlight >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index 776f82f..a79eca3 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -718,6 +718,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <th id="item_status">Status</th> > [% IF ( itemdata_itemnotes ) %]<th id="item_notes">Notes</th>[% END %] > <th id="item_datedue">Date due</th> >+ [% IF ( OPACShowBarcode ) %]<th>Barcode</th>[% END %] > [% IF holds_count.defined %] > <th>Item holds</th> > [% ELSIF show_priority %] >@@ -746,7 +747,8 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% IF ( itemdata_copynumber ) %]<td>[% ITEM_RESULT.copynumber %]</td>[% END %] > <td>[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td> > [% IF ( itemdata_itemnotes ) %]<td>[% ITEM_RESULT.itemnotes %]</td>[% END %] >- <td>[% ITEM_RESULT.datedue | $KohaDates %]</td> >+ <td>[% ITEM_RESULT.datedue | $KohaDates %]</td> >+ [% IF ( OPACShowBarcode ) %]<td>[% ITEM_RESULT.barcode %]</td>[% END %] > [% IF holds_count.defined || show_priority %] > <td> > [% IF holds_count.defined %] [% ITEM_RESULT.holds_count %] [% END %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index eaad3e2..3e830c9 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -393,7 +393,8 @@ $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); > > > >-$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); >+$template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); >+$template->param('OPACShowBarcode' => C4::Context->preference("OPACShowBarcode") ); > # change back when ive fixed request.pl > my @all_items = GetItemsInfo( $biblionumber ); > >-- >1.7.10 >
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 6774
:
5372
|
5386
|
5758
|
9985
|
10225
| 10248