Method: Sufia::SufiaHelperBehavior#sufia_thumbnail_tag
- Defined in:
- app/helpers/sufia/sufia_helper_behavior.rb
#sufia_thumbnail_tag(document, options) ⇒ Object
You can configure blacklight to use this as the thumbnail example:
config.index.thumbnail_method = :sufia_thumbnail_tag
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'app/helpers/sufia/sufia_helper_behavior.rb', line 42 def sufia_thumbnail_tag(document, ) # collection if (document.collection?) content_tag(:span, "", class: "glyphicon glyphicon-th collection-icon-search") # file else path = if document.image? || document.pdf? || document.video? || document.office_document? sufia.download_path document, file: 'thumbnail' elsif document.audio? "audio.png" else "default.png" end [:alt] = " " image_tag path, end end |