Bug 10206 - Add Koha TT Plugin - Koha.Preference

This plugin is meant to be a place to put general purpose TT functions
directly related to Koha. If a plugin is not a filter, and does not
have more than one subroutine, that subroutine most likely belongs
in this TT plugin.

This first and only function the plugin currently has is Preference,
which allows a template to get the value of a system preference without,
it needing to be passed in from a perl script.

For example, to use, first include the line '[% USE Koha %]' at the top
of the template to enable the plugin, then do something like this
to check the value of a system prefence in the template:

[% IF Koha.Preference( 'MyPreference ) == 'SettingA' %] ...

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7e10f6fb78ae7fa2dfc4f52a3791ac35082237ac)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10552: make several sysprefs available to the OPAC login page

Several system preference variables are unavailable to the OPAC login
template because they are not explicitly enabled for that page. Instead
of adding them to Auth.pm using the old method this patch uses the new
system preference check syntax using the Koha TT plugin.

The following preferences are now checked using this syntax in
masthead.inc:

OpacAddMastheadLibraryPulldown
UseCourseReserves
reviewson
OpacShowRecentComments

In order for the call in masthead.inc to the new plugin to work on all
OPAC pages "[% USE Koha %]" must be added to any template which
includes it (most of them).

Also in this patch: A change to Auth.pm to enable correct display of the
LibraryName in the title of the OPAC login page.

To test, turn on the above system preferences and confirm that the
relevant links appear under the OPAC's main search bar on all pages
including the login page.

Confirm that the text specified in the LibraryName system preference is
shown as the title of the login page.

Confirm that course reserves and comments are displayed correctly on the
biblio detail page.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
I checked both prog and ccsr - all seems well and the links are appearing and disappearing in accordance with the appropriate sysprefs.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 04dd98fa846d4f28edc5811cb90e8a5ba4b6289b)

Conflicts:

	koha-tmpl/opac-tmpl/ccsr/en/includes/masthead.inc
	koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
	koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt
	koha-tmpl/opac-tmpl/prog/en/modules/opac-course-reserves.tt
	koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
	koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10576: make strings in additem.js accessible to translation

There are a couple of untranslatable strings in additem.js. This patch
moves the strings out of the script and into the include file which has
been created for this purpose.

To test, apply the patch and test the process for adding an item to an
existing or new basket (with AcqCreateItem set to "when placing an
order."

The add item form should be correctly labeled "Add item." After adding
an item, click to edit it again. The form should now be labeled "Update
item."

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and passes all tests.
Made sure strings can be translated testing with German templates.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b7305e4876e6d961e8325155d679b1312975e74d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10578: fix results sorting in staff interface

To test  (in librarian's interface):

1. Have some biblio records to get a list when searching.
2. Make an advanced search with 'as phrase' modifier (title -- ti,phr:
or author -- au,phr: , etc.)
3. Having the result list try to change the sort order.
4. You should get no results with a message like: "No results match your
search for 'au%2Cphr: " etc.
5. Apply the patch
6. Repeat steps 2. & 3.
7. You should get the list sorted according to your choice.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0b05d1acb9e5402a85fc39987577a8686c07d27c)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10516 - Improve titles, breadcrumbs, and confirmation messages for Z39.50 server adds and updates

The template for adding/editing Z39.50 servers shows the same title,
breadcrumbs, etc. for add and edit operations. This patch creates
separate text for each case.

To test, try both adding and editing a Z39.50 server. The page title,
breadcrumb, and heading should correctly reflect the operation you
perform.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and all strings are translatable.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 5c60ae40f97d9c22504c2942a00a93777984c7a5)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 10516 - Follow up - Fixing capitalization

Fix capitalization on submit buttons when deleting
a Z39.50 server.

- Delete this Server
- Do Not Delete

I think the "Do not delete" should maybe even be a cancel
link to be more consistent with how Koha displays this
kind of dialog in other places.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
fixes capitalisation, tool stil works

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c5cc04ef3d5e50c376e37a1493926181389efa6a)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>