<commit_before><%# show the object image(s)/file(s) and metadata %>
<%# TODO: refactor how views access files/volumes/etc., this is getting REALLY ugly %>
<% volumes = has_volumes?(@document) %>
<% book_reader = false %>
<% oai_object = @document[blacklight_config.show.display_type_field.to_sym] == 'OAIObject' ? true : false %>
<% if has_image_files?(@object_files) %>
    <%= javascript_include_tag 'openseadragon' %>
    <% case @object_files[:images].length %>
        <% when 1 %>
            <%= render :partial => 'catalog/_show_partials/show_default_img',
                       :locals => {:document => @document,
                                   :image_pid => @object_files[:images][0]['id'],
                                   :page_sequence => {:total => 1}} %>
        <% when 2..7 %>
            <%= render :partial => 'catalog/_show_partials/show_multi_img',
                       :locals => {:document => @document,
                                   :image_files => image_file_pids(@object_files[:images])} %>
        <% else %>
            <% book_reader = true %>
    <% end %>
<% end %>

<div class="row">

  <%# show thumbnail or icon if object has no images, or volume list %>
  <% if !has_image_files?(@object_files) || book_reader || volumes %>
      <div id="thumbnail_wrapper" class="col-sm-4">
        <div id="thumb_img_show_container">
          <% img = create_thumb_img_element(@document, %w(thumb_img_show)) %>
          <% if oai_object %>
              <%= render :partial => 'catalog/_show_partials/show_oai_item_img', :locals => {:document => @document, :img => img} %>
          <% elsif book_reader %>
              <%= render :partial => 'catalog/_show_partials/show_book_viewer_link', :locals => {:document => @document, :img => img} %>
          <% else %>
              <%= img %>
          <% end %>
        </div>
        <%= render :partial => 'catalog/_show_partials/show_oai_item_link', :locals => {:document => @document} if oai_object %>
        <% if volumes %>
            <%= render :partial => 'catalog/_show_partials/show_volumes',
                       :locals => {:document => @document, :volumes => volumes} %>
        <% end %>
      </div>
  <% end %>


<commit_msg>items with searchable text should display using bookviewer<commit_after><%# show the object image(s)/file(s) and metadata %>
<%# TODO: refactor how views access files/volumes/etc., this is getting REALLY ugly %>
<% volumes = has_volumes?(@document) %>
<% book_reader = has_searchable_text?(@document) ? true : false %>
<% oai_object = @document[blacklight_config.show.display_type_field.to_sym] == 'OAIObject' ? true : false %>
<% if !book_reader && has_image_files?(@object_files) %>
    <% case @object_files[:images].length %>
    <% when 1 %>
      <%= javascript_include_tag 'openseadragon' %>
      <%= render :partial => 'catalog/_show_partials/show_default_img',
                 :locals => {:document => @document,
                             :image_pid => @object_files[:images][0]['id'],
                             :page_sequence => {:total => 1}} %>
    <% when 2..7 %>
      <%= javascript_include_tag 'openseadragon' %>
      <%= render :partial => 'catalog/_show_partials/show_multi_img',
                 :locals => {:document => @document,
                             :image_files => image_file_pids(@object_files[:images])} %>
    <% else %>
      <% book_reader = true %>
    <% end %>
<% end %>

<div class="row">

  <%# show thumbnail or icon if object has no images, or volume list %>
  <% if !has_image_files?(@object_files) || book_reader || volumes %>
      <div id="thumbnail_wrapper" class="col-sm-4">
        <div id="thumb_img_show_container">
          <% img = create_thumb_img_element(@document, %w(thumb_img_show)) %>
          <% if oai_object %>
              <%= render :partial => 'catalog/_show_partials/show_oai_item_img', :locals => {:document => @document, :img => img} %>
          <% elsif book_reader %>
              <%= render :partial => 'catalog/_show_partials/show_book_viewer_link', :locals => {:document => @document, :img => img} %>
          <% else %>
              <%= img %>
          <% end %>
        </div>
        <%= render :partial => 'catalog/_show_partials/show_oai_item_link', :locals => {:document => @document} if oai_object %>
        <% if volumes %>
            <%= render :partial => 'catalog/_show_partials/show_volumes',
                       :locals => {:document => @document, :volumes => volumes} %>
        <% end %>
      </div>
  <% end %>



{'fraction_non_alphanumeric': 0.16681299385425813, 'fraction_numerical': 0.0026338893766461808, 'mean_word_length': 2.510785824345146, 'pattern_counts': {'":': 0, '<': 76, '<?xml version=': 0, '>': 126, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7646222', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1333, 'n_words': 276}