Bug 9341: Problem with UNIMARC authors facets

In UNIMARC installations the authors have a double comma separating the subfield a and the subfield b.

Test plan:

- After applying the patch do a search and check the double comma in authors facets.
- Apply the patch
- Do a new search
- Check if authors facets as a double comma

Sponsored-by: KEEP SOLUTIONS
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Conflicts:
	installer/data/mysql/sysprefs.sql
	installer/data/mysql/updatedatabase.pl

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Conflicts:
	installer/data/mysql/sysprefs.sql

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bump db number
Bug 7018 : need all acq permissions to search

All acquisition module permissions are needed to allow order search (acqui/histsearch.pl).

With this patch any acquisition permission allows to order search.
Many other pages of this module have this behavior.

Test plan :
- Set for a user only one permission in acquisition module (not order_receive)
=> they also need catalogue permission to be able to log in
- Login with this user and try to perform an order search
=> you get access to page
- Set for a user no permission in acquisition module
- Login with this user and try to perform an order search
=> you do not get access to page

Signed-off-by: MJ Ray <mjr@phonecoop.coop>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected and passes tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 7875: Change the pending suggestion link in home page so that it directs to pending suggestions

Pending suggestion link from staff client home directs to accepted
suggestions instead of pending suggestions. This patch changes the link
so that it directs to pending suggestions.

To test :
1 - create 2 suggestions, accept 1 of them
2 - click on the link on home page

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>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9748: don't link items in SCO checkout list back to main OPAC

It appears that the conversion from HTML::Template to TT
changed noitemlinks to ISSUE.noitemlinks, hence it is being ignored.

This is a problem for SCO kiosks where all the navigation controls
are hidden. Clicking the link means leaving the SCO module and
not being able to get back.

Test plan:
1) Run SCO module, check for item links
2) Apply patch
3) Run SCO module, note that the items no longer have links

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 9802 - add test case to ensure man pages have correct XML

To test:
* run xt/verify-debian-docbook.t and make sure it's all OK
* modify an xml file in debian/docs, try again, make sure it fails

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
- Running "prove -v xt/verify-debian-docbook.t" loops through all the
  XML files in debian/docs and reports them as being ok.
- Removing a "<" from one of the files makes the test report it as
  an error
- I did not verify that the test actually trips up a package build
  if there is invalid XML.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8378 - <fine> in overdues changed to <<items.fine>>

This patch reintroduces fines in overdue_notices.pl with minimal
changes to exsiting code.

It DOES changes template syntax, it used to be <fine>USD</fine> but
currency was not recalculated and used only to select format, so
now we are using active system currency because values are in it
anyway.

Example notify template:

<item>"<<biblio.title>>" by <<biblio.author>>, <<items.itemcallnumber>>,
Barcode: <<items.barcode>> Fine: <<items.fine>> </item>

If your active currency doesn't have valid ISO code this code will
fallback to sprintf with two decimal digits, and you can insert
currency symbol in template itself (currency field is not editable
through web interface, so this fallback might be useful for existing
installations).

Test scenario:
1. configure fine amount under "Circulation and fines rules"
   for patron category and item type
2. checkout item with correct type to partron in correct
   category with due date set to yesterday
3. verify that overdue notice uses new <<items.fine>> tag
4. run ./misc/cronjobs/fines.pl to calculate fines
5. run ./misc/cronjobs/overdue_notices.pl -n
   and verify that fine amount is included

Notes: Tested using the default ODUE notice, changing:
<fines>USD</fines>
for
<<items.fine>>

Everything worked as expected with finesmode=production set.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8378 - show all items columns and new items.fine

This allows users to select any columns from items and adds new
items.fine field introduced by previous patch to user interface.

Note: This works as expected. items.fine appears as an option and gets inserted in the notice template as expected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8378 - followup - sample_notices.sql updated to <<items.fine>>

Trivial string substitution.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8378 - followup - update notices to use <<items.fine>>

Didn't break on well-formed notices, and fixed those with problems

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Conflicts:
	installer/data/mysql/updatedatabase.pl

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bumping db version
Bug 9781 - Fix bug in 3.8.x (dynarch) calendar positioning in IE

Currently, if you click on the calendar icon on a long patron
entry/edit page, the calendar pop-up appears off-screen near the top of
the page rather than under the appropriate input box next to the actual
icon.

For most people, they don't think the calendar pop-up is actually
created. For others, it's quite annoying to scroll up to the top of the
page to pick a date for a date field lower on the page.

--

I've adapted a patch I found at the following URL:
http://blog.anorakgirl.co.uk/2009/04/dynarch-dhtml-calendar-ie7-positioning-problem/

This takes care of the problem.

--

Test Plan:

Before applying patch...

1) In any version of IE, create or edit a Patron entry
2) If you have a Date of birth field at the top, click the calendar icon
   next to it.
3) Note that the calendar pop-up appears fine.
4) Scroll down to the bottom of the page and click on the calendar icon
   next to Registration date or Expiry date.
5) Note that no calendar pop-up appears on the screen. Scroll up the
   page and you should see it up near the top of the page.

Apply patch

6) Refresh the page (you might need to clear your cache as well) and try
   clicking the calendar icon next to Registration date or Expiry date
7) Note that the calendar pop-up appears correctly underneath the input
   box for which you want to pick a date

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

Tested successfully using IE9 on Windows 7.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Bug 8942 : Adding a test to make sure we don't use single quotes for js

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

Tested by adding single quotes to a translation-escaped string.
Test correctly failed it.
Bug 8942: Translation process breaks javascript

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

I tested most scripts affected by this patch and visually verified
all changes. Functionality is unaffected.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 8942: Translation process breaks javascript (followup 1)

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

Tested all effected functions. No change in functionality.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 8942: Translation process breaks javascript (followup 2)

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

Tested all changes. Functionality is unchanged. Thanks for the taking
the extra effort to move alert strings into variables.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Removing a single quote in the js