Bug 13088: Allow the user to specify a max amount of facets to show
authorTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 20 Oct 2014 15:12:00 +0000 (12:12 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 27 Oct 2014 15:21:29 +0000 (12:21 -0300)
commitbe9dec3e13562fc8b68167b4e1d530d1465187e3
tree6157c57c140a93b9b05f1135f430b593efa900a9
parent2303b65d19db53b10f42f18f6dd2248e12dbcdfa
Bug 13088: Allow the user to specify a max amount of facets to show

This patch makes _get_facet_from_result_set rely on a new syspref (FacetsMaxCount)
to set the max facets to show for each facet category. It defaults to 20 if
the syspref is absent or empty.

To test:
- Have a search with lots of facet results (with some category showing the "See more" link).
- Jump to "See more", notice it shows more than 20 facet values.
- Apply the patch, reload the page.
=> SUCCESS It only shows 20 (default hardcoded value)
- Change the FacetsMaxCount syspref to other value (e.g. 15 or 100).
- Reload
=> SUCCESS: it shows the expected amount.
- Sign off :-D

Regards

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Test plan completed successfully

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Passes tests and QA script, works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Search.pm