<commit_before>-# -*- coding: utf-8 -*-
.yield
 = render :partial => 'search_form', :locals => {:advanced => true}
 - @results.each do |result|
  - next if result[:messages].count == 0
  = render :partial => "shared/room_info", :locals => { :room => result[:room], :has_button => false }
  - if @results.size == 1
   %div{:id => 'read-more', :class => 'read-more' }
    read more
  - else
   %div{:id => 'read-more', :class => 'read-more' }
    = link_to 'read more', :controller=>:search, :action=>:search, :room => {:id => result[:room].id}, :search => {:message => params[:search][:message]}
  .message-list
   - result[:messages].reverse_each do |message|
    = render :partial => 'chat/message', :locals => { :message => message, :room => message.room }

= content_for :javascripts do
 - if @results.size == 1
  = javascript_include_tag "jquery-pagination"
  :javascript
   $(function() {
    $("#read-more").pagination({
     current : function(){ return $(".message").first().attr("message-id"); },
     content : "div.message",
     append  : function(elem){ $(".message-list").prepend(elem); },
     url : "#{url_for(:action => :search_more)}",
     params: function(){return {"search_message" : "#{CGI.escape(@query)}", "room_id" : "#{@room_id}"}},
     indicator : #{image_tag('ajax-loader.gif').inspect}
    });
   });<commit_msg>workaround for search page refs #165<commit_after>-# -*- coding: utf-8 -*-
.yield
 = render :partial => 'search_form', :locals => {:advanced => true}
 - @results.each do |result|
  - next if result[:messages].count == 0
  = render :partial => "shared/room_info", :locals => { :room => result[:room], :has_button => false }
  - if @results.size == 1
   %div{:id => 'read-more', :class => 'read-more' }
    read more
  - else
   %div{:id => 'read-more', :class => 'read-more' }
    = link_to 'read more', :controller=>:search, :action=>:search, :room => {:id => result[:room].id}, :search => {:message => params[:search][:message]}
  .message-list
   - result[:messages].reverse_each do |message|
    = render :partial => 'chat/message', :locals => { :message => message, :room => message.room }

= content_for :javascripts do
 - if @results.size == 1
  = javascript_include_tag "jquery-pagination"
  :javascript
   $(function() {
    $("#read-more").pagination({
     content : "div.message",
     append  : function(elem){ $(".message-list").prepend(elem); },
     url : "#{url_for(:action => :search_more)}",
     params: function(){return {"id" : $(".message").first().attr("message-id"), "search_message" : "#{CGI.escape(@query)}", "room_id" : "#{@room_id}"}},
     indicator : #{image_tag('ajax-loader.gif').inspect}
    });
   });
{'fraction_non_alphanumeric': 0.22637280537915577, 'fraction_numerical': 0.004109077325364214, 'mean_word_length': 3.9047619047619047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 47, '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': '6938843', 'n_tokens_mistral': 897, 'n_tokens_neox': 876, 'n_words': 189}