<commit_before>= content_for :page_header_subtitle do
  = t('.subtitle')
= render_page_title t('.title')

= content_for :sidebar do

  - if user_signed_in? && can?(:create, Space)
    .sidebar-top-action-button
      = link_to t('.create_new_space'), new_space_path, :class => "btn btn-primary btn-large btn-block"

  - elsif !user_signed_in?
    .sidebar-top-action-button
      - if current_site.registration_enabled?
        = link_to t('register.one'), register_path, :class => "btn btn-success btn-large btn-block"
      - else
        = link_to t('_other.login'), login_path, :class => "btn btn-primary btn-large btn-block"

  = render_sidebar_content_block('space-description-wrapper') do
    .content-block-middle
      %p= t('space.index.select_at_left')
    - @spaces.each do |space|
      - has_access = user_signed_in? || space.public
      .content-block-middle{:id => "#{space.permalink}-description", :style => "display:none;"}
        .space-logo-wrapper
          - if has_access
            = link_logo_image(space, :size => '168x128', :title => space.name, :class => "logo logo-space")
          - else
            = logo_image(space, :size => '168x128', :title => space.name, :class => "logo logo-space")
        - if has_access
          = link_to space_path(space) do
            %h3.name= space.name
        - else
          %h3.name= space.name
        %p.description= first_words(space.description, 400)
        %p.details
          - space_ids = current_user.try(:space_ids) || []

          - if space_ids.include?(space.id)
            %span.is-member= t('space.index.user_is_member')
          %span= t('space.member_count', :count => space.users.size)
          %span= t('space.post_count', :count => space.posts.size)
          - if mod_enabled?("events")
            %span= t('space.event_count', :count => space.events.size)
          
          = render :partial => "spaces/space_tags", :locals => { :space => space }

        - if has_access
          %p.action-links
            = link_to t('more'), space_path(space)

#space-filter-wrapper
  %div.clearfix
    .btn-group{ :"data-toggle" => "buttons-radio" }
      = link_to spaces_path(params.merge(my_spaces: nil)), :id => "show-spaces-all", :class => "btn #{'active' unless params[:my_spaces]}", :type => "button" do
        = t('space.index.filters.all')
      - if user_signed_in?
        = link_to spaces_path(params.merge(my_spaces: true)), :id => "show-spaces-mine", :class => "btn #{'active' if params[:my_spaces]}", :type => "button" do
          = t('space.index.filters.my_spaces')
      = text_field_tag :spaces_filter_text, params[:q], :placeholder => t('space.index.filter_name'), :'data-load-url' => spaces_path, :'data-target' => '#space-list', :'data-filter' => '#filter-total', :class => 'resource-filter'
  %div
    #space-filter-tags
      - if !params[:tag].nil?
        = t('_other.filtered_tags')
        %span.search-tags
          - params[:tag].split(',').each do |tag|
            .label.label-tag
              = link_to spaces_path( make_tag_params( tag ) ) do
                = icon_remove :class => "tooltipped", :title => t("_other.remove_tag")
                = tag

#space-order-wrapper
  = t('space.index.order.order_by') + ':'
  .btn-group{ :"data-toggle" => "buttons-radio" }
    = link_to spaces_path(params.merge(order: 'relevance')), class: "tooltipped btn btn-mini #{'active' if params[:order] == 'relevance'}", title: t('space.index.order.relevance_tip') do
      = t('space.index.order.relevance')
    = link_to spaces_path(params.merge(order: 'abc')), class: "btn btn-mini #{'active' if params[:order] == 'abc'}" do
      = t('space.index.order.alphabetic')

  = render "spaces/list_view", :spaces => @spaces, :user_spaces => @user_spaces, :extended => true

- nav = page_navigation_links @spaces
- unless nav.nil?
  .content-block-footer= nav<commit_msg>Added correct update partial<commit_after>= content_for :page_header_subtitle do
  = t('.subtitle')
= render_page_title t('.title')

