<commit_before>%form#artifact_search_form{method: :get}
  .row
    .col-lg-12.input-group.search-field
      %span.input-group-btn
        %button#artifacts_search_btn.btn.btn-default{type: "submit", value: 'submit'}= t('.search')

      %input#artifact_search.form-control{name: 'search', placeholder: t('.search_for'), type: 'text', value: value_from_params }

      %input.form-control{name: 'q', type: 'hidden' }

  .row.search-filters
    %span.input-group.filters
      - ['license', 'tags', 'apps', 'hash'].each do |filter|
        %p.col-lg-3
          %input{type: 'hidden', name: filter}
          %input.switch{type: 'checkbox', 'data-handle-width' => '120px', 'data-label-text' => t(".filters.#{filter}"), name: "switch-#{filter}", checked: false}

#artifact-list
  = render 'artifact_list'

.row
  .col-lg-12
    = link_to t('.new'), new_artifact_path, class: 'btn btn-group-justified btn-new btn-lg'<commit_msg>Dont show 'new artifact' to unlogged user and show a string for searches<commit_after>%form#artifact_search_form{method: :get}
  .row
    .col-lg-12.input-group.search-field
      %span.input-group-btn
        %button#artifacts_search_btn.btn.btn-default{type: "submit", value: 'submit'}= t('.search')

      %input#artifact_search.form-control{name: 'search', placeholder: t('.search_for'), type: 'text', value: value_from_params }

      %input.form-control{name: 'q', type: 'hidden' }

  .row.search-filters
    %span.input-group.filters
      - ['license', 'tags', 'apps', 'hash'].each do |filter|
        %p.col-lg-3
          %input{type: 'hidden', name: filter}
          %input.switch{type: 'checkbox', 'data-handle-width' => '120px', 'data-label-text' => t(".filters.#{filter}"), name: "switch-#{filter}", checked: false}

  - if (params.keys & ['license', 'tags', 'apps', 'hash']).any?
    .row
      %p=t('.using_filters')

#artifact-list
  = render 'artifact_list'

- if can?(:new, Artifact)
  .row
    .col-lg-12
      = link_to t('.new'), new_artifact_path, class: 'btn btn-group-justified btn-new btn-lg'
{'fraction_non_alphanumeric': 0.1908023483365949, 'fraction_numerical': 0.007827788649706457, 'mean_word_length': 3.564732142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1062224', 'n_tokens_mistral': 730, 'n_tokens_neox': 708, 'n_words': 138}