% solr_documents_features_block.with_solr_helper(self) %>
<% indicators = [] %>
<% html_id = "carousel-#{solr_documents_features_block.object_id}" %>
<% if solr_documents_features_block.documents? %>
<% solr_documents_features_block.each_document.each_with_index do |(block_options, document), index| %>
<% doc_presenter = index_presenter(document) %>
<% if block_thumb = block_options[:full_image_url] %>
<%= link_to_document(document, image_tag(block_thumb), counter: -1) %>
<% elsif has_thumbnail? document %>
<%= render_thumbnail_tag(document, {}, document_counter: -1) %>
<% end %>
<% indicators << capture do %>
<%= truncate(caption_text, length: 95) %>
<% if solr_documents_features_block.secondary_caption? %>
<%= doc_presenter.field_value solr_documents_features_block.secondary_caption_field %>
<% end %>
<% end %>
<% end %>
<%= safe_join(indicators, "\n") %>
<% end %>