<commit_before><%#
This partial is the entry point for adding the modal search dialog to a page.
See the README.md within this directory for more info:

Locals:
  :namespace        - a unique name to identify the modal. This value can be used
                      to match a selected result to a section of the parent page.
  :label            - the text to display on the modal window. This will be swapped
                      in so that it reads: '[label] search'
  :search_examples  - Helpful text that will appear in the search term box as a
                      placeholder to givethe user some suggestions.
  :model_instance   - An instance of the parent object that the search results
                      will be associated to. (e.g. an instance of ResearchOutput
                      if the user will be searching for a license or repository).
                      This is used to help define the `form_with` on the modal search form.
  :search_path      - the path to controller endpoint that will perform the search
  :search_method    - the http method used to perform the search
%>

<%
search_examples = search_examples || ""
results = results || []

search_placeholder = _("- Enter a search term %{examples} -") % { examples: search_examples}
no_results_msg = _("No results matched your filter criteria.")
%>

<div id="modal-search-<%= namespace %>"
     class="modal fade modal-search"
     tabindex="-1"
     role="dialog"
     aria-labelledby="modal-search-label"
     aria-hidden="true">

  <div class="modal-dialog" role="document">
    <div class="modal-content">

      <div class="modal-header">
        <%= button_tag "X", type: "button", class: "close",
                       data: { dismiss: "modal" },
                       aria: { label: _("Close") } %>

        <h3 id="modal-search-label" class="modal-title">
          <%= _("%{topic} search") % { topic: label } %>
        </h3>
      </div>

      <div class="modal-body">
        <%# Search filters %>
        <%= form_with model: model_instance, url: search_path, method: search_method,
                      id: "modal-search-#{namespace}-filters" do |f| %>
          <div class="form-group row">
            <div class="col-md-10">
              <%= yield :"filters-#{namespace}" %>
            </div>
          </div>

          <div class="form-group row">
            <div class="col-md-10">
              <span class="col-md-10">
                <%= f.text_field :search_term,
                                 class: "form-control autocomplete col-md-6",
                                 placeholder: search_placeholder %>
              </span>
              <div class="col-md-3">
                <%= f.button _("Apply filter(s)"),
                             class: "btn btn-default",
                             type: "submit" %>
              </div>
            </div>
          </div>
        <% end %>
<commit_msg>Fixed UnknownFormat Exceoption when using Repositories/MetadataStandards filters in Research Output form<commit_after><%#
This partial is the entry point for adding the modal search dialog to a page.
See the README.md within this directory for more info:

Locals:
  :namespace        - a unique name to identify the modal. This value can be used
                      to match a selected result to a section of the parent page.
  :label            - the text to display on the modal window. This will be swapped
                      in so that it reads: '[label] search'
  :search_examples  - Helpful text that will appear in the search term box as a
                      placeholder to givethe user some suggestions.
  :model_instance   - An instance of the parent object that the search results
                      will be associated to. (e.g. an instance of ResearchOutput
                      if the user will be searching for a license or repository).
                      This is used to help define the `form_with` on the modal search form.
  :search_path      - the path to controller endpoint that will perform the search
  :search_method    - the http method used to perform the search
%>

<%
search_examples = search_examples || ""
results = results || []

search_placeholder = _("- Enter a search term %{examples} -") % { examples: search_examples}
no_results_msg = _("No results matched your filter criteria.")
%>

<div id="modal-search-<%= namespace %>"
     class="modal fade modal-search"
     tabindex="-1"
     role="dialog"
     aria-labelledby="modal-search-label"
     aria-hidden="true">

  <div class="modal-dialog" role="document">
    <div class="modal-content">

      <div class="modal-header">
        <%= button_tag "X", type: "button", class: "close",
                       data: { dismiss: "modal" },
                       aria: { label: _("Close") } %>

        <h3 id="modal-search-label" class="modal-title">
          <%= _("%{topic} search") % { topic: label } %>
        </h3>
      </div>

      <div class="modal-body">
        <%# Search filters %>
        <%= form_with model: model_instance, url: search_path, method: search_method, local: false,
                      id: "modal-search-#{namespace}-filters" do |f| %>
          <div class="form-group row">
            <div class="col-md-10">
              <%= yield :"filters-#{namespace}" %>
            </div>
          </div>

          <div class="form-group row">
            <div class="col-md-10">
              <span class="col-md-10">
                <%= f.text_field :search_term,
                                 class: "form-control autocomplete col-md-6",
                                 placeholder: search_placeholder %>
              </span>
              <div class="col-md-3">
                <%= f.button _("Apply filter(s)"),
                             class: "btn btn-default",
                             type: "submit" %>
              </div>
            </div>
          </div>
        <% end %>

{'fraction_non_alphanumeric': 0.11417521439381201, 'fraction_numerical': 0.0036993442071632755, 'mean_word_length': 1.829686013320647, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 65, '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': '7140990', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1535, 'n_words': 542}