Bug 10288 - Fix a tiny typo on "Pending offline circulation actions"

To test:
- Apply the patch
- Go to <intranet>/cgi-bin/koha/circ/circulation-home.pl
- Verify that is says "There are no pending offline operations."
- Sign off

Or just have a look at the patch...

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3e76b1ac71a9652c06ddac09d81dcef4e5adaddf)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit de32e8d6e849ecfc13d4635c776749f5b5d4ef3e)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit de32e8d6e849ecfc13d4635c776749f5b5d4ef3e)
Bug 10367 - [3.10] update the rules and control file for wheezy

This updates the control file to use tinymce rather than
tinymce2, as tinymce2 is deprecated and no longer in Debian.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
This was written and tested by the packages maintainer.
Bug 10036 - adding header search to additem page

The add item screen lacks a header search form. This patch adds the
cataloging header search include to additem.tt.

To test, apply the patch and add items to or edit items of an existing
record. The header search form should appear with options for cataloging
search and circulation.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 646015c6471fa3d248696a55b6f18d268b5a2f60)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This should have been tagged as a bugfix...
(cherry picked from commit d22fb794dcc977c096665c4aa44ffc2185af7d46)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d22fb794dcc977c096665c4aa44ffc2185af7d46)
Bug 9507: prevent submit: refactor some code in a js file

This patch refactors some code in a js file.

Test plan:
On acqui/neworderempty.pl, acqui/orderreceive.pl and
serials/serials-edit.tt try to scan a barcode (or press enter) on the
form and check that it is not sent.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Have to note that the code for IE9 does not work. Before and after this patch.
If we refactor code, it would have been nice to resolve this too.
But I do not oppose pushing this patch.
The test uses 'an ancient Netscape property' window.Event (uppercase!) to make
the distinction between browers and event models. Some more documentation here
would be welcome too.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9e4c289d3f68aaab5d47172940e30fba0819804e)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Refactoring, but needed for 10310 inclusion
(cherry picked from commit c8ea6ba025455a26a585733fdb214942a9823a45)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit c8ea6ba025455a26a585733fdb214942a9823a45)
Bug 10310: Prevent submitting form with enter does not work with IE

I am not able to test this patch with IE...
I tested it with Chromium and FF and it works great.

This patch can be tested on the neworderempty.pl page
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit efdf30bc476ab130b0dc4767ba38d68208eb2ca7)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 84481e79527d8ad1c5a3393b716c17f550736857)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 84481e79527d8ad1c5a3393b716c17f550736857)
Bug 10310: Followup Prevent submitting form with enter does not work with IE

Check e.target.type instead of using jQuery.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c4978ef178746df06333c6704ea9e6f888b4b9ff)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5cea7144bc50477f8518ae47e78282de287c1a23)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 5cea7144bc50477f8518ae47e78282de287c1a23)
Bug 10313 Fix link to invoice from orders

Need to have invoiceid and pass it to retrieve selected
invoicenumber. Wrong data passed causing incorrect
records to be displayed

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3f4d31309203b85b5415788967d4c8cf3ce83570)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
There's a small POD error, I'll try to provide a followup for it.
(cherry picked from commit ed34661870e50e04acf61c7f687343b9a2a8f1da)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit ed34661870e50e04acf61c7f687343b9a2a8f1da)
Bug 10120: Adding a syspref to control if overdue charges are updated on return

On by default.

To Test

1/ Create an overdue item, that should get fines
2/ Return the item
3/ Check the borrowers record to see if the fine has been added/updated

Apply patch
1/ Make sure preference is set to do
Repeat steps 1-3 above

2/ Switch the preference to don't
Repeat stes 1-2
3/ Check the fine hasn't been added/updated

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass, works as described.
I would categorize this a bug fix for libraries that don't want
the new changed  behaviour that was introduced by recalculating
fines on return.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fc61bd30186b0305579c5dee0a14f9d2733cd5db)

Solved conflicts in:
	installer/data/mysql/sysprefs.sql
	installer/data/mysql/updatedatabase.pl
and changed DB version number.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1c6ab7f78575e7cc4eaee3eca397002ba9e23c8e)

