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

There should be a method to use a large image for the slideshow #19

Open
jcoyne opened this issue Jan 9, 2015 · 4 comments
Open

There should be a method to use a large image for the slideshow #19

jcoyne opened this issue Jan 9, 2015 · 4 comments

Comments

@jcoyne
Copy link
Member

jcoyne commented Jan 9, 2015

Currently I'm overriding the whole partial. Ideally I could just use a config variable.
curationexperts/alexandria-legacy@d5e1ce7

@cbeer
Copy link
Member

cbeer commented Jan 9, 2015

Are you unable to configure the thumbnail field for the slideshow view? e.g.

configure_blacklight do |config|
  config.view.slideshow.thumbnail_field = "image_url_ssm"
end

@jcoyne
Copy link
Member Author

jcoyne commented Jan 12, 2015

@cbeer: that works, but then it is used both for the square small image and slideshow image. I'd prefer to use a different resolution for each.

@cbeer
Copy link
Member

cbeer commented Jan 12, 2015

Got it. I forgot that the slideshow and the gallery used the same view type.

@dunn
Copy link

dunn commented Aug 15, 2017

Not sure when slideshow_method was added, but now it lets us do this:

module Blacklight::GalleryHelper
  WITH_LARGE_IMAGES = %w[
    Image
    ComponentMap
    IndexMap
    ScannedMap
  ].freeze

  def choose_image(document, options)
    if WITH_LARGE_IMAGES.include? document["has_model_ssim"].first
      image_tag(document["image_url_ssm"].first, options)
    else
      render_thumbnail_tag(
        document,
        options,
        url_options.reverse_merge(suppress_link: true)
      )
    end
  end
end

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

No branches or pull requests

3 participants