<% solr_documents_carousel_block.each_document.each_with_index do |(block_options, document), index| %>
<% doc_presenter = index_presenter(document) %>
<% if block_options[:full_image_url].present? %>
<%= link_to_document(document, image_tag(block_options[:full_image_url]), counter: -1) %>
<% elsif block_options[:iiif_tilesource_base].present? %>
<%= link_to_document(document, image_tag(block_options[:iiif_tilesource_base] + '/full/!800,800/0/default.jpg'), counter: -1) %>
<% elsif has_thumbnail? document %>
<%= render_thumbnail_tag(document, {}, document_counter: -1) %>
<% end %>
<% if solr_documents_carousel_block.primary_caption? %>
<%= doc_presenter.field_value(blacklight_config.index_fields[solr_documents_carousel_block.primary_caption_field] || Blacklight::Configuration::NullField.new(solr_documents_carousel_block.primary_caption_field)) %>
<% end %>
<% if solr_documents_carousel_block.secondary_caption? %>
<%= doc_presenter.field_value(blacklight_config.index_fields[solr_documents_carousel_block.secondary_caption_field] || Blacklight::Configuration::NullField.new(solr_documents_carousel_block.secondary_caption_field)) %>
<% end %>
<% indicators << capture do %>
<% end %>
<% end %>