sul-dlss/SearchWorks — pull request #308 by jkeck (2014-06-17 05:35:25+00:00)
Title: Add Library and Location classes to Holdings.

Update library location access panel code to use holdings/library class.

This is pre-requisite work for #292 and #293. It doesn't do anything in the way of logic regarding access, but it does handle library and location code translations.

With this code we can now simply iterate through all of libraries and locations for an object in a vew like so:

<% document.holdings.libraries.each do |library| %>
<% library.locations.each do |location| %>
<%= library.name %> - <%= location.name %>

<% location.items.each do |item| %>
<%= item.callnumber %>

<% end %>
<% end %>
<% end %>