= content_for :sidebar do

  - if user_signed_in? && can?(:create, Space)
    .sidebar-top-action-button
      = link_to t('.create_new_space'), new_space_path, :class => "btn btn-primary btn-large btn-block"

  - elsif !user_signed_in?
    .sidebar-top-action-button
      - if current_site.registration_enabled?
        = link_to t('register.one'), register_path, :class => "btn btn-success btn-large btn-block"
      - else
        = link_to t('_other.login'), login_path, :class => "btn btn-primary btn-large btn-block"

  = render_sidebar_content_block('space-description-wrapper') do
    .content-block-middle
      %p= t('space.index.select_at_left')
    - @spaces.each do |space|
      - has_access = user_signed_in? || space.public
      .content-block-middle{:id => "#{space.permalink}-description", :style => "display:none;"}
        .space-logo-wrapper
          - if has_access
            = link_logo_image(space, :size => '168x128', :title => space.name, :class => "logo logo-space")
          - else
            = logo_image(space, :size => '168x128', :title => space.name, :class => "logo logo-space")
        - if has_access
          = link_to space_path(space) do
            %h3.name= space.name
        - else
          %h3.name= space.name
        %p.description= first_words(space.description, 400)
        %p.details
          - space_ids = current_user.try(:space_ids) || []

          - if space_ids.include?(space.id)
            %span.is-member= t('space.index.user_is_member')
          %span= t('space.member_count', :count => space.users.size)
          %span= t('space.post_count', :count => space.posts.size)
          - if mod_enabled?("events")
            %span= t('space.event_count', :count => space.events.size)
          
          = render :partial => "spaces/space_tags", :locals => { :space => space }

        - if has_access
          %p.action-links
            = link_to t('more'), space_path(space)

#space-filter-wrapper
  %div.clearfix
    .btn-group{ :"data-toggle" => "buttons-radio" }
      = link_to spaces_path(params.merge(my_spaces: nil)), :id => "show-spaces-all", :class => "btn #{'active' unless params[:my_spaces]}", :type => "button" do
        = t('space.index.filters.all')
      - if user_signed_in?
        = link_to spaces_path(params.merge(my_spaces: true)), :id => "show-spaces-mine", :class => "btn #{'active' if params[:my_spaces]}", :type => "button" do
          = t('space.index.filters.my_spaces')
      = text_field_tag :spaces_filter_text, params[:q], :placeholder => t('space.index.filter_name'), :'data-load-url' => spaces_path, :'data-target' => '#space-order-wrapper', :'data-filter' => '#filter-total', :class => 'resource-filter'
  %div
    #space-filter-tags
      - if !params[:tag].nil?
        = t('_other.filtered_tags')
        %span.search-tags
          - params[:tag].split(',').each do |tag|
            .label.label-tag
              = link_to spaces_path( make_tag_params( tag ) ) do
                = icon_remove :class => "tooltipped", :title => t("_other.remove_tag")
                = tag

#space-order-wrapper
  = t('space.index.order.order_by') + ':'
  .btn-group{ :"data-toggle" => "buttons-radio" }
    = link_to spaces_path(params.merge(order: 'relevance')), class: "tooltipped btn btn-mini #{'active' if params[:order] == 'relevance'}", title: t('space.index.order.relevance_tip') do
      = t('space.index.order.relevance')
    = link_to spaces_path(params.merge(order: 'abc')), class: "btn btn-mini #{'active' if params[:order] == 'abc'}" do
      = t('space.index.order.alphabetic')

  = render "spaces/list_view", :spaces => @spaces, :user_spaces => @user_spaces, :extended => true

- nav = page_navigation_links @spaces
- unless nav.nil?
  .content-block-footer= nav
{'fraction_non_alphanumeric': 0.16944586967675732, 'fraction_numerical': 0.004361210877373012, 'mean_word_length': 2.9043565348022033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 73, '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': '7297799', 'n_tokens_mistral': 2636, 'n_tokens_neox': 2547, 'n_words': 486}