Koha/catalogue
Owen Leonard 63d7386ed0 Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined
The JavaScript included in cat-toolbar.inc expects several variables to
be passed to the template for use in calculations. Several scripts
do not pass the required variables to the template, leading to a JS
error.

This patch re-adds (See Bug 9823) hold count calculation to the required
scripts and copies the acquisitions-related count calculation from
detail.pl into related bibliographic detail scripts so that the
commonly-included cat-toolbar.inc can receive correct values.

To test, locate a bibliographic record which has no holds and is not
used in a current or deleted order, but which has a local cover image
attached. Check the following views to confirm there is no JavaScript
error:

- Normal
- MARC
- Labeled MARC
- ISBD
- Items
- Images (from the Images tab on the "Normal" detail page)

Next, locate a bibliographic record with no items attached which is used
in an Acquisitions order. On each of the pages listed above, choose
"Delete record" from the Edit menu. This should trigger a warning that
the record is used in an order. Cancel the deletion.

Finally, delete the order which references the bibliographic record. On
each of the pages listed above, choose "Delete record" again. This
should trigger a warning that the record is used in a deleted order.
Cancel the deletion.

I went through the test plan, everything works OK.
It resolves Bug 11831 as well.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- Printing from MARC and ISBD view works again
- No more Javascript errors found
- Deleting a record with attached order gives the correct warning,
  both for ordered and cancelled.

Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-27 16:00:35 +00:00
..
cardview.pl Bug 4330 : Adding some copyright BibLibre statements 2011-03-21 10:57:20 +13:00
detail.pl Bug 9823: QA follow-up for GetReservesFromBiblionumber calls 2014-01-30 16:23:34 +00:00
export.pl Bug 9665: QA follow up fixing tabs 2013-06-17 11:25:40 -07:00
getitem-ajax.pl Bug 7175: Allow to choose which items to receive 2012-05-21 17:46:07 +02:00
image.pl Bug 8255: allow local cover images to be cached 2012-06-25 18:12:29 +02:00
imageviewer.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
ISBDdetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
issuehistory.pl Bug 10868 - Use new DataTables include in catalog templates 2013-09-21 19:27:08 +00:00
labeledMARCdetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
MARCdetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
moredetail.pl Bug 11829: fix JavaScript error on staff client biblio details pages if template variables are undefined 2014-02-27 16:00:35 +00:00
search.pl Bug 5645: improve converting simple search to Z39.50 search 2013-10-02 14:58:54 +00:00
showmarc.pl Bug 11329: Check for MARC record existence in catalogue/showmarc 2014-01-17 15:27:39 +00:00
updateitem.pl Bug 7639: add option to forgive overdue fines when declaring items lost 2013-09-17 15:10:46 +00:00