Bug 8205: Add OPACShowUnusedAuthorities syspref
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 30 May 2012 21:29:29 +0000 (17:29 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 28 Jun 2012 06:59:46 +0000 (08:59 +0200)
commit44cd5e058bca8bc1fc35cf29a04c47e8b84dccec
treea7bfb4471f50793e1d635c1be279b75f5fc64150
parent07e30a78d306fbd395dbe510fb867ba31540388b
Bug 8205: Add OPACShowUnusedAuthorities syspref

Rather than list authorities that are not actually used by a library,
this commit introduces a new syspref: OPACShowUnusedAuthorities to
enable libraries to hide unused authorities in the OPAC authority browser.

To test:
1) Do a search in the OPAC authority browser that brings up multiple
   results, including some that are used in the bibliographic database
   and some that are not.
2) Observe that the results include both used and unused authorities.
3) Set OPACShowUnusedAuthorities to "Do not."
4) Repeat the same search as in step 1.
5) Observe that the results no longer include unused authorities.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Preference is implemented cleanly and works like advertised.
As a note: The unused authority records will be hidden from display,
but the result list paging does not adjust for the hidden records.
So the result pages will show more or less records total, depending
on how many records are hidden.
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt
opac/opac-authorities-home.pl