Solved conflicts in:
	installer/data/mysql/sysprefs.sql
	installer/data/mysql/updatedatabase.pl
and changed DB version number.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1c6ab7f78575e7cc4eaee3eca397002ba9e23c8e)
Bug 10120: DBRev 3.10.6.001
Bug 10284: Add missing spaces between label and content in XSLT view (780/785)

To test:
- Check OPAC and intranet XSLT view for a record that contains
  780 and 785 fields.
- Verify there is no space between the label and the content of the
  field.
- Apply patch.
- Verify the display both in intranet and OPAC is a little nicer now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4c1c323232cd303c9c1e0f02c83871e1e6fcd62d)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit b459eab4c89cf507ae3108194c2ec159b04672aa)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit b459eab4c89cf507ae3108194c2ec159b04672aa)
Bug 7368: Correct three typos in history.txt

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 342463b5796825e8dd941e575694e8e4be6aa274)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 09a17abfda2f0f0a01d7b5f807e73dd77bfcb856)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 09a17abfda2f0f0a01d7b5f807e73dd77bfcb856)
Bug 10193 - Copies should be holdings as label for items on MARC view

In the OPAC MARC view, the table of holdings is labeled 'copies.' In
order to be consistent with the normal view this should be labeled
'holdings.' This patch makes this correction.

To test, apply the patch and view the MARC detail page for any record
with items. The table of holdings data at the bottom of the page should
be labeled 'Holdings.'

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 492a1a19f99c27ccbb94cab2fa4318379076bc6f)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d66e56177ec52d2278007275b261ee5e5b577ad2)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d66e56177ec52d2278007275b261ee5e5b577ad2)
Bug 10184 - Circulation History reverses sort order

Issue data is passed to the readingrec template ordered
most recent due date first. Datatables unless specified
otherwise do a presort on the data they will display
the default results in an order the reverse of what was
intended. Disabling the presort preserves the initial sort
order until the user selects a different sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 3285261d0150113e597d48a5a78aee5fdc1ebd94)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit cfdf4759dc0fe857b3dfb2fcab2868e117c5e6ff)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit cfdf4759dc0fe857b3dfb2fcab2868e117c5e6ff)
Bug 10218 - In OPAC XSLT search results, add class to 'online access'

In some cases in OPAC search results and the detail page there is a
class specific to each line of data being output (publisher, date,
subjects, etc). In other cases there is no additional class. This patch
makes modifications to a few different OPAC files in an attempt to make
them consistent with each other.

To test, apply the patch and view:

- an OPAC detail page with OPACXSLTDetailsDisplay off
- the OPAC search results page with OPACXSLTDetailsDisplay off
- the OPAC search results page with OPACXSLTDetailsDisplay on

Labels should have classes relevant to their data. To test the specific
case requested by this bug, view details/results for a record which
includes online resources (856u in MARC21).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

html changes only, passes all tests

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 45168efeb9a2c6e3268e2f002ca31af8e5e6afc8)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit cf96dd5f53eea3b585ea8a38b916a30b89c24bea)

Solved conflicts in:
	koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit cf96dd5f53eea3b585ea8a38b916a30b89c24bea)
Bug 10262 - fine calculation at checkin not respecting CircControl

The fines.pl script uses the system preference CircControl to decide
what branches circ rules to use for fine generation.

Recently, code was added to the returns system to recalculate the fine
at checkin time ( to support hourly loans ). The problem is that this
code does not respect CircControl.

Test Plan:
1) Set circ control to "the library you are logged in at"
2) Set different fines rules for two different librarys
3) Check an item out at library A, backdate the due date so it's overdue
   and will have fines.
4) Check the item in at library B
5) Observe that the fines should be generated based on library A's rules,
   but the fines will be based on library B's rules instead!
5) Apply the patch
6) Repeat steps 3 and 4.
7) Observe now that the fines should reflect the fines rules for Library A

Note: it seems counter-intuitive for the fines system to behave this way
based on the preference being set to "the library you are logged in at"
but it does make sense. The rules used are from "the library you are
logged in at" when the item is first checked out.

