<commit_before><% if can_display_embargoed?(@resource) %>
  <div class="o-download">
    <%= button_to "Download the dataset files", @resource.download_uri, class: 'o-download__files js-download',
                  :data => {:url => increment_downloads_resource_path(@resource.id) }, id: "dl_res_#{@resource.id}" %>
  </div>

  <div class="o-download">
    <%= button_to "Download this data paper (PDF)", data_paper_path(params[:id]), class: 'o-download__docs', method: 'get' %>
  </div>

  <div class="c-sidebox">
    <h3 class="c-sidebox__heading">Data Files</h3>
    <% @id.resources.submitted.by_version.each do |resource| %>
      <details class="c-file-group" role="group">
        <summary class="o-showhide__summary c-file-group__summary">
        Version <%= resource.stash_version.version %></summary>
        <ul class="c-file-group__list">
      <% resource.current_file_uploads.each do |fu| %>
        <li><%= fu.upload_file_name %>&nbsp;<%= filesize(fu.upload_file_size) %></li>
      <% end %>
        </ul>
      </details>
    <% end %>
  </div>
<% end %>

<div class="c-sidebox">
  <h3 class="c-sidebox__heading">Metrics</h3>
  <div class="o-metrics">
    <div class="o-metrics__metric">
      <div class="o-metrics__group">
        <%= image_tag 'stash_engine/icon_eye.svg', class: 'o-metrics__icon', alt: '' %>
        <span class="o-metrics__label">views</span>
      </div>
      <span class="o-metrics__number"><%= @id.view_count %></span>
    </div>
    <div class="o-metrics__metric">
      <div class="o-metrics__group">
        <%= image_tag 'stash_engine/icon_graph.png', class: 'o-metrics__icon', alt: '' %>
        <span class="o-metrics__label">downloads</span>
      </div>
      <span class="o-metrics__number" id="current_download_count"><%= @id.download_count %></span><commit_msg>Display a message about the release date if it is embargoed.<commit_after><% if can_display_embargoed?(@resource) %>
  <div class="o-download">
    <%= button_to "Download the dataset files", @resource.download_uri, class: 'o-download__files js-download',
                  :data => {:url => increment_downloads_resource_path(@resource.id) }, id: "dl_res_#{@resource.id}" %>
  </div>

  <div class="o-download">
    <%= button_to "Download this data paper (PDF)", data_paper_path(params[:id]), class: 'o-download__docs', method: 'get' %>
  </div>

  <div class="c-sidebox">
    <h3 class="c-sidebox__heading">Data Files</h3>
    <% @id.resources.submitted.by_version.each do |resource| %>
      <details class="c-file-group" role="group">
        <summary class="o-showhide__summary c-file-group__summary">
        Version <%= resource.stash_version.version %></summary>
        <ul class="c-file-group__list">
      <% resource.current_file_uploads.each do |fu| %>
        <li><%= fu.upload_file_name %>&nbsp;<%= filesize(fu.upload_file_size) %></li>
      <% end %>
        </ul>
      </details>
    <% end %>
  </div>
<% else %>
  <div class="c-sidebox">
    <h3 class="c-sidebox__heading">Data Files</h3>
    <p>This dataset will be released on <%= formatted_date(@resource.embargo.end_date) %>.</p>
    <p>Lists of files and downloads will become available on the release date.</p>
  </div>
<% end %>

<div class="c-sidebox">
  <h3 class="c-sidebox__heading">Metrics</h3>
  <div class="o-metrics">
    <div class="o-metrics__metric">
      <div class="o-metrics__group">
        <%= image_tag 'stash_engine/icon_eye.svg', class: 'o-metrics__icon', alt: '' %>
        <span class="o-metrics__label">views</span>
      </div>
      <span class="o-metrics__number"><%= @id.view_count %></span>
    </div>
    <div class="o-metrics__metric">
      <div class="o-metrics__group">
        <%= image_tag 'stash_engine/icon_graph.png', class: 'o-metrics__icon', alt: '' %>
        <span class="o-metrics__label">downloads</span>
      </div>
      <span class="o-metrics__number" id="current_download_count"><%= @id.download_count %></span>
{'fraction_non_alphanumeric': 0.18588770864946888, 'fraction_numerical': 0.0025290844714213456, 'mean_word_length': 3.6203271028037385, 'pattern_counts': {'":': 0, '<': 113, '<?xml version=': 0, '>': 117, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 25, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4547786', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1323, 'n_words': 250}