<commit_before>- @title = t('.title')
.admin
  .row
    = render 'neighborly/admin/layouts/menu'
    section.content.large-12.columns
      h4
        strong= "#{@total_projects} "
        = t('.total_projects')

      .filters
        = form_tag projects_path, method: :get, class: 'form-horizontal' do |f|
          = hidden_field_tag :order_by, params[:order_by]
          .row
            .large-3.columns
              = label_tag :by_id, t('.id')
              = text_field_tag :by_id, params[:by_id], class: 'input-small'

            - [:between_created_at, :between_expires_at, :between_online_date].each do |between_field|
              .large-3.columns
                = label_tag "#{between_field}_start_at".to_sym, t(".#{between_field}")
                = text_field_tag "#{between_field}[start_at]", (params[between_field][:start_at] if params[between_field].present?)
                | &nbsp;
                | &nbsp;
                = text_field_tag "#{between_field}[ends_at]", (params[between_field][:ends_at] if params[between_field].present?)

          .row
            .large-4.columns
              = label_tag :pg_search, t('.project')
              = text_field_tag :pg_search, params[:pg_search]
            .large-4.columns
              = label_tag :with_state, t('.with_state')
              = select_tag :with_state, options_for_select(Project.state_names, params[:with_state]), include_blank: true
            .large-4.columns
              = label_tag :by_category_id, t('.by_category')
              = select_tag :by_category_id, options_from_collection_for_select(Category.all, :id, :name_pt,params[:by_category_id]), include_blank: true
          .row
            .large-6.columns
              = label_tag :user_name_contains, t('.user')
              = text_field_tag :user_name_contains, params[:user_name_contains]
            .large-6.columns
              = label_tag :by_user_email, t('.by_user_email')
              = text_field_tag :by_user_email, params[:by_user_email]

          .row
            .large-12.columns.text-right
              = submit_tag t('.submit'), class: 'button'
        .row
          .large-6.columns.text-left
              = paginate @projects
          .large-6.columns.text-right
            = pluralize_without_number @projects.size, t('words.found_singular'), t('words.found_plural')
            | &nbsp;
            strong = @projects.size
            | &nbsp;
            = pluralize_without_number(@projects.size, t('words.project_singular'), t('words.project_plural')).downcase
      .data-table
        - if @projects.empty?
          = t('.no_projects')
        - else
          table.small
            thead
              tr
                th style="width: 200px;"
                  = t('.name')
                th= t('.category')
                th= t('.user_id')
                th
                  a data-sort="goal" href='#'= t('.goal')
                  span.sort-order
                th
                  a data-sort="pt.progress" href='#'= t('.pledged')
                  span.sort-order
                th
                  a data-sort="pt.total_contributions" href='#'= t('.total_contributions')
                  span.sort-order
                th= t('.recommended')
                th= t('.featured')
                th= t('.home_page')
                th
                  a data-sort="online_date" href='#'= t('.online_date')
                  span.sort-order
                th
                  a data-sort="projects.expires_at" href='#'= t('.expires_at')
                  span.sort-order
                th= t('.state')<commit_msg>Fix project search close #21<commit_after>- @title = t('.title')
.admin
  .row
    = render 'neighborly/admin/layouts/menu'
    section.content.large-12.columns
      h4
        strong= "#{@total_projects} "
        = t('.total_projects')

      .filters
        = form_tag projects_path, method: :get, class: 'form-horizontal' do |f|
          = hidden_field_tag :order_by, params[:order_by]
          .row
            .large-3.columns
              = label_tag :by_id, t('.id')
              = text_field_tag :by_id, params[:by_id], class: 'input-small'

            - [:between_created_at, :between_expires_at, :between_online_date].each do |between_field|
              .large-3.columns
                = label_tag "#{between_field}_start_at".to_sym, t(".#{between_field}")
                = text_field_tag "#{between_field}[start_at]", (params[between_field][:start_at] if params[between_field].present?)
                | &nbsp;
                | &nbsp;
                = text_field_tag "#{between_field}[ends_at]", (params[between_field][:ends_at] if params[between_field].present?)

          .row
            .large-4.columns
              = label_tag :pg_search, t('.project')
              = text_field_tag :pg_search, params[:pg_search]
            .large-4.columns
              = label_tag :with_state, t('.with_state')
              = select_tag :with_state, options_for_select(Project.state_names, params[:with_state]), include_blank: true
            .large-4.columns
              = label_tag :by_category_id, t('.by_category')
              = select_tag :by_category_id, options_from_collection_for_select(Category.all, :id, :name_pt,params[:by_category_id]), include_blank: true
          .row
            .large-6.columns
              = label_tag :user_name_contains, t('.user')
              = text_field_tag :user_name_contains, params[:user_name_contains]
            .large-6.columns
              = label_tag :by_user_email, t('.by_user_email')
              = text_field_tag :by_user_email, params[:by_user_email]

          .row
            .large-12.columns.text-right
              = submit_tag t('.submit'), class: 'button'
        .row
          .large-6.columns.text-left
              = paginate @projects
          .large-6.columns.text-right
            = pluralize_without_number @projects.to_a.size, t('words.found_singular'), t('words.found_plural')
            | &nbsp;
            strong = @projects.to_a.size
            | &nbsp;
            = pluralize_without_number(@projects.to_a.size, t('words.project_singular'), t('words.project_plural')).downcase
      .data-table
        - if @projects.empty?
          = t('.no_projects')
        - else
          table.small
            thead
              tr
                th style="width: 200px;"
                  = t('.name')
                th= t('.category')
                th= t('.user_id')
                th
                  a data-sort="goal" href='#'= t('.goal')
                  span.sort-order
                th
                  a data-sort="pt.progress" href='#'= t('.pledged')
                  span.sort-order
                th
                  a data-sort="pt.total_contributions" href='#'= t('.total_contributions')
                  span.sort-order
                th= t('.recommended')
                th= t('.featured')
                th= t('.home_page')
                th
                  a data-sort="online_date" href='#'= t('.online_date')
                  span.sort-order
                th
                  a data-sort="projects.expires_at" href='#'= t('.expires_at')
                  span.sort-order
                th= t('.state')
{'fraction_non_alphanumeric': 0.12969564025226213, 'fraction_numerical': 0.004935563476830271, 'mean_word_length': 1.680014695077149, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6714420', 'n_tokens_mistral': 2193, 'n_tokens_neox': 2095, 'n_words': 353}