pulibrary / locations

Services around holding, delivery, and physical locations
MIT License
3 stars 0 forks source link

Add Stackmap/Locator Shim #66

Closed kevinreiss closed 8 years ago

kevinreiss commented 8 years ago

In order to direct users to the appropriate stackmap service for a given library holding location we need to add a route that draws on the "holding_location" value and bibliographic/holdings data for a given ID to determine the stackmap service to use and what parameters to send to it. The shim should exist as a new route in the locations engine that accepts two params (holding location code and bib ID) and redirects the user to the appropriate stackmap page. Current examples:

Firestone Locator

https://library.princeton.edu/utils/map?loc=f&id=9588893

redirects to the Firestone Locator

http://library.princeton.edu/locator/index.php?loc=f&id=9588893

Stackmap

https://library.princeton.edu/utils/map?loc=gest&id=9537938

redirects to Stackmap

http://princeton.stackmap.com/view/?callno=PL540+.B46+2016&location=gest&library=East+Asian+Library

The toggle between the two options is the "Library" attached to a given holding location. Firestone flagged locations route to the Firestone Locator, branch library locations go to stackmap. The loc and id params can be passed directly on to the base URL of the Firestone application. Holding locations at Stackmap libraries require a different set of parameters be passed on the base URL. Stackmap needs a call number, location code, and a string representing the library. The params required are:

Stackmap also has two other quirks that require different behavior to be invoked based upon the locationc code supplied

Reserve Locations

If a closed stack reserve location at a stackmap library is requested a message should be displayed instructed the user to go to the circulation desk of the library in queston. Current template displays the following message and some basic bibliographic information.

This item is currently in a reserve location please see the circulation desk at the {{ library }} to get an available copy.

Current "closed' reserve holding locations in stackmap libraries:

- 'ueso'
- 'spir'
- 'piaprr'
- 'gstr'
- 'strp'
- 'strr'
- 'pplr'
- 'scires'
- 'scigr'
- 'scilal'
- 'sar'
- 'musg'
- 'musr'

By Title Locations

Several locations holding serials require that the callno param contain the Title of the publication instead of the call number. The param still needs to be called callno. The two locations that need this are:

- 'sciss'
- 'pplps'

Example: http://princeton.stackmap.com/view/?callno=Cancer+chemoprevention&location=sciss&library=Lewis+Library

Current Stackmap Libraries

architecture
eastasian
engineering
lewis
mendel
marquand
plasma
stokes
sdellis commented 8 years ago

Is this issue in the right repo? Is it for Utils or Locations?

kevinreiss commented 8 years ago

For locations, the pieces in utils repo that depend on Primo like this one need to be deprecated as we phase Primo out this Fall.

sdellis commented 8 years ago

Add "mappable" attribute to Library. Make “mappable" an ENUM datatype with one of three values as of now: [stackmap, locator, false]. When we go to one locator we can change the datatype to BOOLEAN.

eliotjordan commented 8 years ago

@kevinreiss Is this issue ready to close?

kevinreiss commented 8 years ago

Yes, but we need to do tag a new release and update the ref here https://github.com/pulibrary/marc_liberation/blob/development/Gemfile#L42.