<commit_before>= javascript_include_tag "carnival/advanced_search"
= link_to t("advanced_search"), "", id: "advanced_search_toggler", :class => "carnival-action-button busca"
%ul#advanced_search_form.carnival-form
  - presenter.advanced_search_fields.each do |key, field|
    - if params[key.to_s].present? && params[key.to_s] != "undefined"
      - value =  params[key.to_s]
    %li.search_item
      .search_field
        .label
          = label_tag key, t("activerecord.attributes.#{presenter.full_model_name}.#{key}")
        .field
          = render '/carnival/shared/advanced_search_field', :field => field, :presenter => presenter, :value => value
  %li.search_item
    .action
      = link_to t("clear"), "#", :id=> "clear_button", :class => "carnival-action-button clear-search"
    .action
      = link_to t("search"), "#", :id=> "search_button", :class => "carnival-action-button search-submit"

%ul.advanced-search-tags
  - presenter.advanced_search_fields.each do |key, field|
    - if params[key.to_s].present? && params[key.to_s] != "undefined"
      - value =  params[key.to_s]
      %li.advanced-search-tag<commit_msg>Fixed advanced search association field label<commit_after>= javascript_include_tag "carnival/advanced_search"
= link_to t("advanced_search"), "", id: "advanced_search_toggler", :class => "carnival-action-button busca"
%ul#advanced_search_form.carnival-form
  - presenter.advanced_search_fields.each do |key, field|
    - if params[key.to_s].present? && params[key.to_s] != "undefined"
      - value =  params[key.to_s]
    %li.search_item
      .search_field
        .label
          - label_field = presenter.get_field(field)
          - if presenter.relation_field?(label_field)
            = label_tag key, t("activerecord.attributes.#{label_field.name}")
          - else
            = label_tag key, t("activerecord.attributes.#{presenter.full_model_name}.#{key}")
        .field
          = render '/carnival/shared/advanced_search_field', :field => field, :presenter => presenter, :value => value
  %li.search_item
    .action
      = link_to t("clear"), "#", :id=> "clear_button", :class => "carnival-action-button clear-search"
    .action
      = link_to t("search"), "#", :id=> "search_button", :class => "carnival-action-button search-submit"

%ul.advanced-search-tags
  - presenter.advanced_search_fields.each do |key, field|
    - if params[key.to_s].present? && params[key.to_s] != "undefined"
      - value =  params[key.to_s]
      %li.advanced-search-tag
{'fraction_non_alphanumeric': 0.1541832669322709, 'fraction_numerical': 0.0, 'mean_word_length': 3.557168784029038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7145295', 'n_tokens_mistral': 857, 'n_tokens_neox': 837, 'n_words': 142}