Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alliance-pcsg/primo-explore-not-on-shelf
Provides a link to an external page/form with title, author, location, and call number. Library staff can then use this information for searches.
https://github.com/alliance-pcsg/primo-explore-not-on-shelf
Last synced: about 1 month ago
JSON representation
Provides a link to an external page/form with title, author, location, and call number. Library staff can then use this information for searches.
- Host: GitHub
- URL: https://github.com/alliance-pcsg/primo-explore-not-on-shelf
- Owner: alliance-pcsg
- Created: 2017-10-26T21:05:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-11-10T21:44:17.000Z (about 3 years ago)
- Last Synced: 2024-04-24T00:41:39.655Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 190 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# primo-explore-not-on-shelf
Provides a link to an external page/form with title, author, location, and call number. Library staff can then use this information to search for missing items.## Features
Creates a link underneath the Real Time Availability in the Primo Explore full display for a record. Link is designed to include author, title, call number, and location. Can be set up for multiple libraries sharing a single Primo instance.### Screenshot
![screenshot](screenshot.png)## Install
1. Make sure you've installed and configured [primo-explore-devenv](https://github.com/ExLibrisGroup/primo-explore-devenv).
2. Navigate to your template/central package root directory. For example:
```
cd primo-explore/custom/MY_VIEW_ID
```
3. If you do not already have a `package.json` file in this directory, create one:
```
npm init -y
```
4. Install this package:
```
npm install primo-explore-not-on-shelf --save-dev
```## Usage
Once this package is installed, add `notOnShelf` as a dependency for your custom module definition.```js
var app = angular.module('viewCustom', ['notOnShelf'])
```Note: If you're using the `--browserify` build option, you will need to first import the module with:
```javascript
import 'primo-explore-not-on-shelf';
```You can configure the message by passing a configuration object. All properties are required.
| name | type | usage |
|-----------|--------------|-----------------------------------------------------------------------------------------|
| `urlBase` | string | Base url for link. This can include additional GET parameters as needed. |
| `query_mappings` | object | Maps the GET URL fields for title, author, callnumber, location. For example, if you want your final URL to have the title value associated with "myTitle" (resulting in a URL parameter ...&myTitle=TheItemTitle&....), then the title portion of the object should read: 'title' : 'myTitle'.
| `locationCodes` | array | Whitelist of location codes for which the links should appear. | |The code below creates a link that points to a Google Form in which the title, author, call number, and location are pre-populated (see [here](https://productforums.google.com/forum/#!topic/docs/4dzyiCDeFu0;context-place=forum/docs) for more info). The example shows settings for two libraries, each with its own configuration. "Watzek" and "Law" are the respective codes for each library in Alma. At least one library is required.
```js
app.value('nosOptions',[{
"Watzek": [{
"urlBase": "https://docs.google.com/forms/d/e/1FAIpQLSdBvdqmK0z1mHhg-ATiCHT94JVBuwdaaHzpyZJcK3XBGEP-IA/viewform?usp=pp_url",
"query_mappings" : [{
'title': 'entry.956660822',
'author': 'entry.1791543904',
'callnumber': 'entry.865809076',
'location': 'entry.431935401'
}],
"locationCodes": ["wmain","wvid","wref","wdis","wgovd","wgovav","wjuv","weasy","wnew","wos","wbalc","wluo"]
}],
"Law": [{
"urlBase": "https://docs.google.com/forms/d/e/1FAIpQLSeevMvoTWs7JOw7BHvz1dXsRlAYpp9gi4qDByLU4NTrmvs2hQ/viewform?usp=pp_url",
"query_mappings" : [{
'title': 'entry.956660822',
'author': 'entry.1791543904',
'callnumber': 'entry.865809076',
'location': 'entry.431935401'
}],
"locationCodes":["lsta","lfed","lhist","lcv","lenv","lmain","lstu"]
}]
}])
```
Configuation for just one library would look like this:```js
app.value('nosOptions',[{
"Watzek": [{
"urlBase": "https://docs.google.com/forms/d/e/1FAIpQLSdBvdqmK0z1mHhg-ATiCHT94JVBuwdaaHzpyZJcK3XBGEP-IA/viewform?usp=pp_url",
"query_mappings" : [{
'title': 'entry.956660822',
'author': 'entry.1791543904',
'callnumber': 'entry.865809076',
'location': 'entry.431935401'
}],
"locationCodes": ["wmain","wvid","wref","wdis","wgovd","wgovav","wjuv","weasy","wnew","wos","wbalc","wluo"]
}]
}])
```