Jeremiah Kellogg, Eastern Oregon University
Documentation updated for Primo VE by Carlos Torres, Seattle University
Favorites lists can be created by guest users, but once they end their session that list goes away. In order to make a favorites list permanent the user needs to login, however Primo has no built in warning to let guest users know this. This development offers a pop-up up modal that warns users to log in to Primo to save their favorites list permanently.
The warning appears whenever a user clicks on a button with a pin icon and they aren’t logged in. This warning modal gives the option of logging in or dismissing the warning. Dismissing the warning ensures the modal won’t pop up again during the user’s current session.
Alma Discovery Configure Views
Alma Discovery Configure Views, JS, and CSS
Not tested for accessibility.
Tested on Chrome, Firefox, Edge, and Safari
Tested on iPhone
To enable this module, you will need to:
- Include the module (steps 2-3)
- Customize the text and display of the warning (steps 4-5)
- Turn on inheritance from the Central Package.
- In your local package, in the custom.js file, include the module ‘showFavoritesWarning’ in your app definition. For example:
var app = angular.module('viewCustom', ['showFavoritesWarning']);
If you are using other angular modules, include them in your app definition as well. For example:
var app = angular.module('viewCustom', ['
- Also in the custom.js file, add the following lines of code within the anonymous function (that is, before the closing brackets at the end of the file).
If your institution uses uses the Badges Information Modal in the Primo VE Toolkit, you will need to hook into the same prmIconAfter compenent as that customization:
If your institution does not implement the Badges Information Modal module you can omit it like so:
- If you want to customize text associated with warning, add the following block of code within the anonymous function and edit the values.
favWarnBarTxt: 'Sign in to make your favorites list permanent',
favWarnModalTitleText: 'Sign in to make your favorites list permanent',
favWarnModalContentText: 'You can create a favorites list as a Guest, but to save a list permanently you must be signed in',
- In your local package, in the custom1.css file, add the following CSS if you want to customize colors, padding, or text styles:
/* id for customizing the header box of the fav warning pop-up modal */
/* id for customizing text and font attributes in fav warning pop-up modal header */
/* id for customizing modal content box below modal header */
/* id for customizing modal content text below header */
- Zip and upload your package in Alma Discovery. Save your view.