Bugzilla – Attachment 18415 Details for
Bug 10343
Rename OpacShowHoldNotes to OpacHoldNotes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10343: Rename OpacShowHoldNotes to OpacHoldNotes
Bug-10343-Rename-OpacShowHoldNotes-to-OpacHoldNote.patch (text/plain), 8.19 KB, created by
Marcel de Rooy
on 2013-05-27 08:40:14 UTC
(
hide
)
Description:
Bug 10343: Rename OpacShowHoldNotes to OpacHoldNotes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-05-27 08:40:14 UTC
Size:
8.19 KB
patch
obsolete
>From 6a7c6ab3d2d3f6873885b6fa20f36f9bb831e684 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 27 May 2013 10:23:06 +0200 >Subject: [PATCH] Bug 10343: Rename OpacShowHoldNotes to OpacHoldNotes >Content-Type: text/plain; charset=utf-8 > >As QA followup on report 9722. Built on top of another followup report 10321. > >Test plan: >Run the db revision included in this patch. >Enable OpacHoldNotes. Check that you can add a hold note on opac-reserve. >Do you see it on opac-user and in staff on catalog detail of that biblio? >Do a grep on ShowHoldNotes on the Koha code: grep -i ignores case. You should >find three occurrences only in updatedatabase.pl (the old dbrev and this dbrev >renaming them). These are fine. >--- > installer/data/mysql/sysprefs.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 7 +++++++ > .../prog/en/modules/admin/preferences/opac.pref | 2 +- > .../opac-tmpl/prog/en/modules/opac-reserve.tt | 6 +++--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 4 ++-- > opac/opac-reserve.pl | 4 ++-- > opac/opac-user.pl | 2 +- > 7 files changed, 17 insertions(+), 10 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 31485bc..fbd0387 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -425,5 +425,5 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch''s items to emphasize. If PatronBranch, emphasize the logged in user''s library''s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha''s Apache configuration file.','Choice'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UniqueItemFields', 'barcode', 'Space-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table', '', 'Free'); > INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo'); >-INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowHoldNotes',0,'Show hold notes on OPAC','','YesNo'); >+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index f3a90d8..146ec99 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6983,6 +6983,13 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( > SetVersion($DBversion); > } > >+$DBversion = "3.13.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("UPDATE systempreferences SET variable='OpacHoldNotes' WHERE variable='OpacShowHoldNotes'"); >+ print "Upgrade to $DBversion done (Bug 10343: Rename OpacShowHoldNotes to OpacHoldNotes)\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 81824e4..90295ef 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 >@@ -418,7 +418,7 @@ OPAC: > no: Don't display > - the list of authors/subjects in a popup for a combined search on OPAC detail pages. > - >- - pref: OpacShowHoldNotes >+ - pref: OpacHoldNotes > default: 0 > choices: > yes: Allow >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >index acff3bc..42d85d4 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >@@ -272,7 +272,7 @@ > <th>Hold starts on date</th> > [% END %] > <th>Hold not needed after</th> >- [% IF ( OPACShowHoldNotes ) %]<th>Notes</th>[% END %] >+ [% IF ( OpacHoldNotes ) %]<th>Notes</th>[% END %] > [% IF ( OPACItemHolds ) %] > <th id="place_on_hdr" style="display:none">Place on</th> > [% END %] >@@ -359,7 +359,7 @@ > <a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('expiration_date_[% bibitemloo.biblionumber %]').value='';return false;">Clear date</a></p> > </td>[% END %] > >- [% IF ( OPACShowHoldNotes ) %][% IF ( bibitemloo.holdable ) %]<td><input type="button" id="shownotes_[% bibitemloo.biblionumber %]" class="shownotes" value="Edit notes"/></td>[% END %][% END %] >+ [% IF ( OpacHoldNotes ) %][% IF ( bibitemloo.holdable ) %]<td><input type="button" id="shownotes_[% bibitemloo.biblionumber %]" class="shownotes" value="Edit notes"/></td>[% END %][% END %] > > [% IF ( bibitemloo.holdable ) %] > <!-- HOLD ABLE --> >@@ -437,7 +437,7 @@ > [% END %] > </tr> > >- [% IF ( OPACShowHoldNotes ) %] >+ [% IF ( OpacHoldNotes ) %] > [% IF ( bibitemloo.holdable ) %] > <tr class="notesrow" id="notesrow_[% bibitemloo.biblionumber %]"> > <td> </td> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index f1d3435..9ec4891 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -359,7 +359,7 @@ $.tablesorter.addParser({ > <thead><tr> > <th class="{sorter:'articles'}">Title</th> > <th>Placed on</th> >- [% IF OpacShowHoldNotes %]<th>Notes</th>[% END %] >+ [% IF OpacHoldNotes %]<th>Notes</th>[% END %] > <th>Expires on</th> > <th>Pick up location</th> > [% IF ( showpriority ) %] >@@ -387,7 +387,7 @@ $.tablesorter.addParser({ > [% RESERVE.author %] > </td> > <td class="reservedate">[% RESERVE.reservedate | $KohaDates %]</td> >- [% IF OpacShowHoldNotes %]<td class="reservenotes">[% RESERVE.reservenotes %]</td>[% END %] >+ [% IF OpacHoldNotes %]<td class="reservenotes">[% RESERVE.reservenotes %]</td>[% END %] > <td class="expirationdate">[% IF ( RESERVE.expirationdate ) %][% RESERVE.expirationdate | $KohaDates %][% ELSE %]Never expires[% END %]</td> > <td class="branch">[% RESERVE.branch %]</td> > [% IF ( showpriority ) %] >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index b633d3d..be72e84 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -556,8 +556,8 @@ if (! $template->{VARS}->{'singleBranchMode'}) { > $itemTableColspan--; > } > $itemTableColspan-- if !$show_holds_count && !$show_priority; >-my $show_notes=C4::Context->preference('OPACShowHoldNotes'); >-$template->param(OPACShowHoldNotes=>$show_notes); >+my $show_notes=C4::Context->preference('OpacHoldNotes'); >+$template->param(OpacHoldNotes=>$show_notes); > $itemTableColspan-- if !$show_notes; > $template->param(itemtable_colspan => $itemTableColspan); > >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index bb976f6..7b2f25e 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -364,7 +364,7 @@ $template->param( > $template->param( > SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'), > AutoResumeSuspendedHolds => C4::Context->preference('AutoResumeSuspendedHolds'), >- OpacShowHoldNotes => C4::Context->preference('OpacShowHoldNotes'), >+ OpacHoldNotes => C4::Context->preference('OpacHoldNotes'), > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >1.7.7.6
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 10343
:
18415
|
18473
|
18474
|
18475
|
18757
|
18758
|
18761
|
18762