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>
Bug 9424: Move JavaScript out of header include

This patch removes JavaScript "onlick" attributes from header.inc and
moves the functionality to staff-global.js. This is in keeping with the
idea of progressive enhancement.

To test, be sure to clear your browser cache after applying the patch.

- Test the help link.
- Test the logout link with the intranetbookbag preference on and off.
- Open a patron's account and click "search to hold." Log out, and log
  in again. Koha should not remember the patron you chose before
  logging out (as seen from a search results page).

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
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>
Bug 9286 - Add script to add a bib to the zebra queue from the command line

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: No test plan, but works.
Tested adding auth, biblios or both, then rebuilding -z
No errors.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Test Plan

1/ run misc/mod_zebraqueue.pl -a 1
2/ In your koha db
SELECT * FROM zebraqueue WHERE done = 0;
Check that a row for authority record id 1 has been inserted
3/ run misc/mod_zebraqueue.pl -b 1
4/ In your koha db
SELECT * FROM zebraqueue WHERE done = 0;
Check that a row for biblio record id 1 has been inserted
5/ run misc/mod_zebraqueue.pl
Make sure the help is sensible
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
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>
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.
Bug 9755: Refactor record merge functionality

This patch refactors the merge record interface and code a little bit
in preparation for making it possible to merge authority records.

To test:
1) Apply patch.
2) Try merging two records:
    a) Create a list.
    b) Add two records you would like to (or be willing to) merge
       to said list.
    c) View said list.
    d) Check the checkboxes next to the two records you added.
    e) Click "Merge selected records."
    f) Choose a merge reference.
    g) Choose fields from each record that you want to keep.
    h) Click "Merge."
3) Confirm that your merged record has the fields and subfields you
   wanted.
4) Run the unit tests for the two files that were changed:
    prove t/Koha_Record.t t/db_dependent/Koha_Authority.t
5) Sign off.
Bug 5202: merge authorities from the authority file and reservoir