TPAC: Set search library and depth consistently
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
* Evergreen master
Make the TPAC behave more like the JSPAC with respect to a logged-in users's preferred search library or home library.
Also simplify the user's need to understand both "org unit depth" and "org unit" concepts when selecting search scope by simply setting the default depth equal to the chosen org_unit. The CGI "depth" param can still be used to set a specific search depth for custom skins, etc.
From the first commit to user/dbs/
The current TPAC code uses logic embedded within the templates to
determine which org unit and depth to apply to searches.
This commit attempts to standardize the logic within the new
OpenILS:
the result as a new context variable, "search_ou". The org unit is
determined as follows (first matching condition wins):
* specific CGI "loc" value
* logged-in user's preferred search library
* logged-in user's home org unit
* specific CGI "physical_loc" value
The depth is set as follows (first matching condition wins):
* specific CGI "depth" value
* depth of the chosen org_unit
As of this commit, a library that wishes to set the a default search
org unit for any given user should set the "physical_loc" CGI param;
after the user performs their first search, the "loc" CGI param will
propagate through most interfaces. When a user clicks "Your account log
in", the user's preferred search library or home org unit will be set as
the new search lib.
At any time after that, the user can select a different org unit from
the org unit selector to explicitly set the "loc" CGI param.
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Pushed a few more commits onto the branch - first to sync up with master and resolve a conflict that arose from the merge of LP# 909111, and second to handle a few remaining cases in which the search_ou context variable was not being set correctly (for example, My Account -> Circs / My Account -> Holds).