Bug 10908: restore non-anonymous auth_by_bind LDAP options

Recent changes to LDAP broke auth_by_bind in many situations. This bug
resets the behaviour to what it used to be, however also allows the new
behaviour by adding the 'anonymous_bind' parameter to the LDAP config.

Testing:
    1) Find an LDAP configuration that was broken recently that uses
       auth_by_bind
    2) Apply this patch
    3) See if it works again.
Additionally, testing the original path in the case of 'anonymous_bind'
being set should probably be done too, but I have no idea about the LDAP
server config for that.

Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10908: restore docs on principal_name LDAP option

Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11037: remove non-existent routines from Biblio's @EXPORT

No code implements the routines Get and TransformHtmlToMarc2,
so don't export them into users' namespace

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9830: Fix some indexes in UNIMARC item indexing

With this combination of sysprefs, and a UNIMARC configuration, it was
impossible to search on location, barcode and ccode indexes :

QueryWeightFields          is activated
QueryAutoTruncate          only if * is added

But in UNIMARC, location, barcode and ccode (995 $e,$f,h) were indexed
only as "words". They need to be indexed also as "phrase".

Additionnaly, in UNIMARC, information about damaged and withdrawn status
of items is not indexed, while it is done in MARC21.

This patch
- add 2 new indexes for 995$1 (damaged) and 995$3 (withdrawn)
- index location, barcode and ccode as "phrase" as well as "words"

Indexing of items in UNIMARC could be improved later. So this patch also
add comments explaining the origin of Koha 995, I think it could be
useful for further changes.

To test, on a UNIMARC configuration :
A. indexed with GRS-1
1) Set sysprefs QueryWeightFields as "activated" and QueryAutoTruncate
   as "only if * is added"
2) Select location index in advanced search and search for a value
   existing in your records in 995$e => 0 results
3) Apply patch
4) Rebuild zebra
5) Select location index in advanced search and search for a value
   existing in your records in 995$e => x results
6) Mark an item as withdrawn; search "withdrawn:1" => x results, and
   among them the biblio to which the item is attached
7) Mark an item as damaged ; search "damaged:1" => x results, and among
   them the biblio to which the item is attached

B. indexed with DOM
Do the same operations

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Test
Apply the patch
Begin with GRS-1
Full reindex
Search by location, no results
cp files biblio-*-indexdefs.xml and record.abs to destination on etc/zebra
Full reindex
Search by location, got results

Switch to DOM
reset files
Full reindex
Search by location, no results
cp files
Full reindex
Search by location, results !

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8070: improve MARC preview display for RTL languages

The Right Answer, according to the cataloger I spoke to,
is to make it LTR when doing "raw" MARC display.

To test:

1) Install this patch, then run misc/translator/translate install ar-Arab
2) search for a bib in the staff client.
3) Switch to Arabic, and click the link to the left of "MARC Preview"

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

At first glace I was unsure about hard-coding this style in the
template. Further testing indicated that this is required as the
showmarc template doesn't inherit any of the CSS from the containing
page.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10016: force zero browser-side caching of SCO pages

This patch makes the web-based self-check module pages
specify that no browser (or proxy caching) occur at all.
This prevents a security issue where letting the SCO session time out,
then hitting the back button allowed one to view the previous
patron's session.

This patch adds an optional fifth parameter to output_with_http_headers(),
and output_html_with_http_headers(), a hashref for miscellaneous
options.  One key is defined at the moment: force_no_caching, which if
if present and set to a true value, sets HTTP headers to specify no
browser caching of the page at all.

To test:

[1] Start a web-based self-check session and optionally perform
    some transactions.
[2] Allow the session to time out (it may be helpful to set
    SelfCheckTimeout to a low value such as 10 seconds).
[3] Hit the back button.  You should not see the previous patron's
    self-check session.
[4] Verify that prove -v t/Output.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
bug 10016: munge history in SCO to discourage resubmitting user login

This patch uses history.replaceState (introduced in HTML5) to manipulate
the browser history to encourage returning to the SCO patron barcode
form if the back button is used.

Note that a side effect of this patch is that if the user uses
the help link, they will be prompted to enter their barcode
again.  It may be better to put the help inline with the rest
of the SCO forms.

To test:

[1] Start a web-based self-check session.
[2] Enter a patron barcode.
[3] Allow the self-check session to time out.
[4] Use the back button.  You should get the patron barcode
    entry form; you should not be prompted to resubmit form input.
