<commit_before>- @title = "#{@variable.name.upcase} - #{@dataset.slug.upcase} Variables"

= render "variables/header"

.row.mb-3
  .col-md-3.d-none.d-md-block
    = render "variables/menu"
  .col-md-9
    %h1.variable-header
      History
      - if @variable.dataset_version
        - download_url = files_dataset_path(@dataset) + "/datasets/archive/#{@variable.dataset_version.version}"
        = link_to download_url, class: "btn btn-outline-primary" do
          %i.fa.fa-file-text-o
          View Change Log

    %table.table.table-striped.table-hover.table-sticky.table-borderless
      %col
      %col{ width: "1px" }
      %thead
        %tr
          %th Version
          %th.nowrap Release Date

      - @dataset.dataset_versions.where(id: @dataset.variables.where(name: @variable.name).select(:dataset_version_id)).order(release_date: :desc).each do |dataset_version|
        %tr{ style: (dataset_version.id == @variable.dataset_version_id ? "font-weight: bold" : nil) }
          %td
            = link_to dataset_version.version, dataset_variable_path(@dataset, @variable, v: dataset_version.version)
            - if dataset_version.id == @dataset.dataset_version_id
              %span.badge.badge-primary latest release
            - elsif dataset_version.id == @variable.dataset_version_id
              %span.badge.badge-primary viewing
          %td.nowrap
            = dataset_version.release_date&.strftime("%b %-d, %Y")

.d-block.d-md-none= render "variables/menu"<commit_msg>Improved link to CHANGELOG from variable history<commit_after>- @title = "#{@variable.name.upcase} - #{@dataset.slug.upcase} Variables"

= render "variables/header"

.row.mb-3
  .col-md-3.d-none.d-md-block
    = render "variables/menu"
  .col-md-9
    %h1.variable-header
      History
      - if @variable.dataset_version
        - download_url = files_dataset_path(@dataset) + "/m/browser/datasets/archive/#{@variable.dataset_version.version}/CHANGELOG.md?preview=1"
        = link_to download_url, class: "btn btn-outline-primary" do
          %i.fa.fa-file-text-o
          View Change Log

    %table.table.table-striped.table-hover.table-sticky.table-borderless
      %col
      %col{ width: "1px" }
      %thead
        %tr
          %th Version
          %th.nowrap Release Date

      - @dataset.dataset_versions.where(id: @dataset.variables.where(name: @variable.name).select(:dataset_version_id)).order(release_date: :desc).each do |dataset_version|
        %tr{ style: (dataset_version.id == @variable.dataset_version_id ? "font-weight: bold" : nil) }
          %td
            = link_to dataset_version.version, dataset_variable_path(@dataset, @variable, v: dataset_version.version)
            - if dataset_version.id == @dataset.dataset_version_id
              %span.badge.badge-primary latest release
            - elsif dataset_version.id == @variable.dataset_version_id
              %span.badge.badge-primary viewing
          %td.nowrap
            = dataset_version.release_date&.strftime("%b %-d, %Y")

.d-block.d-md-none= render "variables/menu"
{'fraction_non_alphanumeric': 0.13289902280130292, 'fraction_numerical': 0.0035830618892508143, 'mean_word_length': 2.704463208685163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1542490', 'n_tokens_mistral': 991, 'n_tokens_neox': 983, 'n_words': 163}