If the fines system really did use the rules for the library the item was
returned to, it would be easy to exploit the library system. Some Koha
using systems have branches that charge fines, and others that don't, so
a patron could just return any overdue items to a non-charging branch
to avoid ever paying fines!

Furthermore, it would mean that the fines.pl script would be using one
set of rules to charge fines, and the returns system could possibly be
using another. Since fines.pl has been around far longer, it makes sense
to assume the fines.pl behavior is canonical.

Signed-off-by: Mickey Coalwell <mcoalwell@nekls.org>
Signed-off-by: George Williams <georgew@latahlibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Merged with reservations; see comment on bug report for details.

(cherry picked from commit 040eb4016f4b01d44f87ab6aca515c6917f73479)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 85536020599855d6ae89aa1d66e05adc1c705f0e)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 85536020599855d6ae89aa1d66e05adc1c705f0e)
bug 10292: improve fallback logic for picking XSLT

This patch fixes a bug whereby XSLT files from the
prog theme would be used (for English OPACs and staff
interfaces) even if the user had created and enabled a
custom theme that provided override XSLT files.

This patch provides a clearer implementation of the fallback
logic and adds test cases.

To reproduce the bug:

[1] Set OPACXSLTDetailsDisplay to 'default' and English as the OPAC
    language.
[2] Create a new OPAC theme, including copying the XSLT files.
[3] Set opactheme to the new theme.
[4] Make a change to koha-tmpl/opac-tmpl/NEWTHEME/en/xslt/MARC21slim2OPACDetail.xsl
[5] View a bib record in the OPAC. The change made in the previous step
    is not reflected.

To test after applying the patch:

[6] Reload the bib record in the OPAC. The change made in step 4 should
    now be reflected.
[7] (To be thorough) Go through the test plan for bug 8947
    and verify that there is no regression.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b0eeb00d48892c2ea7f42d787dae10364537ed6f)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit d68bb6b8c03c1d538b29448b5baf0dfb13cca736)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit d68bb6b8c03c1d538b29448b5baf0dfb13cca736)
Bug 10359: transform masthead dropdown after user JS for CCSR

Since libraries may want to customize the options in the masthead search
dropdown, which is done via dropdown, it would be better if the select
box were transformed *after* user javascript was run.

To test:
1) Switch to the CCSR OPAC theme.
2) Add some Javascript to your OpacUserJS that will modify the masthead
   search dropdown, such as:
   $("select[name='idx']").append("<option value='Host-item,wrdl'>Journal title</option>");
3) Note that when you view the OPAC, the results in the dropdown are unchanged.
4) Apply patch.
5) Note that your new option now shows up.
6) Sign off.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ff2b4d1ff5992989478f83517d95f957c4af50d4)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 8d27bd783ebb353aea3d1a428b42b0b012b9d5a0)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 8d27bd783ebb353aea3d1a428b42b0b012b9d5a0)
Bug 10381: POD lines of GetBasketsInfosByBookseller

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5bf996f68d2279ae9582b338b3d094ad20f7596c)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1530cee8a50006bbaa013676917086175401968c)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 1530cee8a50006bbaa013676917086175401968c)
Revert "Bug 10381: POD lines of GetBasketsInfosByBookseller"

This reverts commit 6db304f2db231c2fe491d7da273f0ca75daee8d1.

My mistake, I first need Bug 9824.
Bug 9824 - Hide basket with no expected items in basqket list by bookseller

Before patch you will see in acqui/booksellers.pl all the baskets ever
created.
After the patch you will see in acqui/booksellers.pl only the basket
with expected items.

Test plan :
* Create a basket with some orders lines
You should see this basket in acqui/booksellers.pl
* receive or cancel all the line in this basket
This basket shouldn't appear any more in acqui/booksellers.pl

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit a0a6d6e64bca28b4d9bc668f614ed286b07327f9)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
(cherry picked from commit e1dbabdb7a3bc0ec92d629b862a077f1b6594fbb)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit e1dbabdb7a3bc0ec92d629b862a077f1b6594fbb)

As this is requested, and applies well in 3.10.x, I push it with
it's followups.