rgilmour70 / ic-primo-ve

Primo VE customization files for Ithaca College Library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository contains the front-end customization code for Ithaca College Library's hosted Ex Libris Primo implementation.

The code herein assumes that you are using the primo-explore-devenv from @ExLibrisGroup.

Our main point of entry for Primo is a search box on the library home page. The code for the search box is available on CodePen.

On Back-End Compatibility

You'll see many lines in the custom JS in this repository that look something like this:

this.location = this.parentCtrl.result.delivery.bestlocation.subLocationCode;

Lines like these may need to be modified to match the data structure provided by your ILS. If you try to implement this code and see problems, console.log the variable and see if it contains what you think it should. If not, you'll probably need to modify the data path. To find the right path, console.log(this); within the directive that you're working on. This will log an object to the console and you can drill down through that to find the value you need.

Acknowledgements

Much of the code here was inspired by, if not copied outright from posts to PRIMO-DISCUSS-L and the IGeLU/ELUNA SIWG Slack channel, both from Ex Libris developers and from my fellow librarians. Material type icons were designed by @dtaylor4444. Thanks to @michaeldoran for the LC call number sorting functions, @alexei for sprintf.js, and Abby Juda (Science Librarian, Ithaca College) for many contributions to the code.

The Customizations

Icons for Material Types

The material type icons included in the img directory were designed by @dtaylor4444. His PrimoIcons repository includes an Adobe Illustrator file for the icons as well as the pngs included here.

Report a Problem

We added a "report a problem" action using the prmSearchResultAvailabilityLineAfter directive and primo-explore-custom-actions. This links to a form on the IC Library website. The code in this repository provides no functionality, just the link.

EBSCO / Google Scholar / WorldCat Links

We added "Try my search in ..." links for these services to the search results page. These open in a new window. These links do not replicate every aspect of the current search--they just get the main search terms into the service. An enthusiastic programmer who is familiar with the intricacies of the search URLs in these services could probably make them more precise.

Stack Maps

This is by far the most complex of the customizations. The code relating to the maps is anything but plug-and-play. Some of the details and challenges of implementing a stack map system in Primo are addressed here. The functions for manipulating LC call numbers in js/3-call_number_functions.js are JavaScript translations of sortLC by @michaeldoran. These functions in turn depend on sprintf-js by @alexei.

About

Primo VE customization files for Ithaca College Library.

License:MIT License


Languages

Language:CSS 57.8%Language:JavaScript 39.5%Language:SCSS 2.1%Language:HTML 0.6%