Bug 13218: usability enhancements for z39.50 searches

This patch rearranges the layout of the z39.50 search pages in cataloguing and
authorities.  There should be no functional change to z-target searching, all
functions should remain the same.

Changes:
* 2 columns of search fields condensed into one
* zTargets moved from below the search fields to beside them
* rearranged search fields into perceived frequency of usage, from most used to
  least
* changed label of Raw (any) to Keyword (any)

To test:
* click cataloguing -> new from z39.50/SRU
* observe how the layout has changed
* import a record or two using the search - there has been no change to the
  function, it should all be working.

* Click Authorities -> new from z39.50
* observe how the layout has changed
* import an authority or two using the search - there has been no change to the
  function, it should all be working.

* sign off if you think these changes are nice. Comments and suggestions are
  also welcome regarding this change.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Nice evolution of the z3950 search/result pages.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13218: fixing acquisitions z39.50 interface to be consistent with the others.

Changes:
* Two columns of search fields into one
* moves targets from below search fields to the right of them

To test:
* Create a basket in acquisitions
* attempt to add a record to the order from an external source
* note the changes to the layout
* complete a couple of additions to the basket - functionality should be unchanged.

If you like the changes, sign off :)

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Ok. Consistency welcomed!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13218: (qa-follow-up) replace tab with spaces

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13218: (RM followup) only scroll on actually variable stuff

Most of the page contents have fixed size. The only exception is the
targets list. If the target list grows, then the whole page needs to be scrolled
in order to reach the buttons.

We should make the z3950 targets area scrollable, and remove scrolbars from all
over the place.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13465: Correct the field prefix ambiguity

This is introduced by Bug 12874.

Without this patch, it's not possible to clear (set to an empty string)
an item field.
This appended for field linked to an AV list but even if it's not.

The regex tried to prefix 'my_field' with 'items.' to have
'items.my_field'. It wanted to take care of the case where the prefix
already exists (Actually only 1: 'items.cn_source').
The regex is changed to: "add the prefix only if the string does not
contain a dot".

Moreover an ambiguity existed on the prefix: in marc_subfield_structure,
the kohafield is prefixed, but not in the key of the hash sent to
ModItemFromMarc.

Test plan:
- edit an item, set a status that is controlled by an authorized value
examples tested: damaged, not for loan
- check the status saved correctly
- edit the item again, reset the status to empty
- check the status saved correctly
- edit the item again, reset fields, edit fields
- check the fields saved correctly

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13296 - error when using z3950 with UNIMARC authorities

When using a z3950 connexion with UNIMARC authorities, you get an error :
Unsupported UNIMARC character encoding [ ] for XML output for UNIMARCAUTH; 100$a -> 20141119

I've seen thant Bug 2060 when adds authorities import adds a special behavior for UNIMARC : marc flavor must be UNIMARCAUTH instead of just UNIMARC.

This patch adds the same behavior when using z3950 connexion and import.

Test plan :
 - Use a UNIMARC install
 - Define a z3950 connexion for UNIMARC authorities
 - Go to Authorities module
 - Click on "New from Z39.50"
 - Perform a search
=> Without patch : you get the error
=> With patch : you get results
 - Import one result
=> You get the authoritie creation form with all datas
You may check same plan with MARC21 install

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
NOTE: depending on the target, the syntax in the configuration
might not be UNIMARC, but MARC21/USMARC instead!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13296: (follow-up) permit grep on AUTHUNIMARC

I would prefer not to hide this "stuff".

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13470 - pay fines with extended borrower attributes result in application error

Test scenario:

1. ensure that extended patron attributes are turned on in system preferences
2. find borrower which has fine to pay, and click on pay button
3. verify application error
4. apply patch and verify that application error is gone

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13416: Typo in marc21_leader.pl position 5 (record status)

Instead of a space in the leader on this position, it should be an a.

Test plan:
1) Log in to staff client
2) Find a record in the catalog
3) Edit the record
4) Click the on builder popup icon.
5) View the page source
   -- the option is " " for the 'a- Increase in encoding level'
      entry. It really should be 'a'.
