<commit_before><div class="c-extended-header -high">
  <div class="wrapper">
    <div class="two-options">
      <div class="description">
        <h1>Select a Dataset</h1>
        <p>Pick the dataset you want to use for the dashboard.</p>
      </div>
      <div class="description">
        <h1>Register a Dataset</h1>
        <p>You can also create a new dataset.</p>
        <%= link_to 'Register', new_management_site_dataset_step_path(@site.slug), class: 'c-button -outline js-register-dataset' %>
      </div>
    </div>
  </div>
</div>
<%= render partial: 'shared/navigation_header', locals: \
  {form_steps: form_steps, id: @page.id, current_step: step, step_names: @steps_names, \
  invalid_steps: @invalid_steps, invalid_state: @page.errors.any?} %>

<%= form_for @page, url: wizard_path, method: :put do |f| %>
  <div class="l-page-creation -dataset">
    <div class="wrapper">
        <% @context_datasets.each do |context_id, datasets| %>
          <%# TODO: Remove the DB query from the view %>
          <h3 class="context">
            <%= ::Context.find(context_id).name %></h3>
          <div class="c-cards-list">
            <% datasets.each do |dataset| %>
              <div class="card">
                <label for="dataset-<%= dataset.id %>"><%= dataset.name %></label>
                <%= radio_button_tag 'site_page[dataset_setting][context_id_dataset_id]', \
                  [context_id.to_s, dataset.id], f.object.dataset_setting ? (f.object.dataset_setting.dataset_id == dataset.id) : nil, id: 'dataset-' + dataset.id %>
                <div class="content">
                  <h3><%= dataset.name %></h3>
                  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
                </div>
              </div>
            <% end %>
          </div>
        <% end %>
      </div>
    </div>
    <%= render partial: 'management/steps_shared/footer', locals: {f: f, never_save: true} %>
<% end %>

<%= render partial: 'shared/errors', locals: { resource: @page } %>
<commit_msg>Fixes an issue with the list of datasets<commit_after><div class="c-extended-header -high">
  <div class="wrapper">
    <div class="two-options">
      <div class="description">
        <h1>Select a Dataset</h1>
        <p>Pick the dataset you want to use for the dashboard.</p>
      </div>
      <div class="description">
        <h1>Register a Dataset</h1>
        <p>You can also create a new dataset.</p>
        <%= link_to 'Register', new_management_site_dataset_step_path(@site.slug), class: 'c-button -outline js-register-dataset' %>
      </div>
    </div>
  </div>
</div>
<%= render partial: 'shared/navigation_header', locals: \
  {form_steps: form_steps, id: @page.id, current_step: step, step_names: @steps_names, \
  invalid_steps: @invalid_steps, invalid_state: @page.errors.any?} %>

<%= form_for @page, url: wizard_path, method: :put do |f| %>
  <div class="l-page-creation -dataset">
    <div class="wrapper">
        <% @context_datasets.each do |context_id, datasets| %>
          <%# TODO: Remove the DB query from the view %>
          <h3 class="context">
            <%= ::Context.find(context_id).name %></h3>
          <div class="c-cards-list">
            <% datasets.each do |dataset| %>
              <div class="card">
                <label for="dataset-<%= context_id %>-<%= dataset.id %>"><%= dataset.name %></label>
                <%= radio_button_tag 'site_page[dataset_setting][context_id_dataset_id]', \
                  [context_id.to_s, dataset.id], f.object.dataset_setting ? (f.object.dataset_setting.dataset_id == dataset.id) : nil, id: 'dataset-' + context_id.to_s + '-' + dataset.id %>
                <div class="content">
                  <h3><%= dataset.name %></h3>
                  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
                </div>
              </div>
            <% end %>
          </div>
        <% end %>
      </div>
    </div>
    <%= render partial: 'management/steps_shared/footer', locals: {f: f, never_save: true} %>
<% end %>

<%= render partial: 'shared/errors', locals: { resource: @page } %>

{'fraction_non_alphanumeric': 0.16856381690481956, 'fraction_numerical': 0.003875030273674013, 'mean_word_length': 2.473507148864592, 'pattern_counts': {'":': 0, '<': 108, '<?xml version=': 0, '>': 108, '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': '3624270', 'n_tokens_mistral': 1391, 'n_tokens_neox': 1304, 'n_words': 307}