[1/40] Work on C4::Labels::Layout module and tests
NOTE: This patch is the first of 40 which almost completely re-factor the
label creator code into a hopefully more scalable form. The new format is
a move in direction of OO handling labels, batches, templates, layouts, and
profiles as objects thus permitting easier implementation of features and
enhancements. It should be possible to export label data in any format one
might choose with the simple addition of a script similar to those included
which produce pdf, csv, and xml format.
One of the larger improvements is a change in workflow that results in template,
layout, and start label selection occurring just before export.
There are also various bugfixes and smaller interface improvements woven into it.
It should be noted that this patch series removes the patron card creator feature
for the present. This feature was only partially completed. A completed variation
will be submitted as a separate patch series to follow in the near future.
The following bugs and enhancements are fixed by this series of patches:
2944 Search to add items to a label batch broken
2061 labels_conf DB values: NULL vs. 0
2511 CSV format string is not cleared when unselected in the label layout editor
2515 Re-factor C4::Labels::DrawSpineText
2823 Label Generator not generating barcodes
3171 Problem due to internationalization in label-create-template.tmpl in de-DE and possibly others
3180 Active settings for label settings should be set at print time only
This work was sponsored by Foundations Bible College & Seminary, Dunn, NC USA
Michael Hafen [Wed, 26 Aug 2009 22:43:59 +0000 (16:43 -0600)]
bugfix error if memcached_servers is empty in koha-conf.xml
XML::Simple returns by default an empty hash ref if it encounters an xml tag
with no attributes or content. If memcached_servers is empty, as the installer
sets it when this feature is disabled, then we get the empty hash ref.
In checking if memcached_servers is set the empty hash ref evaluates as true.
I.E.
$servers = C4::Context->config('memcached_servers');
if ($servers) {
so we get a comiler error from memcached trying to resolve the nonexistant
server address.
Whenever a column is added to items, it must also be added
to deleteditems - otherwise, whenever an item is deleted,
it will not be saved to deleteditems.
Nicole Engard [Sun, 23 Aug 2009 09:41:34 +0000 (05:41 -0400)]
Bug 1934: Add system preference to handle editing of 'More searches'
This preference allows librarians to control which links appear
in the 'More Searches' box on the opac detail page. If the
preference is left blank the 'More Searches' menu will not apear
on the opac detail page at all.
* Fixed case of copy-and-pastitis in DBrev descrieption
* Inserted description for new syspref
NOTE: Please do not leave the system preference description blank
in the updatedatabase entry - even for non-English users, an English
description is more useful than a blank one.
Galen Charlton [Sun, 23 Aug 2009 16:51:12 +0000 (12:51 -0400)]
bug 3481 followup - improve CartToShelf
* added POD
* removed optional $barcode argument - in all cases,
itemnumber is known, and we should stick with
itemnumber when retrieving an existing item
* use ModItem to do the update so that indexer
will know to reindex bib - otherwise, can't
do an accurate search of items that are on
the shelving cart.
Galen Charlton [Sun, 23 Aug 2009 16:46:28 +0000 (12:46 -0400)]
bug 3481 followup - fix database update
Set items.permanent_location to the current value
of items.location - otherwise, the item shelving location
could get blanked as existing items are checked in.
Colin Campbell [Mon, 27 Jul 2009 15:33:00 +0000 (16:33 +0100)]
bug 3481: Allow Item Temporary Locations for Processing and Shelving.
Allows temporary locations corresponding to 'in processing' and 'shelving'
so that newly-created items, and newly-returned items do not show
immediately as a available. Three new system preferences govern the usage
of these features.
NewItemsDefaultLocation. If system pref NewItemsDefaultLocation is set to a location code,
all newly catalogued items will be set to the location set in this preference.
Location code must be a valid LOC authorized value type.
InProcessingToShelvingCart. if the system pref InProcessingToShelvingCart is turned on,
any items run through returns.pl with a location code for 'PROC', will be modified to
have a new location code of 'CART'.
ReturnToShelvingCart. If the syspref ReturnToShelvingCart is turned on,
all items returned other than confirmed holds will have a new location code of 'CART'.
Any item issued is automatically taken of the shelving cart.
Adds a cron script shelf_to_cart.pl which should be run hourly.
Updates all items with a location of CART to the item's permanent location.
The original location code is stored in the new items column 'permanent_location'.
Original Author: PTFS Contractor <dbavousett@ptfs.com>
This work co-sponsored by
Middletown Township Public Library, Middletown, NJ USA and
East Brunswick Public Library, East Brunswick, NJ USA
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Galen Charlton [Sun, 23 Aug 2009 15:26:35 +0000 (11:26 -0400)]
fix how patron_flagged gets set for opac-user.tmpl
Remove unneeded variable and get value from $borr->{'flagged'}
directly, avoiding glitch where $borr->{'flagged'} could be
set after old $patron_flagged variable was set.
Also changed default value of OPACFineNoRenewals to 99999
when upgrading existing databases so that there's no (likely)
sudden change in OPAC behavior.
This introduces a new system preference, OPACFineNoRenewals, that sets a
limit on the total fines a patron can have before they can no longer
renew their own books. opac-user.pl has been updated to obey this limit.
This work sponsered by East Brunswick Public Library, East Brunswick, NJ USA
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Galen Charlton [Sun, 23 Aug 2009 14:01:19 +0000 (10:01 -0400)]
implement bailing out of AddReturn if IndependantBranches is on
If IndependantBranches is ON and user attempts to return an
item at a library other than the item's home library, bail out.
This action, which was previously just a suggestion in the code,
is now required to ensure that the item doesn't get its
holdingbranch set to the library at which the attempt to return
the item was made.
Galen Charlton [Sun, 23 Aug 2009 13:51:50 +0000 (09:51 -0400)]
AddReturn now always updates holdingbranch
Prior to this patch, this was done only when returning
an item after it had been out on loan. Even if the
item had not been on loan, the fact that it was checked
in means that it is now in fact at the new holding library.
Galen Charlton [Sun, 23 Aug 2009 13:19:49 +0000 (09:19 -0400)]
bug 3409 follow: fix crash if holdingbranch is undef
Make _GetCircControlBranch() default to the item's home library
in the case where it otherwise would have returned the item's
holding library but that field is null.
Galen Charlton [Sun, 23 Aug 2009 13:03:11 +0000 (09:03 -0400)]
bug 3409 followup: renamed _GetCirculationBranch
New name is _GetCircControlBranch so as not to confuse
the library that a circulation transaction is taking
place at with the library that is supposed to control
circulation policy lookup.
Also fixed formatting errors in _GetCircControlBranch.
Bug fix 3409 : Adding an internal function to C4::Circulation
This patch add the use of CircControl and HomeOrHoldingBranch for return and transfert rules.
* ItemHomeLibrary goes to item{HomeOrHoldingBranch}
* PatronLibrary goes to the borrower library
* PickupLibrary depends where the items was checked out, and the actual library.
This add a little improvment that does not re-request each time the circcontrol syspref.
Darrell Ulm [Wed, 19 Aug 2009 16:39:32 +0000 (12:39 -0400)]
Bug 2652 - This patch is an extension of the slip printing feature
and will print a SHORT SLIP of today's checkouts only.
I also enhanced the normal slip to print the overdues separately as well as today's
checkouts. There is another button on the print CIRC menu. Easily another quick key
can be added, one for the regular slip and one for the short slip, i.e. today's
only.
Colin Campbell [Thu, 20 Aug 2009 10:12:57 +0000 (11:12 +0100)]
Avoid numeric comparisons with leading zeroes
Numbers in perl with leading zeros are interpreted in octal
Ensure that comparisons are done using string operators
or where appropriate use the MARC::Field method
Jane Wagner [Mon, 17 Aug 2009 14:14:44 +0000 (10:14 -0400)]
Bug 3532 show lost, damaged statuses on patron record
The patron record Details tab list of checkouts does not show lost, long overdue, claims returned, or damaged status, only that an item is overdue. Added a check for lost and damaged statuses and a display of any matching statuses to the patron Details tab.
(revised version to drop unneeded lines from moremember.tmpl file)
Michael Hafen [Thu, 13 Aug 2009 22:12:33 +0000 (16:12 -0600)]
bugfix invalid comparison to ceilingDueDate in CalcDateDue()
The comparison to check the ceilingDueDate is done in the syspref format,
which isn't a good comparison. This changes to code so the comparison is done
using iso format.
Garry Collum [Fri, 14 Aug 2009 00:31:39 +0000 (20:31 -0400)]
Bug 2505: Enabled warnings in opac-topissues.pl
Fixed resulting warnings and fixed a small bug with the timeLimit drop-down box. It would not retain its value on subsequent pages if 'no Limit' was selected as an option.
Galen Charlton [Thu, 13 Aug 2009 13:25:34 +0000 (09:25 -0400)]
bug 3204: tweaks to AWS request signing
* Add AWSPrivateKey system preference to the
Enhanced Content tab in the syspref editor
* Now warns to log if attempting to use
the Amazon API without setting AWSPrivateKey
The AWSPrivateKey syspref is describe more fully
in a previous commit, but to summarize, it should
contain the Amazon Web Services Secret Access Key
required by Amazon to sign requests to their
Product Advertising API.