<commit_before><% if !@document['image_plate_number_s'].blank? %>
  <script type="text/javascript">
    window.iiifData = 'http://iiif.itatti.harvard.edu/Scaler/IIIF/florentinedrawings!Plate_<%=@document['image_plate_number_s']%>.jpg/info.json'
  </script>
<% end %>

<%= render 'previous_next_doc' %>

<% @page_title = t('blacklight.search.show.title', :document_title => document_show_html_title, :application_name => application_name).html_safe %>
<% content_for(:head) { render_link_rel_alternates } %>

<div id="document" class="document <%= render_document_class %>" itemscope  itemtype="<%= @document.itemtype %>">
  <div id="doc_<%= @document.id.to_s.parameterize %>">
    <%
      p @document
      recto_label = (@document['verso_title_1961_t'][0] == '--' ? '' : 'Recto ')

      image_list = []
      p "-----"

      #if !@document['image_plate_display'].nil?
      #  image_list << {:image=>'/assets/temp_iiif.jpg', :alt => 'View IIIF image', :link => @document['image_plate_display'][0] }
      #end

      if !@document['image_plate_number_s'].nil?
       image_list << {:image=>"http://iiif.itatti.harvard.edu/Scaler/IIIF/florentinedrawings!Plate_#{@document['image_plate_number_s']}.jpg/full/!150,75", :iiif => true, :alt => 'View IIIF image', :link => "http://iiif.itatti.harvard.edu/Scaler/IIIF/florentinedrawings!Plate_#{@document['image_plate_number_s']}.jpg/full/full/0/native.jpg"}
      end
      if !@document['image_bm_display'].nil?
        image_list << {:image=>@document['image_bm_display'][0], :iiif => false, :alt => 'Image from British museum', :link => @document['image_bm_display'][0] }
      end

      if !@document['image_page_display'].nil?
        image_list << {:image=>@document['image_page_display'][0], :iiif => false, :alt => '', :link => @document['image_page_display'][0] }
      end



    %>

    <div class="row">
      <div class="col-md-5">
        <% if image_list.size == 0 %>
          <div class="thumbnail">
            <img alt="No Image" src="" data-holder-rendered="true" style="height: 180px; width: 100%; display: block;">
          </div>
        <% else %>


          <% if !@document['image_plate_number_s'].blank? %>
            <div id="openseadragon" style="display:block;" class="thumbnail"></div>
            <a href=""  id="main-image-link" class="thumbnail">
              <img alt="" id="main-image" src="" data-holder-rendered="true" style="width: 100%; display: block;">
            </a>

          <% else %>

          <a href="<%=image_list[0][:link]%>" style="display:block;" id="main-image-link" class="thumbnail">
            <img alt="<%=image_list[0][:alt]%>" id="main-image" src="<%=image_list[0][:image]%>" data-holder-rendered="true" style="width: 100%; display: block;">
          </a>



          <% end %>




          <div class="row">
              <% image_list.each do |img| %>
                <div class="col-xs-3 col-md-3">
                  <a href="<%=img[:link]%>" class="thumbnail preview-thumbnail" data-iiif="<%=img[:iiif]%>" data-src="<%=img[:image]%>">
                    <img alt="<%=img[:alt]%>"   src="<%=img[:image]%>" data-holder-rendered="true" style="width: 50px; display: block;">
                  </a>
                </div>
              <% end %>
          </div>
        <% end %>
      </div>

      <div class="col-md-7">
       <dl class="dl-horizontal">
          <dt><%="Inventory Number"%></dt>
          <dd><%=@document['inventory_number_s']%></dd>

          <dt><%="Berenson #{recto_label}Title (1961)"%></dt>
          <dd><%=@document['recto_title_1961_t'][0]%></dd>
          <% if @document['verso_title_1961_t'][0] != '--' %>
            <dt>Berenson Verso Title (1961)</dt>
            <dd><%=@document['verso_title_1961_t'][0]%></dd>
          <% end %>

          <% if !@document['recto_title_1938_t'][0].blank? %>
            <dt><%="Berenson #{recto_label}Title (1938)"%></dt>
            <dd><%=@document['recto_title_1938_t'][0]%></dd>
            <% if @document['verso_title_1938_t'][0] != '--' %>
              <dt>Berenson Verso Title (1938)</dt>
              <dd><%=@document['verso_title_1938_t'][0]%></dd>
            <% end %>
            <% if !@document['author_1938_display_s'].blank? %>
              <dt>Artist Attribution</dt>
              <dd><a href="/?f%5Bsubject_topic_facet%5D%5B%5D=<%=@document['author_t'][0]%>"><%=@document['author_1938_display_s']%></a></dd>
            <% end %>
          <% end %>

          <% if !@document['author_1961_display_s'].blank? %>
            <% if @document['author_1938_display_s'] != @document['author_1961_display_s'] %>
              <dt>Artist Attribution (1961)</dt>
              <dd><a href="/?f%5Bsubject_topic_facet%5D%5B%5D=<%=@document['author_t'][0]%>"><%=@document['author_1961_display_s']%></a></dd>
            <% end %>
          <% end %>





          <% if !@document['technique_recto_t'].blank?%>
            <dt><%="#{recto_label}Technique"%></dt>
            <dd>
              <% @document['technique_recto_t'].each_with_index do |tech, index| %>
                <a href="/?f%5Btechnique_facet%5D%5B%5D=<%=tech%>"><%=tech%><% if index < @document['technique_recto_t'].size-1  %>, <% end %></a>
              <% end %>
            </dd>
          <% end %>

          <% if !@document['technique_verso_t'].blank?%>
            <dt><%="Verso Technique"%></dt>
            <dd>
              <% @document['technique_verso_t'].each_with_index do |tech, index| %>
                <a href="/?f%5Btechnique_facet%5D%5B%5D=<%=tech%>"><%=tech%><% if index < @document['technique_verso_t'].size-1  %>, <% end %></a>
              <% end %>
            </dd>
          <% end %>



          <% if !@document['verso_figures_1961_t'].blank? %>
            <% if !@document['recto_figures_1961_t'][0].blank? and @document['recto_figures_1961_t'][0] != '--' %>
              <dt><%="#{recto_label}Figures"%></dt>
              <dd><%=@document['recto_figures_1961_t'][0]%></dd>
            <% end %>
            <% if !@document['verso_figures_1961_t'][0].blank? and @document['verso_figures_1961_t'][0] != '--' %>
              <dt><%="Verso Figures"%></dt>
              <dd><%=@document['verso_figures_1961_t'][0]%></dd>
            <% end %>
          <% end %>

          <% if !@document['owners_label_t'].blank?%>
            <dt><%="Location"%></dt>
            <dd>
              <% @document['owners_label_t'].each_with_index do |label, index| %>
                <% if !@document['owners_geo_label_t'].blank? %>
                  <%=label%><% if !@document['owners_geo_label_t'][index].nil? %> (<%=@document['owners_geo_label_t'][index]%>)<% end %> <% if !@document['bm_uri_s'].blank? %> <a href="<%=@document['bm_uri_s']%>">View Record</a><% end %>
                <% end %>
              <% end %>
            </dd>
          <% end %>
          <% if !@document['museum_url_s'].blank?%>
            <dt><%="Link"%></dt>
            <dd><%=@document['museum_url_s']%></dd>
          <% end %>

          <% if !@document['page_number_1903_s'].blank?%>
            <dt><%="1903 Page Number"%></dt>
            <dd><%=@document['page_number_1903_s']%></dd>
          <% end %>



        </dl>

        <hr>
        <div class="row">
          <div class="col-md-6">
          </div>
          <div class="col-md-6">

            <table class="table table-striped data-table">
            <thead>
              <tr>
                <th>Data Sources</th>
              </tr>
            </thead>


              <tbody>
                <tr>
                  <td><NAME></td>
                  <td><a href="http://data.itatti.harvard.edu/id/florentinedrawings/<%="#{@document['id']}"%>"><%="#{@document['id']}"%></a></td>
                </tr>
                <% if !@document["contributors_t"].nil?%>
                  <% if @document["contributors_t"].size > 0%>
                    <tr>
                      <td>ULAN</td>
                      <td>
                      <% @document["contributors_t"].each_with_index do |name, index| %>

                          <a href="<%=@document["contributors_ulan_t"][index]%>"><%=name%></a>&nbsp;

                      <% end %>
                      </td>
                    </tr>
                  <% end %>
              <% end %>
                <% if !@document["technique_recto_t"].nil? and !@document["technique_verso_t"].nil?%>
                  <% if @document["technique_recto_t"].size > 0 or @document["technique_verso_t"].size > 0%>
                    <tr>
                      <td>AAT</td>
                       <td>
                      <% if !@document["technique_recto_t"].nil? %>

                          <% @document["technique_recto_t"].each_with_index do |name, index| %>
                              <a href="<%=@document["technique_recto_uri"][index]%>"><%=name%></a>&nbsp;

                          <% end %>
                    <% end %>
                      <% if !@document["technique_verso_t"].nil? %>
                        <% @document["technique_verso_t"].each_with_index do |name, index| %>
                            <a href="<%=@document["technique_verso_uri"][index]%>"><%=name%></a>&nbsp;
                        <% end %>
                    <% end %>
                     <td>
                    </tr>
                  <% end %>
              <% end %>
                <% if !@document["owners_label_t"].nil?%>
                  <% if @document["owners_label_t"].size > 0%>
                    <tr>
                      <td>VIAF</td>
                      <td>
                      <% @document["owners_label_t"].each_with_index do |name, index| %>

                          <a href="<%=@document["owners_uri_t"][index]%>"><%=name%></a>&nbsp;

                      <% end %>
                      </td>
                    </tr>
                  <% end %>
                <% end %>
                <% if !@document["owners_geo_label_t"].nil?%>
                  <% if @document["owners_geo_label_t"].size > 0%>
                    <tr>
                      <td>Geonames</td>
                      <td>
                      <% @document["owners_geo_label_t"].each_with_index do |name, index| %>

                          <a href="<%=@document["owners_geo_uri_t"][index]%>"><%=name%></a>&nbsp;

                      <% end %>
                      </td>
                    </tr>
                  <% end %>
                <% end %>
              </tbody>
            </table>
          </div>

        </div>
      </div>

    </div>



    <br/>
    <br/>
    <div class="pagination-search-widgets"></div>
    <h4>1961 Edition</h4>
    <dl class="dl-horizontal">
        <dt><%="#{recto_label}Title"%></dt>
        <dd><%=@document['recto_title_1961_t'][0]%></dd>
        <% if @document['verso_title_1961_t'][0] != '--' %>
          <dt>Verso Title</dt>
          <dd><%=@document['verso_title_1961_t'][0]%></dd>
        <% end %>
        <% if !@document['author_1961_display_s'].blank? %>
          <dt>Artist Attribution</dt>
          <dd><%=@document['author_1961_display_s']%></dd>
        <% end %>
        <% if !@document['bnc_1961_s'].blank? %>
          <dt title="Berenson Cat. No." alt="Berenson Cat. No.">Berenson Cat. No.</dt>
          <dd><%=@document['bnc_1961_s']%></dd>
        <% end %>

        <% if !@document['recto_note_1961_t'][0].blank? and @document['recto_note_1961_t'][0] != '--' %>
          <dt><%="#{recto_label}Notes"%></dt>
          <dd><%=@document['recto_note_1961_t'][0]%></dd>
        <% end %>
        <% if !@document['verso_note_1961_t'][0].blank? and @document['verso_note_1961_t'][0] != '--' %>
          <dt><%="Verso Notes"%></dt>
          <dd><%=@document['verso_note_1961_t'][0]%></dd>
        <% end %>

        <% if !@document['verso_figures_1961_t'].blank? %>
          <% if !@document['recto_figures_1961_t'][0].blank? and @document['recto_figures_1961_t'][0] != '--' %>
            <dt><%="#{recto_label}Figures"%></dt>
            <dd><%=@document['recto_figures_1961_t'][0]%></dd>
          <% end %>
          <% if !@document['verso_figures_1961_t'][0].blank? and @document['verso_figures_1961_t'][0] != '--' %>
            <dt><%="Verso Figures"%></dt>
            <dd><%=@document['verso_figures_1961_t'][0]%></dd>
          <% end %>
        <% end %>
      </dl>

    <div class="pagination-search-widgets"></div>
    <h4>1938 Edition</h4>
    <dl class="dl-horizontal">
        <dt><%="#{recto_label}Title"%></dt>
        <dd><%=@document['recto_title_1938_t'][0]%></dd>
        <% if @document['verso_title_1938_t'][0] != '--' %>
          <dt>Verso Title</dt>
          <dd><%=@document['verso_title_1938_t'][0]%></dd>
        <% end %>
        <% if !@document['author_1938_display_s'].blank? %>
          <dt>Artist Attribution</dt>
          <dd><%=@document['author_1938_display_s']%></dd>
        <% end %>
        <% if !@document['bnc_1938_s'].blank? %>
          <dt title="Berenson Cat. No." alt="Berenson Cat. No.">Berenson Cat. No.</dt>
          <dd><%=@document['bnc_1938_s']%></dd>
        <% end %>

        <% if !@document['recto_note_1938_t'][0].blank? and @document['recto_note_1938_t'][0] != '--' %>
          <dt><%="#{recto_label}Notes"%></dt>
          <dd><%=@document['recto_note_1938_t'][0]%></dd>
        <% end %>
        <% if !@document['verso_note_1938_t'][0].blank? and @document['verso_note_1938_t'][0] != '--' %>
          <dt><%="Verso Notes"%></dt>
          <dd><%=@document['verso_note_1938_t'][0]%></dd>
        <% end %>

        <% if !@document['verso_figures_1938_t'].blank? %>
          <% if !@document['recto_figures_1938_t'][0].blank? and @document['recto_figures_1938_t'][0] != '--' %>
            <dt><%="#{recto_label}Figures"%></dt>
            <dd><%=@document['recto_figures_1938_t'][0]%></dd>
          <% end %>
          <% if !@document['verso_figures_1938_t'][0].blank? and @document['verso_figures_1938_t'][0] != '--' %>
            <dt><%="Verso Figures"%></dt>
            <dd><%=@document['verso_figures_1938_t'][0]%></dd>
          <% end %>
        <% end %>
      </dl>
    <div class="pagination-search-widgets"></div>

    <h4>1903 Edition</h4>

    <% if @document['recto_title_1903_t'][0] == '--' and @document['author_1903_display_s'] == '--' %>

      <dl class="dl-horizontal">
        <dt></dt>
        <dd>Was not cataloged in the 1903 edition</dd>
      </dl>

    <% else %>
      <dl class="dl-horizontal">
          <dt><%="#{recto_label}Title"%></dt>
          <dd><%=@document['recto_title_1903_t'][0]%></dd>
          <% if @document['verso_title_1903_t'][0] != '--' %>
            <dt>Verso Title</dt>
            <dd><%=@document['verso_title_1903_t'][0]%></dd>
          <% end %>
          <% if !@document['author_1903_display_s'].blank? %>
            <dt>Artist Attribution</dt>
            <dd><%=@document['author_1903_display_s']%></dd>
          <% end %>
          <% if !@document['bnc_1903_s'].blank? %>
            <dt title="Berenson Cat. No." alt="Berenson Cat. No.">Berenson Cat. No.</dt>
            <dd><%=@document['bnc_1903_s']%></dd>
          <% end %>

          <% if !@document['recto_note_1903_t'][0].blank? and @document['recto_note_1903_t'][0] != '--' %>
            <dt><%="#{recto_label}Notes"%></dt>
            <dd><%=@document['recto_note_1903_t'][0]%></dd>
          <% end %>
          <% if !@document['verso_note_1903_t'][0].blank? and @document['verso_note_1903_t'][0] != '--' %>
            <dt><%="Verso Notes"%></dt>
            <dd><%=@document['verso_note_1903_t'][0]%></dd>
          <% end %>

          <% if !@document['verso_figures_1903_t'].blank? %>
            <% if !@document['recto_figures_1903_t'][0].blank? and @document['recto_figures_1903_t'][0] != '--' %>
              <dt><%="#{recto_label}Figures"%></dt>
              <dd><%=@document['recto_figures_1903_t'][0]%></dd>
            <% end %>
            <% if !@document['verso_figures_1903_t'][0].blank? and @document['verso_figures_1903_t'][0] != '--' %>
              <dt><%="Verso Figures"%></dt>
              <dd><%=@document['verso_figures_1903_t'][0]%></dd>
            <% end %>
          <% end %>
        </dl>
      <% end %>
  </div>
