Bugzilla – Attachment 7780 Details for
Bug 7557
Change hardcoded routing list note into a system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7557: Change hardcoded routing list note into a system preference
Bug-7557-Change-hardcoded-routing-list-note-into-a.patch (text/plain), 6.37 KB, created by
Chris Cormack
on 2012-02-21 01:58:51 UTC
(
hide
)
Description:
Bug 7557: Change hardcoded routing list note into a system preference
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-02-21 01:58:51 UTC
Size:
6.37 KB
patch
obsolete
>From 1ce96863c2f69418d0238af9b89a6490a3595bca Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sun, 19 Feb 2012 12:31:14 +0100 >Subject: [PATCH] Bug 7557: Change hardcoded routing list note into a system > preference > >Adds a new system preference RoutingListNote under the Serials tab. > >The note will display above the note from the subscription and replace >the current hardcoded note: > >"Notes: Please return this item promptly as others are waiting for it." > >The patch adds unique ids to all notes and the note in general, so it >can be styled using CSS. > >Also corrects the routing slip template to follow the HTML4 rule. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 ++++ > .../prog/en/modules/admin/preferences/serials.pref | 5 +++ > .../en/modules/serials/routing-preview-slip.tt | 36 ++++++++++++------- > serials/routing-preview.pl | 1 + > 5 files changed, 37 insertions(+), 13 deletions(-) > >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 0cc79b2..08f6050 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -336,3 +336,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('BorrowerRenewalPeriodBase', 'now', 'Set whether the borrower renewal date should be counted from the dateexpiry or from the current date ','dateexpiry|now','Choice'); > INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('AllowItemsOnHoldCheckout',0,'Do not generate RESERVE_WAITING and RESERVED warning when checking out items reserved to someone else. This allows self checkouts for those items.','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacExportOptions','bibtex|dc|marcxml|marc8|utf8|marcstd|mods|ris','Define export options available on OPAC detail page.','','free'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RoutingListNote','To change this note edit <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped">RoutlingListNote</a> system preference.','Define a note to be shown on all routing lists','70|10','Textarea'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d2d9d97..05ed0d5 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4712,6 +4712,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,explanation,options,type) VALUES('RoutingListNote','To change this note edit <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped">RoutlingListNote</a> system preference.','Define a note to be shown on all routing lists','70|10','Textarea');"); >+ print "Upgrade to $DBversion done (Added system preference RoutingListNote for adding a general note to all routing lists.)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >index 58db404..1950ba6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref >@@ -26,6 +26,11 @@ Serials: > no: "Don't place" > - received serials on hold if they are on a routing list. > - >+ - 'Include following note on all routing lists:' >+ - pref: RoutingListNote >+ type: textarea >+ class: code >+ - > - Show the > - pref: StaffSerialIssueDisplayCount > class: integer >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tt >index be5084e..f4200e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/routing-preview-slip.tt >@@ -1,5 +1,5 @@ > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Serials › Routing Slip Preview</title> >+<title>Koha › Serials › Routing slip preview</title> > [% INCLUDE 'doc-head-close.inc' %] > > <style type="text/css"> >@@ -13,21 +13,31 @@ > > <div id="custom-doc" class="yui-t7"> > <div id="bd"> >- > > <table> >-<tr><td colspan="3"><h3>[% libraryname %]</h3></td></tr> >-<tr><td colspan="3"><b>Title:</b> [% title |html %]<br /> >-[% issue %]</td></tr> >-<tr><td><b>Name</b></td> >- <td><b>Date Due</b></td></tr> >-[% FOREACH memberloo IN memberloop %] >- <tr><td>[% memberloo.name %]</td> >- <td> </td></tr> >-[% END %] >+ <tr> >+ <td colspan="2"><h3>[% libraryname %]</h3></td> >+ </tr> >+ <tr> >+ <td colspan="2"><b>Title:</b> [% title |html %]<br />[% issue %]</td> >+ </tr> >+ <tr> >+ <td><b>Name</b></td> >+ <td><b>Date due</b></td> >+ </tr> >+ [% FOREACH memberloo IN memberloop %] >+ <tr> >+ <td>[% memberloo.name %]</td> >+ <td> </td> >+ </tr> >+ [% END %] > </table> >-<p><b>Notes:</b> Please return this item promptly as others are waiting for it. >-<br />[% routingnotes %]</p> >+ >+<div id="routingnotes"> >+ <p id="generalroutingnote">[% generalroutingnote %]</p> >+ <p id="routingnote">[% routingnotes %]</p> >+</div> >+ > <div id="slip-block-links" class="noprint"> > <a class="button" href="javascript:window.print();self.close()">Print</a> <a class="button" href="javascript:self.close()">Close</a> > </div> >diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl >index 6746f53..356e629 100755 >--- a/serials/routing-preview.pl >+++ b/serials/routing-preview.pl >@@ -131,6 +131,7 @@ $template->param( > subscriptionid => $subscriptionid, > memberloop => $memberloop, > routingnotes => $routingnotes, >+ generalroutingnote => C4::Context->preference('RoutingListNote'), > hasRouting => check_routing($subscriptionid), > ); > >-- >1.7.5.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 7557
:
7756
|
7757
|
7780
|
8170
|
8498
|
8504
|
8505