Bugzilla – Attachment 8236 Details for
Bug 7220
Add IDs to check-in message dialogs to facilitate CSS customization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7720 - Ambiguity in OPAC Details location - Followup - Add System Preference
Bug-7720---Ambiguity-in-OPAC-Details-location---Fo.patch (text/plain), 8.08 KB, created by
Kyle M Hall
on 2012-03-16 16:59:04 UTC
(
hide
)
Description:
Bug 7720 - Ambiguity in OPAC Details location - Followup - Add System Preference
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-03-16 16:59:04 UTC
Size:
8.08 KB
patch
obsolete
>From 693443eaa2e7eefcbe79faf1d2402bea9ae2b60c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 16 Mar 2012 12:56:58 -0400 >Subject: [PATCH] Bug 7720 - Ambiguity in OPAC Details location - Followup - Add System Preference > >This commit adds the system preference OpacLocationBranchToDisplay which >allows a library to control whether to display the holding library, >the home library, or both for the opac details page. > >http://bugs.koha-community.org/show_bug.cgi?id=7220 >--- > installer/data/mysql/sysprefs.sql | 3 +- > installer/data/mysql/updatedatabase.pl | 7 +++ > .../prog/en/modules/admin/preferences/opac.pref | 8 +++ > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 52 ++++++++++++------- > opac/opac-detail.pl | 2 + > 5 files changed, 52 insertions(+), 20 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index d16ff81..88759d7 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -347,4 +347,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CatalogModuleRelink',0,'If OFF the linker will never replace the authids that are set in the cataloging module.',NULL,'YesNo'); > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelay', '0', '', 'Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay', 'YesNo'); >-INSERT INTO systempreferences` (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelayCharge', '0', NULL , 'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.', 'free') >+INSERT INTO systempreferences` (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelayCharge', '0', NULL , 'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.', 'free'); >+INSERT INTO systempreferences` (variable,value,options,explanation,type) VALUES ('OpacLocationBranchToDisplay', 'holding', 'holding|home|both', 'In the OPAC, under location show which branch for Location in the record details.', 'Choice'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 3ade8bf..ff50915 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4910,6 +4910,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.07.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLocationBranchToDisplay', 'holding', 'holding|home|both', 'In the OPAC, under location show which branch for Location in the record details.', 'Choice')"); >+ print "Upgrade to $DBversion done (Added system preference OpacLocationBranchToDisplay)\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 1acc414..a7c2d72 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,14 @@ OPAC: > no: "Don't show" > - the name of the patron that has an item checked out on item detail pages on the OPAC. > - >+ - Display the >+ - pref: OpacLocationBranchToDisplay >+ choices: >+ home: "home library" >+ holding: "holding library" >+ both: "home and holding libraries" >+ - for items on the OPAC record details page. >+ - > - pref: OpacKohaUrl > default: 0 > choices: >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 44bdff5..de388b0 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -580,8 +580,14 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <table id="holdingst"> > <thead><tr> > [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] >- <th>Current Location</th> >- [% UNLESS ( singleBranchMode ) %]<th>Home Library</th>[% END %] >+ [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %] >+ <th>Current Location</th> >+ [% END %] >+ [% UNLESS ( singleBranchMode ) %] >+ [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %] >+ <th>Home Library</th> >+ [% END %] >+ [% END %] > [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %] > <th>Call Number</th> > [% IF ( itemdata_enumchron ) %]<th>Vol Info</th>[% END %] >@@ -593,29 +599,37 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > </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 %] >- <td> >- [% UNLESS ( singleBranchMode ) %] >+ [% UNLESS ( singleBranchMode ) %] >+ [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %] >+ <td> >+ [% IF ( ITEM_RESULT.branchurl ) %] >+ <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a> >+ [% ELSE %] >+ [% ITEM_RESULT.branchname %] >+ [% END %] >+ >+ </td> >+ [% END %] >+ >+ [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %] >+ <td> >+ [% IF ( ITEM_RESULT.homebranchurl ) %] >+ <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a> >+ [% ELSE %] >+ [% ITEM_RESULT.homebranchname %] >+ [% END %] >+ >+ <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span> >+ </td> >+ [% END %] >+ [% ELSE %] >+ <td> > [% IF ( ITEM_RESULT.branchurl ) %] > <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a> > [% ELSE %] > [% ITEM_RESULT.branchname %] > [% END %] > >- [% END %] >- >- [% IF ( singleBranchMode ) %] >- <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span> >- [% END %] >- </td> >- >- [% UNLESS ( singleBranchMode ) %] >- <td> >- [% IF ( ITEM_RESULT.homebranchurl ) %] >- <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a> >- [% ELSE %] >- [% ITEM_RESULT.homebranchname %] >- [% END %] >- > <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span> > </td> > [% END %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 27684d4..24372a7 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -944,4 +944,6 @@ if (C4::Context->preference('OPACLocalCoverImages') == 1) { > $template->{VARS}->{localimages} = \@images; > } > >+$template->param('OpacLocationBranchToDisplay' => C4::Context->preference('OpacLocationBranchToDisplay') ); >+ > output_html_with_http_headers $query, $cookie, $template->output; >-- >1.7.2.5
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 7220
:
6301
|
6306
|
6918
|
6957
|
8236