Bug 11342: fix error in OPAC self registration form if BorrowersTitles is empty

If BorrowersTitles is empty, it causes the library pulldown on the self
registration page to be empty, and to have the "Saluation" field have
the option "branches".

This patch also fixes a minor string capitalization issue.

Test Plan:
1) Enable OPAC self registration
2) Set the system preference BorrowersTitles to be empty
3) View the self registration page
4) Note the lack of branches in the home library pulldown
5) Apply this patch
6) Note the branches now display in the pulldown

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in bootstrap and prog OPAC, with BorrowersTitle configured
and emptied.
Passes all tests and QA script.

Note: The titles pull down has 2 empty entries in master with
and without the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10429: improve display of library and library filter on serials claim page

In serial claims page, the library code is displayed in table instead
of library name and library filter does not work.

This patch adds the display of library name by using libraries template
plugin.  It changes the Javascript library filter to make it work.

Also sets "all" filter in template (like status filter) to allow
translation and sets "all" as selected by default. The staff user's
library was selected by default, but the table was not filtered
with it.

Test plan :
- Go to serials claim of a vendor with serials of multiple libraries
=> You see branch filter with "(All)" and table shows library's names
- Check that library  filter does its work

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Table now shows the branch name instead of the branchcode.
First option was named (All), matching the status pull down.
When opening the claims page, (All) is preselected and the
result list matches with the selection. Before the patch
the library was preselected, but the result list did show
late issues from all branches.

This patch is an improvement, but there is still more work to do.

- Filters are not cumulative, but when another filter is selected
  the first filter is not reset.
- It's not possible to combine
  2 or more filters.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11336: (follow-up) fix typo in previous follow-up

This patch corrects a typo that broken ModReserveFill().  This
patch also adds a unit test that (via two levels of indirection)
exercises ModReserveFill().

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6886: ensure that singleBranchMode does not display library name for reference copies

Test plan: Enable singleBranchMode and  OPACXSLTResultsDisplay. Perform
a search in the OPAC which returns results containing not-for-loan
items. Before the patch these items will show their library in search
results loan items. After the patch there will be not be a library
listed, matching other items in results.

Signed-off-by jmbroust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6886: (follow-up) replace needless <xsl:choose> with <xsl:if>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Switching SingleBranchMode:

Tested with MARC21 and UNIMARC:
- "Don't allow" - branch is not shown in result list
- "Allow" - branch is shown for available items in result list

Changes are consistent over all 3 MARC flavours.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 6886: (follow-up) remove redundant test for singleBranchMode

This patch removes an unnecessary check of the singleBranchMode
preference that occurred in an <xsl:otherwise> clause where
we already know that singleBranchMode != 1.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction

This patch adds 2 circulation permissions: force_checkout and
lift_restriction.

During upgrade, these two permission are added to existing staff
users that already have the base circulate permission.

force_checkout allows a librarian to force a checkout if a limitation
occurred.

lift_restriction allows a librarian to lift a restriction for a patron.

Test plan:
1/ Find a debarred patron and go on the checkout page. The "Lift
restriction" button should be present only if the logged librarian has
the lift_restriction permission.
2/ If the force_checkout permission is set, a librarian should be
allowed to check out in several cases:
- age restriction
- the item is issued to another patron
- the item is not for loan
- the patron has overdue items
- the item is lost
- the item is a high demand item
- the item is reserved
- another case ?

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Bug 10863: The force checkout permission should not affect high holds

- typo checkout => check out.
- the force checkout permission does not affect high holds.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>

Bug 10863: Follow-up: Adding missing permissions to translated files

This patch adds the 2 new permissions to all remaining sample files.
If the permissions don't get installed, the problem is bigger than
having an English description.

Also adds back the question "Check out anyway?" for high demand items (HIGHHOLDS).

Test xt/permissions.t passes now.

Bug 10863: Rename lift_restriction with manage_restrictions

The pref manage_restrictions now takes into account "Lost card" and
"Gone no address" restrictions.

Test plan:
- log in with a user with manage_restrictions permission
- verify you can set/unset restrictions when editing a patron
- log in with a user without manage_restrictions permission
- verify you cannot set/unset restrictions when editing a patron

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Note: The AgeRestrictionOverride pref has to be set to "Allow" if you
want to override the age restriction, even if the new permission is set.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10863: DBRev 3.15.00.012

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10863: (follow-up) set correct description for manage_restrictions permission during upgrade

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10863: (follow-up) give limited circ operator way to proceed

This patch tweaks the checkout form so that if a circ operator
doesn't have the circulate/force_checkout permission, they are
presented with a button to continue on if they ran into a restriction
on the loan.  Otherwise, there was no clear way to carry on, as the
item barcode field was disabled.

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