6) Apply patch.
7) Repeat steps 1-5
   -- the option should be 'a' this time.
8) Run koha qa test tools.
   -- Discovered it failed. Provided a patch to fix this.
      It does, however, solve the major problem of ' ' vs. 'a'.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13422 - SCO: "Would you like to rpint a receipt" not translatable

To test:

Set syspref SelfCheckReceiptPrompt to "Show"
Select non English language
Go to Self Checkout and check out an item
Hit "Finish"
Make sure that confirm dialog "Would you like to print a receipt" still
appears

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 12565: Acq: Fix broken link in breadcrumbs

The link back to the basket when creating an order by
searching for an existing record in the catalog is
broken.

To test:
- Start a new basket
- Create a new order line by searching for an existing
  record in your catalog
- Try the link back to the basket from the breadcrumbs
  at the result list page
- Verify that the link is broken
- Apply patch and retest

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13469 - Unapi path to XSLTs is wrong in OPAC

The Unapi path to XSLTs is wrong in the OPAC.

Unfortunately, it's coded to work just for Git installs, which makes it
tough to test.

_TEST PLAN_

Before applying:
1) Go to
http://GIT-INSTALL/cgi-bin/koha/unapi?id=koha:biblionumber:1&format=oai_dc
2) If the biblionumber exists, it should show you the record in OAI_DC format.
3) Go to
http://REGULAR-INSTALL/cgi-bin/koha/unapi?id=koha:biblionumber:1&format=oai_dc
4) You should get a software error

Apply the patch.

After applying:
1) Refresh the page for
http://yourgitinstall/cgi-bin/koha/unapi?id=koha:biblionumber:1&format=oai_dc
2) It should work exactly the same as before.

Thorough testers:
1) Push the code to that regular test install
2) Try the link again. It will properly show the converted record now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified that single install
intrahtdocs==/usr/share/koha/clone1712/intranet/htdocs/intranet-tmpl plus
"/prog/en/xslt/" is the location for the required xslt files.
Script unapi in git install is still fine.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13436: Adding more options to UsageStatsLibraryType syspref

Added options:
- research
- private
- society or association
- corporate
- government
- religious organization
- subscription
- school

Also changed 'university' to 'academic'

To test:
1) Go on to Global System Preferences and find UsageStatsLibraryType under Administration
2) Click drop-down menu and see all new options described above, as well as 'academic' instead of 'university'

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: replace tab with spaces

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13436: (RM followup) university -> academic DB update

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13436: DBRev 3.19.00.001

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Note: it also fixes a minor POD error.
Bug 13461 - Circ always asking for confirmation if RentalFeesCheckoutConfirmation is used

To test:
- Check RentalFeesCheckoutConfirmation is activated
- Try to check out an item without rental fine
- Verify confirmation message without explanation
  is shown
- Apply patch
- Verify confirmation message is no longer shown
- Configure itemtype to have rental fee
- Veirfy now the confirmation message appears as
  it should

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13476: Fix DataTables for the search items form

This items form is broken since the upgrade to DataTables 1.10.2 (commit
954c2874d0d9ebfa2e910dcd4445010115fac329).
The fnServerParams does not work anymore.

Test plan:
Go on catalogue/itemsearch.pl, launch a search and verify the data are
correctly displayed in the table.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The paging seems still a bit buggy, but this makes the
feature usable again!

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10753: Any library is represented by an empty string

And not with "__ANY__"

Test plan:
0/ Don't apply this patch
1/ Create a suggestion for "any library"
2/ Verify suggestions.branchcode contain "__ANY__"
3/ Apply this patch and execute the updatedb entry
4/ Create a suggestion for "any library"
5/ Verify suggestions.branchcode contain "" (for both suggestions).

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10753: DBRev 3.19.00.002

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13456: Serials/Claims.t expects no subscriptions

However, this is an unreasonable assumption for a system which
is in use (either lots of testing or production).

TEST PLAN
---------
1) Have a supplier with a late subscription.
2) prove t/db_dependent/Serials/Claims.t
   -- will fail
3) apply patch
4) prove t/db_dependent/Serials/Claims.t
   -- success
5) run koha qa test tools

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>