Bugzilla – Attachment 5372 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]
Display barcode on OPAC detail page.
0001-Bug-6774-Display-barcode-on-OPAC-detail-page.patch (text/plain), 4.89 KB, created by
Amit Gupta
on 2011-09-09 04:52:58 UTC
(
hide
)
Description:
Display barcode on OPAC detail page.
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2011-09-09 04:52:58 UTC
Size:
4.89 KB
patch
obsolete
>From adfa7c5934327643ff6ce59a336c7942483a52bf Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@osslabs.biz> >Date: Fri, 9 Sep 2011 10:07:29 +0530 >Subject: [PATCH] Bug 6774 - Display barcode on OPAC detail page. > >Display barcode on OPAC detail normal view including in XSLT view. >--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 ++++++- > .../prog/en/modules/admin/preferences/opac.pref | 7 +++++++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 ++ > opac/opac-detail.pl | 1 + > 5 files changed, 17 insertions(+), 1 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 8407505..fae729f 100755 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -317,3 +317,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice'); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn | a|a d', NULL, NULL, 'Textarea'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACShowBarcode','0','Show items barcode in holiding tab','','YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index bdfc9ac..cf56619 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4439,7 +4439,12 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion($DBversion); > } > >- >+$DBversion = "3.05.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 holiding tab','','YesNo')"); >+ print "Upgrade to $DBversion done (Add syspref OPACShowBarcode)\n"; >+ SetVersion ($DBversion); >+} > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >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 4a7c652..c65160d 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 >@@ -86,6 +86,13 @@ OPAC: > no: "Don't show" > - the name of the patron that has an item checked out on item detail pages on the OPAC. > - >+ - 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 1950e4e..2100837 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -408,6 +408,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <th>Status</th> > [% IF ( itemdata_itemnotes ) %]<th>Notes</th>[% END %] > <th>Date Due</th> >+ [% IF ( OPACShowBarcode ) %]<th>Barcode</th>[% END %] > </tr></thead> > <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %] > <tr>[% IF ( item_level_itypes ) %]<td>[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %] >@@ -420,6 +421,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <td>[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td> > [% IF ( itemdata_itemnotes ) %]<td>[% ITEM_RESULT.itemnotes %]</td>[% END %] > <td>[% ITEM_RESULT.datedue %]</td> >+ [% IF ( OPACShowBarcode ) %]<td>[% ITEM_RESULT.barcode %]</td>[% END %] > </tr> > [% END %]</tbody> > </table> >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index e18e046..9d1ed56 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -84,6 +84,7 @@ if (C4::Context->preference("OPACXSLTDetailsDisplay") ) { > } > > $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 ); > my @items; >-- >1.6.4.2 >
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