Closed yalamber closed 8 months ago
Hi @yalamber / Great question! That field, dct_references_s. is a little magical...
You'll need to do two things to accomplish this goal:
Add the new dct_references_s key for DZI items
The geoblacklight_admin/app/models/geoblacklight_admin/schema.rb
file configures the list of dct_reference_s
keys. You'll need to override this file locally — or you could submit a PR to move these mappings/values into a configurable file (settings.yml maybe or a json file)
Override the GeoBlacklight side of the application to add the new item viewer
You'll need to override the default GeoBlacklight::ItemViewer. Here's how I do that in the BTAA Geoportal We added the b1g_image
method and added it to the viewer_preference
array.
You'll also need to write the JS class that displays the deepzoom object, something similar to this GeoBlacklight.Viewer.B1gImage code.
I hope this helps! Let me know if you have any additional questions. In the meantime, I'm going to close this issue and open a new one to make dct_references_s
keys/options configurable.
Once we change the schema do we need to run migrations?
do we need to modify reference model as well? https://github.com/geobtaa/geoblacklight_admin/blob/83e24abf4d5743220c9a9bc99ae8ccab4dc79ade/app/models/document/reference.rb#L83
I am trying to add new values in the references and also add new item viewer based on the selected value. I want to add deepzoom viewer like https://openseadragon.github.io/ that supports DZi images, I am confused on if I should just aadd new form element or add addiotional option in dct_references_s that will allow users to add DZI images as well.