[5] Enter a patron barcode, perform some transactions, then
    use the finish button.
[6] Next, use the back button.  You should get the patron barcode
    entry form.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ed Veal <ed.veal@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11060: (Bootstrap theme) fix incorrect rendering for right to left languages

The right-to-left CSS copied over from the prog theme does is not
relevant to the redesigned templates. This patch updates the OPAC's
right-to-left CSS and adds a couple of other right-to-left CSS files to
override the default Bootstrap and jQueryUI CSS.

To my eye this looks correct, but I don't speak Arabic.

To test you must have a set of right-to-left templates, like
ar-Arab, installed for the Bootstrap theme. At this time it is necessary
to download the po file to your misc/translator/po directory. Again
using ar-Arab as an example:

http://translate.koha-community.org/ar/314/ar-Arab-opac-bootstrap.po

Install the translation.

Open the OPAC, switch to that right-to-left language, and reload to
refresh the changed CSS. Confirm that it looks like right-to-left is
working.

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

As far as I can tell it looks very well.
No koha-qa errors

1) Downloaded arabic bootstrap PO
2) Installed ar-Arab language, enabled on OPAC
3) Tested as anonymous user and logged in one, all pages look
well: cart, advanced search, user tabs.

I sent an email to Karam Qubsi asking his opinion.
But for me it's ok

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

I was testing this at the same time as Bernardo, so I will Pass QA on
it, instead of signing it off

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10723: Merge GetPendingOrders and SearchOrders routines

In the C4::Acquisition module, 2 routines do the same work. This patch
merges these 2 routines.

Test plan:
test the acqui/orderreceive.pl, acqui/uncertainprice.pl
and serials/acqui-search-result.pl, acqui/parcel.pl scripts.

Note: on acqui/parcel the basket filter is a search on basket name (was
on basket id, which was not relevant).

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pm, no adverse bahaviors noted. All sub calls updated.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10723: make SearchOrders() take into account the pending parameter

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10723: remove one last instance of GetPendingOrders()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10723: (follow-up) add more unit tests for SearchOrders()

In particular, verify that the pending filter option works.

To test:

[1] Verify that prove -v t/db_dependent/Acquisition.t passes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10724: Pending orders: add basket group name in filters

This patch adds a new filter "basket group name" for pending orders
searches.

Test plan:
Try different filters and check that results are consistent.
Try to filter by basket group name.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Applied on top of patches for bug 10723.
Passes all tests and QA script.

Note: It's a bit irritating that the basket name is not shown
in the list of pending orders, so there is no way to check the
results are correct without checking from another page.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10401: Add ability to merge invoices

Given how easy it is to accidentally receive items from one invoice on
multiple invoices, the ability to merge invoices can be quite handy.
This patch adds that ability to Koha's Acquisitions module.

To test:
1) Apply patch.
2) Run unit test:
    > prove t/db_dependent/Acquisition/Invoices.t
3) Create two invoices from the same vendor for merging, and receive at
   least one order on each.
4) Do a search on the Invoices page that brings up both the invoices you
   created.
5) Check the boxes next to the two invoices.
6) Click "Merge selected invoices."
7) Choose which invoice you want to keep (the default will be the first).
8) Click "Merge."
9) Confirm that the resulting invoice has all the orders you received
   listed on it.
10) Sign off.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Merged several invoices sucessfully - with and without received
orders, open and closed. Works nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11015: add copyright headers to some files

This patch adds a copyright headers where they didn't exist in the Koha
namespace.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11100: make label for Topics facet easily CSS selectable

Search in intranet, verify that Topics in the facets is wrapped in a span

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Adds an id, works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11107: make label for authors facet easily CSS selectable

Label in staff client - authors on facets not easily accessible

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11106: make label for Item types facet easily CSS selectable

Allows the Item types facet to be CSS or JQuery selectable

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11102: fixed bug in Label in Staff Client - places on facets not easily css selectable

Label in staff client on places facets not easily css selectable

To test:

with data that contains places, right click places heading in facets,
ensure it is wrapped in a span.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11098: fixed bug in label in opac - topics on facets not easily css selectable

Search opac, then right-click "Topics" and select "inspect element"

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

Please add a description of the problem and a test plan to your commit
message next time, thanks!

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Works as expected. Thx!

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