Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alliance-pcsg/primo-explore-toggle-institutions
:school: adds a toggle to hide/show other institutions that own the item on the primo-explore details page.
https://github.com/alliance-pcsg/primo-explore-toggle-institutions
angularjs primo-explore
Last synced: about 1 month ago
JSON representation
:school: adds a toggle to hide/show other institutions that own the item on the primo-explore details page.
- Host: GitHub
- URL: https://github.com/alliance-pcsg/primo-explore-toggle-institutions
- Owner: alliance-pcsg
- License: mit
- Created: 2017-04-11T18:58:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-03T23:58:09.000Z (about 5 years ago)
- Last Synced: 2024-11-10T11:30:15.518Z (about 2 months ago)
- Topics: angularjs, primo-explore
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# primo-explore-toggle-institutions
[![npm version](https://img.shields.io/npm/v/primo-explore-toggle-institutions.svg)](https://www.npmjs.com/package/primo-explore-toggle-institutions)## Features
The list of institutions that also hold an item in details view is collapsed, and a button to toggle expanding the list appears.
### 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-toggle-institutions
```alternatively, just copy `dist/module.js` into your package's `custom.js` file.
## Usage
First, add `toggleInstitutions` as a dependency for your local view module definition.```js
var app = angular.module('viewCustom', ['toggleInstitutions'])
```
Then, enable the customization by embedding it in the `prmAlmaMoreInstAfter` hook:
```js
app.component('prmAlmaMoreInstAfter', {template: ''})
```
#### Configuration
The default is to initially collapse the list. If you wish to keep it open initially, you can replace the above with:
```js
app.component('prmAlmaMoreInstAfter', {template: ''})
```