Bug 8644 [staff client] jQueryUI CSS file should not contain customizations

This patch moves jQueryUI customizations into the main CSS
file for the staff client. In order to get the corrected
default version of jquery-ui.css I have upgraded all core
jQueryUI files.

Testers should look at examples of each of the various jQueryUI
widgets we use in Koha to confirm continued functinality: tabs,
autocomplete, datepickers, and slider (in specify due date popup).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 8644 [OPAC] jQueryUI CSS file should not contain customizations

This patch moves jQueryUI customizations into the main CSS
file for the OPAC. In order to get the corrected
default version of jquery-ui.css I have upgraded all core
jQueryUI files.

Testers should look at examples of each of the various jQueryUI
widgets we use in the OPAC to confirm continued functinality: tabs
and datepickers.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8431 - Increase the borrower attribute field size from 64 characters to 255

Some libraries would like to store more verbose data in a borrower attribute field.
This commit increases the maximum length of a borrower attribute from 64 characters
to 255 characters.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 8431 - Followup - Switch from text input to textarea

Switch the text input to a textarea will make editing larger
borrower attritube values much easier. Since modern browsers
allow for dynamic resizing of textareas, we can keep it small
by default and let the library resize it if neccessary.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
bug 8431 follow-up DBRev number

+ removing useless ` in DB columns
Bug 8431 follow-up : |html_line_break in 2 tempates

if the attribute is in more than 1 line, we must add |html_line_break to display it properly

Doing that in member details (staff & opac)
Bug 8209: "Did you mean?" from authorities

One of the ideas behind authority records is that users who search for
one term should have related terms (according to the authority file)
suggested to them. At the moment, Koha doesn't do that. Adding an
authority searching step to regular searches and displaying any
suggestions in a "Did you mean" bar at the top of the results would be
very useful.

This commit adds a Koha::SuggestionEngine class which is in charge of
getting suggestions from individual suggestion engine plugins, which
much be in the Koha::SuggestionEngine::Plugin::* namespace, and extend
Koha::SuggestionEngine::Base. Suggestions are loaded asynchronously
using AJAX, and a link to a page with suggestions is provided for users
with Javascript turned off.

The AuthorityFile suggestion engine plugin looks up the specified search
terms in the authority file and then suggests searches for records using
matching authorities.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased 2 August 2012 and incorporated QA feedback

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

Test plan:
- Verified database update added system preference correctly,
  pref defaults to OFF
- Verified search results and detail pages in OPAC and staff
  still worked the same as before
  * for no results
  * with results
- Activated system preference and tested various searches
  * Searches from simple search
  * Searches from advanced search
  * Search links in records
- Deactivated Javascript - verified fallback works correctly

Notes:

- Suggested terms can include autorities with no linked records.
- When combining more than one search option using advanced search
  this results in "no suggestions" more often. Feature works best
  from simple search.

Overall great feature making use of authorities in a user friendly way!

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on latest master 2012-09-10
Signed-off-by: wajasu <matted-34813@mypacks.net>
Bug 8209 follow-up DBRev number
Bug 8649: Add unit test for C4::Search

This patch adds a unit test for C4::Search in t/db_dependent. In order
to test the functioning of the Zebra search, this patch actually includes
an entire Zebra sandbox, and pre-indexed files, which are stored in
t/db_dependent/data (the configuration files are generated on the fly).

This test depends on Test::Warn, Test::MockModule, and DBD::Mock.

To test:
1) Run the test. There should be no failures, and no warnings.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
bug 8649: make sure C4::Context is fully mocked-up before tests

This fixes failures of the test cases to run for me
on Perl 5.10.1 using prove -v t/db_dependent/Search.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
bug 8649: make sure we can exit if a test fails

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
bug 8649: create a temp directory for Zebra for C4::Search tests

The Zebra test uses Unix-domain sockets, which won't work if
Koha is being installed or tested from an NFS- or SSHFS-mounted
clone.  Therefore, create (and clenaup) a temporary directory on
(hopefully) a normal filesytem to run the test.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
bug 8649: quiet a variable use warning

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 8209 follow-up: fix failing test in AuthorityFile suggestion plugin

The BuildSummary output changed slightly, resulting in labels not
showing up and a test failing.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Merge remote-tracking branch 'origin/new/bug_8209'
Bug 7417: Include see from references in bibliographic searches

This patch adds the Koha::Indexer::RecordNormalizer and
Koha::Indexer::MARC::RecordNormalizer::EmbedSeeFromHeadings packages
to enable the inclusion of alternate forms of headings in bibliographic
searches. When the new syspref IncludeSeeFromInSearches is turned on
(default is off) rebuild_zebra.pl will insert see from headings from
authority records into bibliographic records when indexing, so that a
search on an obsolete term will turn up relevant records.

To test:
1) Enable IncludeSeeFromInSearches
2) Add a heading that has an alternate form to a record (for example,
   "Cooking" has the alternate form "Cookery," if you have authority
   records from LC)
3) Index the zebraqueue (or reindex if you haven't indexed your system
   yet)
4) Confirm that if you search for "Cookery" you get the record you
   just modified

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 5 August 2012
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 11 September 2012

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

Also checked:
- Verified database update works correctly
- Checked system preference and its description
- Checked staff/opac detail pages with feature on/off
- Checked staff/opac search facets
- Downloaded and tested records in various formats
- Tried different searches for 'see from' entries of authorities
- Ran all unit tests

No problems found.
Bug 3462: Links in authorities should be hyperlinks

Make see also links in both the OPAC and authority module search results
into hyperlinks and not just textual strings.

To test:
1. Do a search for an authority that will bring up a heading with a
   see also reference in the staff client and the OPAC.
2. Confirm that the see also references listed in the search results
   are now hyperlinks, which work.

Also quiets an unnecessary warning about an uninitialized value.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased 26 July 2012

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 1 August 2012

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 6 August 2012

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 11 September 2012

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely and is a great improvement.

Tests:
- Checked links for existing and non existing "see alsos" give correct
  search results
- Verified links show up for all "see alsos" in a result list
- Verified links are properly linked with the correct names
- Checked logs don't show errors

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Bug 3461 follow-up DBRev number
Bug 7500 [FOLLOW-UP][Star ratings] Use CSS Sprites for faster page loading

Combines two star ratings sprites into one and makes
the corresponding CSS changes. The two original images
have been removed.

To test, view star ratings on search results and the detail page.
Try setting star ratings on the detail page.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bug 7500 [FOLLOW-UP][Missing images] Use CSS Sprites for faster page loading

- Adds shelf browser navigational arrows to the main sprite.
- Removes "caret.gif" (a sort of breadcrumbs separator in the OPAC) and replaces
  it with a similar Unicode arrow entity.
- Replaces item-bullet.gif (a custom list bullet used in the Cart) with data URI
  encoding the image in the CSS

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>