From 879d7f0e6b94511bdbf65e181f351d3a69160085 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 21 Dec 2009 13:12:46 +0000 Subject: [PATCH] Bug 1248 - Add a "quick spine label" print to the bib item page in cataloging Turn on the system preference SpineLabelShowPrintOnBibDetails and a link for the spinelabel printer will appear for each item on catalogue/detail.pl Signed-off-by: Galen Charlton --- catalogue/detail.pl | 2 ++ installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ .../intranet-tmpl/prog/en/modules/catalogue/detail.tmpl | 4 ++++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 1a17752edf..0c3a764437 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -64,6 +64,8 @@ if (C4::Context->preference("XSLTDetailsDisplay") ) { 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail','intranet') ); } +$template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") ); + # some useful variables for enhanced content; # in each case, we're grabbing the first value we find in # the record and normalizing it diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 79dd23496c..318342a770 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -276,3 +276,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo'); INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' ); INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limit images stored in the database by the Patron Card image manager to this number.','Integer'); +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SpineLabelShowPrintOnBibDetails', '0', '', 'If turned on, a "Print Label" link will appear for each item catalogue/detail.pl to print each items spinelabel.', 'YesNo'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 7b8c30f910..c21cbb4cf4 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -279,4 +279,4 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limiter le nombre d''images stockées en base pour la photo Lecteur à cette taille.','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACPatronDetails','1','Si désactivé, l''affichage détaillé des données adhérents est désactivé à l''OPAC.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACFinesTab','1','Si désactivé, l''onglet Amende est désactivé à l''OPAC.','','YesNo'); - +INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SpineLabelShowPrintOnBibDetails', '0', '', 'If turned on, a "Print Label" link will appear for each item catalogue/detail.pl to print each items spinelabel.', 'YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c0dc925723..d5b621e770 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3391,6 +3391,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.112'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SpineLabelShowPrintOnBibDetails', '0', '', 'If turned on, a \"Print Label\" link will appear for each item catalogue/detail.pl to print each items spinelabel.', 'YesNo');"); + print "Upgrade done ( added Show Spine Label Printer on Bib Items Details preferences )\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index e7eecd266d..c9c1e97081 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -196,6 +196,7 @@ function verify_images() { Publication Details URL Copy No. + Spine Label @@ -317,6 +318,9 @@ function verify_images() { &item=">Fix Itemtype + + " >Print Label + -- 2.20.1