Bug 12018 - add table sorting to patron card batches

When viewing batches of patrons in the patron card creator module the
table is not sortable. This patch adds table sorting.

The patch also makes some corrections of invalid markup and moves
informational/error messages to the top of the page rather than in a
sidebar. This change lets the table and sorting controls expand into a
wider space.

This patch also corrects a translation issue with table headers
identical to that addressed by Bug 11505.

To test, go to Tools -> Patron card creator -> Manage batches.
View an existing batch or create a new batch and populate it with
patrons. Table sorting controls should work correctly. Batch management
operations should work correctly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11993: fix untranslatable confirm popup in request.tt

This patch makes confirm popup text translatable. It implements a
similar function as used on OPAC deleteConfirm() and a JS var message.

This function, or variants, can also be found on other files on intranet,
I think that the only valid places are staff-global.js and help-top.inc

Redefinitions of this function:
prog/en/modules/serials/subscription-frequencies.tt:6
prog/en/modules/tools/marc_modification_templates.tt:158
prog/en/modules/virtualshelves/shelves.tt:92

Last case is a little different

To test:

1) Confirm that the "cancel hold" link correctly prompts for
   confirmation:
   a) Place an item-level hold on a title.
   b) Check in the item and confirm the hold.
   c) Return to the place hold screen for that title and submit another
      patron to place a hold for.
   d) On the place hold screen for that patron, look at the table of
      items. There should be a "cancel hold" link next to the item for
      which the hold was confirmed in step (b).
   e) Click "cancel hold."  You should see a confirmation message.
      Cancelling this dialog should cancel the operation. Confirming it
      should cancel the hold.

2) Check the string is not present on staff PO file
3) Apply the patch
4) Update translation files (cd misc/translator; perl translate update
   xx-YY)
5) Verify the string is now present

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11393: fix display of Thai in language menu when Thai translation is installed

The problem is with the name of PO files

Currently Koha expect, among other variants, that PO filenames
began with (using as example *-pref.po):
{lang}-pref.po
{lang}-{region}-pref.po
{lang}-{script}-pref.po
{lang}-{script}-{region}-pref.po
and expect 2 chars for lang and region, and 4 for script

So the problem with Thai translation files are that it's names
do not match that convention.

This patch only rename Thai files as th-THA-* to th-TH-*.
In that way language description is right.
translate script use that chars to make dirs, and use dirs to find
description.

To test:
1) Go to I18N/L10N sysprefs
2) Install th-THA language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-THA)
3) Reload page, wrong description
4) Apply patch
5) Install th-TH language (or simply mkdir koha-tmpl/intranet-tmpl/prog/th-TH)
6) Reload page, right description
7) If you want do "mkdir koha-tmpl/intranet-tmpl/prog/th-Thai", reload,
   also right description

To the reporter of this Bug: the rename of the folder is a good
workaround, when this patch is pushed to stable I'll rename Thai
files

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

This does not correct existing problems which need human
intervention. It does, however, allow for a correct installation
of Thai after the patch is made.

If we really want a patch for fixing an existing install. I
wrote it, but have not tested it.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
As pointed out by Mark, this does not fix existing installations.
Putting a note in the release notes might be something we can do here.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Housebound module for v3.6

Conflicts:
	admin/systempreferences.pl

http://bugs.koha-community.org/show_bug.cgi?id=5670
Added syspref: housebound: check previous issues

- Added syspref: useHouseboundCheckPrevious (check whether item was
  previously issued to housebound user)?
- Implemented check in Circulation.pm for this prior to each issue.
- Added authorised values and borrower categories to .sql atomicupdate

Conflicts:
	C4/Circulation.pm
	koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
(Additional contribution from: Alex Sassmannshausen)

http://bugs.koha-community.org/show_bug.cgi?id=5670
Remove unused variables from C4::Housebound

localized lexical vars to where they are used
Avoided unnecessary method calls
Remove a finish
No need to interpolate to constant strings
Fix some violations of perlstyle

http://bugs.koha-community.org/show_bug.cgi?id=5670
Commit Housebound Updates

http://bugs.koha-community.org/show_bug.cgi?id=5670
Tests: add Housebound unit tests.
Housebound: allow for CHO, DELIV and VOL selection

- Add procedures to retrieve 'chooser' and 'deliverer' borrowers as well
  as volunteers.
- Use the procedures in houseboundinstances.pl.
Clarify wording on role of volunteers.
Housebound: Fix regression in housebound.

- Fix regression in update/creation functionality.
housebound: re-apply style improvements.
housebound: get datepicker working.
housebound: catch references to undefined vars.
Housebound: improve documentation.

* C4/Housebound.pm: throughout, add or improve documentation.
Housebound: use @EXPORT_OK instead of @EXPORT.

* C4/Housebound.pm: move from @EXPORT to @EXPORT_OK.
* members/housebound.pl: import specific procedures to be used.
* members/houseboundedit.pl: as above.
* members/houseboundinstances.pl: as above
* t/Housebound.t: import procedures to be tested explicitly.
Housebound: push $ENV{DEBUG} calls to templates.

* members/housebound.pl: push $ENV{DEBUG} calls to templates.
* members/houseboundedit.pl: the same.
* members/houseboundinstances.pl:  the same.
Housebound: add copyright for PTFS-Europe.

* C4/Housebound.pm: add copyright for PTFS-Europe.
* members/housebound.pl: the same.
* members/houseboundedit.pl: the same.
* members/houseboundinstances.pl: the same.
Housebound: tidy .tt files, add form validation.

* koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt:
  remove comments.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/houseboundedit.tt:
  remove comments, add form validation.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/houseboundinstances.tt:
  as above.
Housebound: Use authorised_values, refactor.

* members/housebound.pl:
  - pass housebound hashref instead of scalars to $template->param.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt:
  - use authorised_values for 'Delivery day' and 'Frequency' fields.
  - use housebound hashref instead of individual scalars.
* members/houseboundedit.pl:
  - use authorised values to provide day & frequency options.
  - pass housebound hashref instead of scalars to $template->param.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/houseboundedit.tt
  - use authorised_values for 'Delivery day' and 'Frequency' fields.
  - use housebound hashref instead of individual scalars.
* members/houseboundinstances.pl
  - drop loops and variables that can more elegantly be covered in
    template (idel, icho, ivol, am, pm).
  - pass housebound hashref instead of scalars to $template->param.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/houseboundinstances.tt
  - implement loops to auto-select current deliverer, volunteer,
    chooser, am/pm.
  - use housebound hashref instead of individual scalars.