Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add searchworks url to toolbar #1082

Merged
merged 3 commits into from
Jul 12, 2024
Merged

Add searchworks url to toolbar #1082

merged 3 commits into from
Jul 12, 2024

Conversation

peetucket
Copy link
Member

@peetucket peetucket commented Jul 11, 2024

Fixes #310 and follow on from sul-dlss/searchworks_traject_indexer#1490

If searchworks url is present in solr document, render on the page.

Todo:

  • styling
  • move location on the page?
  • use latest geoblacklight (main)?

With link:

http://localhost:3000/catalog/stanford-dt131hw5005

Screenshot 2024-07-11 at 1 57 28 PM

}
config.add_show_tools_partial :data_dictionary, partial: 'data_dictionary', if: proc { |_context, _config, options|
options[:document] && options[:document].data_dictionary_download.present?
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these can now all come from geoblacklight components

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't them need to be updated, not removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me the conditional logic for when to show the tools to me looks identical in geoblacklight, and i couldn't even find the partials that are referenced here in earthworks ... so I was presuming that since earthworks is derived from geoblacklight, they don't need to be re-defined here

but i'm not 100% sure, would certainly be nice to validate with enough real data to be confident

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking core GeoBlacklight code, the ArcGIS and DataDictionary components are now included. I also see the metadata partial being added similar to the above, so including the latest GeoBlacklight code on the main branch means we no longer require the additions above. For reference: https://github.com/geoblacklight/geoblacklight/blob/main/lib/generators/geoblacklight/templates/catalog_controller.rb#L309

(@document.public? && @document.available?) ||
(@document.same_institution? && user_signed_in? && @document.available?)
def document_available?(document = @document)
super && document.available?
end
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because of other changes made in item_map_viewer_component...see https://stanfordlib.slack.com/archives/C0AAK1HNY/p1720731983010169

@peetucket peetucket changed the title [WIP] add searchworks url to toolbar Add searchworks url to toolbar Jul 12, 2024
@peetucket peetucket marked this pull request as ready for review July 12, 2024 17:58
@hudajkhan hudajkhan merged commit 5c12c4f into main Jul 12, 2024
3 checks passed
@hudajkhan hudajkhan deleted the 310-link-to-searchworks branch July 12, 2024 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add link to view in SearchWorks
3 participants