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

Display link to item's collection's item. #732

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Conversation

justinlittman
Copy link
Contributor

closes #715

image

@justinlittman justinlittman force-pushed the t715-collection_member branch from 7be3039 to b56077f Compare October 25, 2023 11:52
@@ -0,0 +1,15 @@
<% if document.containing_purl_collections.any? %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just use .present? here instead of .any? We don't need to test the truthiness of any of these values, right?

@@ -6,7 +6,7 @@
<% end %>
<%= tag :link, rel: "alternate", title: "MODS XML", type: 'application/xml', href: purl_url(@purl, format: 'mods') if @purl.mods? %>
<%= tag :link, rel: "alternate", title: "IIIF Manifest", type: 'application/json', href: iiif_manifest_url(@purl) if @purl.iiif_manifest? %>
<%= tag :link, rel: "up", href: purl_url(@purl.containing_collection) if @purl.containing_collection.present? %>
<%= tag :link, rel: "up", href: purl_url(@purl.containing_collections.first) if @purl.containing_collections.any? %>
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, I think present? is ideal here unless we're trying to filter out falsey values.

@justinlittman justinlittman marked this pull request as draft October 25, 2023 13:38
@justinlittman justinlittman force-pushed the t715-collection_member branch from b56077f to 6fc28fa Compare October 25, 2023 13:44
@justinlittman justinlittman marked this pull request as ready for review October 26, 2023 17:57
@justinlittman justinlittman requested a review from jcoyne October 26, 2023 17:57
@jcoyne jcoyne merged commit 2a49e01 into main Oct 26, 2023
1 check passed
@jcoyne jcoyne deleted the t715-collection_member branch October 26, 2023 20:17
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.

Collection member PURL pages should support exploring the collection
2 participants