]> git.evergreen-ils.org Git - working/Evergreen.git/commit
TPAC: Search Filter Groups
authorBill Erickson <berick@esilibrary.com>
Thu, 23 Feb 2012 22:01:28 +0000 (17:01 -0500)
committerMike Rylander <mrylander@gmail.com>
Tue, 22 May 2012 19:04:58 +0000 (15:04 -0400)
commitaaa3b6c77d54f59fcb2cb7d709797a80aeac908a
tree3727d32b0909138d2a4942b104506509f0f7ae80
parent36592af1e51f4534fcf2207de19706c19daf9efe
TPAC: Search Filter Groups

Adds support for a new CGI param:

fg:<filter_group_code>=filter_group_entry

Each filter group entry will be mapped to a filter_group_entry()
filter and appended to the current search query.

This includes a new filter selector builder at
parts/filter_group_selector.tt2.

Usage, assuming a filter_group with code "audience":

<span>[% ctx.filter_groups.audience.label %]<span>
<span>
[%
    INCLUDE 'opac/parts/filter_group_selector.tt2'
    filter_group=audience
    none_ok=1
%]
<span>

The set of filter groups available to the TPAC are those defined at the
search org unit and its ancestors.  If multiple filters have the same
code name, the filter owned closest to the context org unit is used.
This allows for global filters with local overrides.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
Open-ILS/src/templates/opac/parts/filter_group_selector.tt2 [new file with mode: 0644]