</div>


<% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
  <!--
       // COinS, for Zotero among others.
       // This document_partial_name(@document) business is not quite right,
       // but has been there for a while.
  -->
  <span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(document_partial_name(@document)) %>"></span>
<% end %>
<commit_msg>turn the locations into facet links<commit_after><% if !@document['image_plate_number_s'].blank? %>
  <script type="text/javascript">
    window.iiifData = 'http://iiif.itatti.harvard.edu/Scaler/IIIF/florentinedrawings!Plate_<%=@document['image_plate_number_s']%>.jpg/info.json'
  </script>
<% end %>

<%= render 'previous_next_doc' %>

<% @page_title = t('blacklight.search.show.title', :document_title => document_show_html_title, :application_name => application_name).html_safe %>
<% content_for(:head) { render_link_rel_alternates } %>

<div id="document" class="document <%= render_document_class %>" itemscope  itemtype="<%= @document.itemtype %>">
  <div id="doc_<%= @document.id.to_s.parameterize %>">
    <%
      p @document
      recto_label = (@document['verso_title_1961_t'][0] == '--' ? '' : 'Recto ')

      image_list = []
      p "-----"

      #if !@document['image_plate_display'].nil?
      #  image_list << {:image=>'/assets/temp_iiif.jpg', :alt => 'View IIIF image', :link => @document['image_plate_display'][0] }
      #end

      if !@document['image_plate_number_s'].nil?
       image_list << {:image=>"http://iiif.itatti.harvard.edu/Scaler/IIIF/florentinedrawings!Plate_#{@document['image_plate_number_s']}.jpg/full/!150,75", :iiif => true, :alt => 'View IIIF image', :link => "http://iiif.itatti.harvard.edu/Scaler/IIIF/florentinedrawings!Plate_#{@document['image_plate_number_s']}.jpg/full/full/0/native.jpg"}
      end
      if !@document['image_bm_display'].nil?
        image_list << {:image=>@document['image_bm_display'][0], :iiif => false, :alt => 'Image from British museum', :link => @document['image_bm_display'][0] }
      end

      if !@document['image_page_display'].nil?
        image_list << {:image=>@document['image_page_display'][0], :iiif => false, :alt => '', :link => @document['image_page_display'][0] }
      end



    %>

    <div class="row">
      <div class="col-md-5">
        <% if image_list.size == 0 %>
          <div class="thumbnail">
            <img alt="No Image" src="" data-holder-rendered="true" style="height: 180px; width: 100%; display: block;">
          </div>
        <% else %>


          <% if !@document['image_plate_number_s'].blank? %>
            <div id="openseadragon" style="display:block;" class="thumbnail"></div>
            <a href=""  id="main-image-link" class="thumbnail">
              <img alt="" id="main-image" src="" data-holder-rendered="true" style="width: 100%; display: block;">
            </a>

          <% else %>

          <a href="<%=image_list[0][:link]%>" style="display:block;" id="main-image-link" class="thumbnail">
            <img alt="<%=image_list[0][:alt]%>" id="main-image" src="<%=image_list[0][:image]%>" data-holder-rendered="true" style="width: 100%; display: block;">
          </a>



          <% end %>




          <div class="row">
              <% image_list.each do |img| %>
                <div class="col-xs-3 col-md-3">
                  <a href="<%=img[:link]%>" class="thumbnail preview-thumbnail" data-iiif="<%=img[:iiif]%>" data-src="<%=img[:image]%>">
                    <img alt="<%=img[:alt]%>"   src="<%=img[:image]%>" data-holder-rendered="true" style="width: 50px; display: block;">
                  </a>
                </div>
              <% end %>
          </div>
        <% end %>
      </div>

      <div class="col-md-7">
       <dl class="dl-horizontal">
          <dt><%="Inventory Number"%></dt>
          <dd><%=@document['inventory_number_s']%></dd>

          <dt><%="Berenson #{recto_label}Title (1961)"%></dt>
          <dd><%=@document['recto_title_1961_t'][0]%></dd>
          <% if @document['verso_title_1961_t'][0] != '--' %>
            <dt>Berenson Verso Title (1961)</dt>
            <dd><%=@document['verso_title_1961_t'][0]%></dd>
          <% end %>

          <% if !@document['recto_title_1938_t'][0].blank? %>
            <dt><%="Berenson #{recto_label}Title (1938)"%></dt>
            <dd><%=@document['recto_title_1938_t'][0]%></dd>
            <% if @document['verso_title_1938_t'][0] != '--' %>
              <dt>Berenson Verso Title (1938)</dt>
              <dd><%=@document['verso_title_1938_t'][0]%></dd>
            <% end %>
            <% if !@document['author_1938_display_s'].blank? %>
              <dt>Artist Attribution</dt>
              <dd><a href="/?f%5Bsubject_topic_facet%5D%5B%5D=<%=@document['author_t'][0]%>"><%=@document['author_1938_display_s']%></a></dd>
            <% end %>
          <% end %>

          <% if !@document['author_1961_display_s'].blank? %>
            <% if @document['author_1938_display_s'] != @document['author_1961_display_s'] %>
              <dt>Artist Attribution (1961)</dt>
              <dd><a href="/?f%5Bsubject_topic_facet%5D%5B%5D=<%=@document['author_t'][0]%>"><%=@document['author_1961_display_s']%></a></dd>
            <% end %>
          <% end %>





          <% if !@document['technique_recto_t'].blank?%>
            <dt><%="#{recto_label}Technique"%></dt>
            <dd>
              <% @document['technique_recto_t'].each_with_index do |tech, index| %>
                <a href="/?f%5Btechnique_facet%5D%5B%5D=<%=tech%>"><%=tech%><% if index < @document['technique_recto_t'].size-1  %>, <% end %></a>
              <% end %>
            </dd>
          <% end %>

          <% if !@document['technique_verso_t'].blank?%>
            <dt><%="Verso Technique"%></dt>
            <dd>
              <% @document['technique_verso_t'].each_with_index do |tech, index| %>
                <a href="/?f%5Btechnique_facet%5D%5B%5D=<%=tech%>"><%=tech%><% if index < @document['technique_verso_t'].size-1  %>, <% end %></a>
              <% end %>
            </dd>
          <% end %>



          <% if !@document['verso_figures_1961_t'].blank? %>
            <% if !@document['recto_figures_1961_t'][0].blank? and @document['recto_figures_1961_t'][0] != '--' %>
              <dt><%="#{recto_label}Figures"%></dt>
              <dd><%=@document['recto_figures_1961_t'][0]%></dd>
            <% end %>
            <% if !@document['verso_figures_1961_t'][0].blank? and @document['verso_figures_1961_t'][0] != '--' %>
              <dt><%="Verso Figures"%></dt>
              <dd><%=@document['verso_figures_1961_t'][0]%></dd>
            <% end %>
          <% end %>

          <% if !@document['owners_label_t'].blank?%>
            <dt><%="Location"%></dt>
            <dd>
              <% @document['owners_label_t'].each_with_index do |label, index| %>
                <% if !@document['owners_geo_label_t'].blank? %>
                  <%
                    if !@document['owners_geo_label_t'][index].nil?
                      label = label + " (#{@document['owners_geo_label_t'][index]})"
                    end
                  %>

                  <a href="/?f%5Bowner_facet%5D%5B%5D=<%=label%>"><%=label%></a> <% if !@document['bm_uri_s'].blank? %> <a href="<%=@document['bm_uri_s']%>">View Record</a><% end %>
                <% end %>
              <% end %>
            </dd>
          <% end %>
          <% if !@document['museum_url_s'].blank?%>
            <dt><%="Link"%></dt>
            <dd><%=@document['museum_url_s']%></dd>
          <% end %>

          <% if !@document['page_number_1903_s'].blank?%>
            <dt><%="1903 Page Number"%></dt>
            <dd><%=@document['page_number_1903_s']%></dd>
          <% end %>



        </dl>

        <hr>
        <div class="row">
          <div class="col-md-6">
          </div>
          <div class="col-md-6">

            <table class="table table-striped data-table">
            <thead>
              <tr>
                <th>Data Sources</th>
              </tr>
            </thead>


              <tbody>
                <tr>
                  <td><NAME></td>
                  <td><a href="http://data.itatti.harvard.edu/id/florentinedrawings/<%="#{@document['id']}"%>"><%="#{@document['id']}"%></a></td>
                </tr>
                <% if !@document["contributors_t"].nil?%>
                  <% if @document["contributors_t"].size > 0%>
                    <tr>
                      <td>ULAN</td>
                      <td>
                      <% @document["contributors_t"].each_with_index do |name, index| %>

                          <a href="<%=@document["contributors_ulan_t"][index]%>"><%=name%></a>&nbsp;

                      <% end %>
                      </td>
                    </tr>
                  <% end %>
              <% end %>
                <% if !@document["technique_recto_t"].nil? and !@document["technique_verso_t"].nil?%>
                  <% if @document["technique_recto_t"].size > 0 or @document["technique_verso_t"].size > 0%>
                    <tr>
                      <td>AAT</td>
                       <td>
                      <% if !@document["technique_recto_t"].nil? %>

                          <% @document["technique_recto_t"].each_with_index do |name, index| %>
                              <a href="<%=@document["technique_recto_uri"][index]%>"><%=name%></a>&nbsp;

                          <% end %>
                    <% end %>
                      <% if !@document["technique_verso_t"].nil? %>
                        <% @document["technique_verso_t"].each_with_index do |name, index| %>
                            <a href="<%=@document["technique_verso_uri"][index]%>"><%=name%></a>&nbsp;
                        <% end %>
                    <% end %>
                     <td>
                    </tr>
                  <% end %>
              <% end %>
                <% if !@document["owners_label_t"].nil?%>
                  <% if @document["owners_label_t"].size > 0%>
                    <tr>
                      <td>VIAF</td>
                      <td>
                      <% @document["owners_label_t"].each_with_index do |name, index| %>

                          <a href="<%=@document["owners_uri_t"][index]%>"><%=name%></a>&nbsp;

                      <% end %>
                      </td>
                    </tr>
                  <% end %>
                <% end %>
                <% if !@document["owners_geo_label_t"].nil?%>
                  <% if @document["owners_geo_label_t"].size > 0%>
                    <tr>
                      <td>Geonames</td>
                      <td>
                      <% @document["owners_geo_label_t"].each_with_index do |name, index| %>

                          <a href="<%=@document["owners_geo_uri_t"][index]%>"><%=name%></a>&nbsp;

                      <% end %>
                      </td>
                    </tr>
                  <% end %>
                <% end %>
              </tbody>
            </table>
          </div>

        </div>
      </div>

    </div>



    <br/>
    <br/>
    <div class="pagination-search-widgets"></div>
    <h4>1961 Edition</h4>
    <dl class="dl-horizontal">
        <dt><%="#{recto_label}Title"%></dt>
        <dd><%=@document['recto_title_1961_t'][0]%></dd>
        <% if @document['verso_title_1961_t'][0] != '--' %>
          <dt>Verso Title</dt>
          <dd><%=@document['verso_title_1961_t'][0]%></dd>
        <% end %>
        <% if !@document['author_1961_display_s'].blank? %>
          <dt>Artist Attribution</dt>
          <dd><%=@document['author_1961_display_s']%></dd>
        <% end %>
        <% if !@document['bnc_1961_s'].blank? %>
          <dt title="Berenson Cat. No." alt="Berenson Cat. No.">Berenson Cat. No.</dt>
          <dd><%=@document['bnc_1961_s']%></dd>
        <% end %>

        <% if !@document['recto_note_1961_t'][0].blank? and @document['recto_note_1961_t'][0] != '--' %>
          <dt><%="#{recto_label}Notes"%></dt>
          <dd><%=@document['recto_note_1961_t'][0]%></dd>
        <% end %>
        <% if !@document['verso_note_1961_t'][0].blank? and @document['verso_note_1961_t'][0] != '--' %>
          <dt><%="Verso Notes"%></dt>
          <dd><%=@document['verso_note_1961_t'][0]%></dd>
        <% end %>

        <% if !@document['verso_figures_1961_t'].blank? %>
          <% if !@document['recto_figures_1961_t'][0].blank? and @document['recto_figures_1961_t'][0] != '--' %>
            <dt><%="#{recto_label}Figures"%></dt>
            <dd><%=@document['recto_figures_1961_t'][0]%></dd>
          <% end %>
          <% if !@document['verso_figures_1961_t'][0].blank? and @document['verso_figures_1961_t'][0] != '--' %>
            <dt><%="Verso Figures"%></dt>
            <dd><%=@document['verso_figures_1961_t'][0]%></dd>
          <% end %>
        <% end %>
      </dl>

    <div class="pagination-search-widgets"></div>
    <h4>1938 Edition</h4>
    <dl class="dl-horizontal">
        <dt><%="#{recto_label}Title"%></dt>
        <dd><%=@document['recto_title_1938_t'][0]%></dd>
        <% if @document['verso_title_1938_t'][0] != '--' %>
          <dt>Verso Title</dt>
          <dd><%=@document['verso_title_1938_t'][0]%></dd>
        <% end %>
        <% if !@document['author_1938_display_s'].blank? %>
          <dt>Artist Attribution</dt>
          <dd><%=@document['author_1938_display_s']%></dd>
        <% end %>
        <% if !@document['bnc_1938_s'].blank? %>
          <dt title="Berenson Cat. No." alt="Berenson Cat. No.">Berenson Cat. No.</dt>
          <dd><%=@document['bnc_1938_s']%></dd>
        <% end %>

        <% if !@document['recto_note_1938_t'][0].blank? and @document['recto_note_1938_t'][0] != '--' %>
          <dt><%="#{recto_label}Notes"%></dt>
          <dd><%=@document['recto_note_1938_t'][0]%></dd>
        <% end %>
        <% if !@document['verso_note_1938_t'][0].blank? and @document['verso_note_1938_t'][0] != '--' %>
          <dt><%="Verso Notes"%></dt>
          <dd><%=@document['verso_note_1938_t'][0]%></dd>
        <% end %>

        <% if !@document['verso_figures_1938_t'].blank? %>
          <% if !@document['recto_figures_1938_t'][0].blank? and @document['recto_figures_1938_t'][0] != '--' %>
            <dt><%="#{recto_label}Figures"%></dt>
            <dd><%=@document['recto_figures_1938_t'][0]%></dd>
          <% end %>
          <% if !@document['verso_figures_1938_t'][0].blank? and @document['verso_figures_1938_t'][0] != '--' %>
            <dt><%="Verso Figures"%></dt>
            <dd><%=@document['verso_figures_1938_t'][0]%></dd>
          <% end %>
        <% end %>
      </dl>
    <div class="pagination-search-widgets"></div>

    <h4>1903 Edition</h4>

    <% if @document['recto_title_1903_t'][0] == '--' and @document['author_1903_display_s'] == '--' %>

      <dl class="dl-horizontal">
        <dt></dt>
        <dd>Was not cataloged in the 1903 edition</dd>
      </dl>

    <% else %>
      <dl class="dl-horizontal">
          <dt><%="#{recto_label}Title"%></dt>
          <dd><%=@document['recto_title_1903_t'][0]%></dd>
          <% if @document['verso_title_1903_t'][0] != '--' %>
            <dt>Verso Title</dt>
            <dd><%=@document['verso_title_1903_t'][0]%></dd>
          <% end %>
          <% if !@document['author_1903_display_s'].blank? %>
            <dt>Artist Attribution</dt>
            <dd><%=@document['author_1903_display_s']%></dd>
          <% end %>
          <% if !@document['bnc_1903_s'].blank? %>
            <dt title="Berenson Cat. No." alt="Berenson Cat. No.">Berenson Cat. No.</dt>
            <dd><%=@document['bnc_1903_s']%></dd>
          <% end %>

          <% if !@document['recto_note_1903_t'][0].blank? and @document['recto_note_1903_t'][0] != '--' %>
            <dt><%="#{recto_label}Notes"%></dt>
            <dd><%=@document['recto_note_1903_t'][0]%></dd>
          <% end %>
          <% if !@document['verso_note_1903_t'][0].blank? and @document['verso_note_1903_t'][0] != '--' %>
            <dt><%="Verso Notes"%></dt>
            <dd><%=@document['verso_note_1903_t'][0]%></dd>
          <% end %>

          <% if !@document['verso_figures_1903_t'].blank? %>
            <% if !@document['recto_figures_1903_t'][0].blank? and @document['recto_figures_1903_t'][0] != '--' %>
              <dt><%="#{recto_label}Figures"%></dt>
              <dd><%=@document['recto_figures_1903_t'][0]%></dd>
            <% end %>
            <% if !@document['verso_figures_1903_t'][0].blank? and @document['verso_figures_1903_t'][0] != '--' %>
              <dt><%="Verso Figures"%></dt>
              <dd><%=@document['verso_figures_1903_t'][0]%></dd>
            <% end %>
          <% end %>
        </dl>
      <% end %>
  </div>
</div>


<% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
  <!--
       // COinS, for Zotero among others.
       // This document_partial_name(@document) business is not quite right,
       // but has been there for a while.
  -->
  <span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(document_partial_name(@document)) %>"></span>
<% end %>

{'fraction_non_alphanumeric': 0.21909776235491205, 'fraction_numerical': 0.03063300227354314, 'mean_word_length': 2.103035366193261, 'pattern_counts': {'":': 0, '<': 1060, '<?xml version=': 0, '>': 1084, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6336044', 'n_tokens_mistral': 12660, 'n_tokens_neox': 11325, 'n_words': 1388}