<commit_before>- if wallpapers.has_pagination? && request.xhr?
  .horizontal-page-bar
    %h3
      .pull-left= link_to wallpapers.current_page, url_for(search_options.merge(page: wallpapers.current_page))
      .pull-right
        %a{:href => '#'}
          %span.glyphicon.glyphicon-chevron-up

- if wallpapers.any?
  %ul.list-wallpaper{:class => local_assigns[:extra_css_class]}
    - wallpapers.each do |wallpaper|
      - next unless can?(:read, wallpaper) && wallpaper.thumbnail_image.present?
      %li{:class => "purity-#{wallpaper.purity}", :data => {:wallpaper_id => wallpaper.id}}
        = link_to wallpaper.path_with_resolution, title: wallpaper.cached_tag_list, target: '_blank' do
          = image_tag nil, width: 250, height: 188, class: 'img-wallpaper lazy', data: { src: wallpaper.thumbnail_image_url }
        .overlay.overlay-bottom
          %strong= wallpaper.resolution
          = wallpaper.favourite_button
          .btn.btn-sm.pull-right
            %span.glyphicon.glyphicon-eye-open
            = wallpaper.impressions_count
          -# = link_to '#', class: 'btn btn-sm btn-collect pull-right', data: { action: 'collect' } do
          -#   %span.glyphicon.glyphicon-folder-open
          -#   = wallpaper.favourites.size

  = wallpapers.link_to_next_page

- else
  %br/
  %br/
  %h2.text-center No search results found :(<commit_msg>Fix favourites not loading in xhr requests<commit_after>- if wallpapers.has_pagination? && request.xhr?
  - if respond_to?(:search_options)
    - current_page_params = search_options.merge(page: wallpapers.current_page)
  - else
    - current_page_params = { page: wallpapers.current_page }
  .horizontal-page-bar
    %h3
      .pull-left= link_to wallpapers.current_page, url_for(current_page_params)
      .pull-right
        %a{:href => '#'}
          %span.glyphicon.glyphicon-chevron-up

- if wallpapers.any?
  %ul.list-wallpaper{:class => local_assigns[:extra_css_class]}
    - wallpapers.each do |wallpaper|
      - next unless can?(:read, wallpaper) && wallpaper.thumbnail_image.present?
      %li{:class => "purity-#{wallpaper.purity}", :data => {:wallpaper_id => wallpaper.id}}
        = link_to wallpaper.path_with_resolution, title: wallpaper.cached_tag_list, target: '_blank' do
          = image_tag nil, width: 250, height: 188, class: 'img-wallpaper lazy', data: { src: wallpaper.thumbnail_image_url }
        .overlay.overlay-bottom
          %strong= wallpaper.resolution
          = wallpaper.favourite_button
          .btn.btn-sm.pull-right
            %span.glyphicon.glyphicon-eye-open
            = wallpaper.impressions_count
          -# = link_to '#', class: 'btn btn-sm btn-collect pull-right', data: { action: 'collect' } do
          -#   %span.glyphicon.glyphicon-folder-open
          -#   = wallpaper.favourites.size

  = wallpapers.link_to_next_page

- else
  %br/
  %br/
  %h2.text-center No search results found :(
{'fraction_non_alphanumeric': 0.13031550068587106, 'fraction_numerical': 0.0054869684499314125, 'mean_word_length': 2.941891891891892, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '912821', 'n_tokens_mistral': 1013, 'n_tokens_neox': 957, 'n_words': 170}