View | Details | Raw Unified | Return to bug 24555
Collapse All | Expand All

(-)a/catalogue/search.pl (+4 lines)
Lines 485-490 my $searcher = Koha::SearchEngine::Search->new( Link Here
485
  = $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits,
485
  = $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits,
486
    \@sort_by, $scan, $lang, { weighted_fields => !$cgi->param('advsearch'), whole_record => $whole_record });
486
    \@sort_by, $scan, $lang, { weighted_fields => !$cgi->param('advsearch'), whole_record => $whole_record });
487
487
488
use JSON;
489
my $json_query = JSON->new->pretty->encode($query);
490
$template->param( json_query => $json_query );
491
488
## parse the query_cgi string and put it into a form suitable for <input>s
492
## parse the query_cgi string and put it into a form suitable for <input>s
489
my @query_inputs;
493
my @query_inputs;
490
my $scan_index_to_use;
494
my $scan_index_to_use;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-1 / +24 lines)
Lines 267-272 Link Here
267
                                    [% END %]
267
                                    [% END %]
268
                                </ul>
268
                                </ul>
269
                            </div> <!-- /.btn-group -->
269
                            </div> <!-- /.btn-group -->
270
271
                            <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="modal" aria-haspopup="true" aria-expanded="false" data-target="#searchDebug">
272
                                ES query
273
                            </button>
270
                        </div> <!-- /#selection_ops -->
274
                        </div> <!-- /#selection_ops -->
271
                    </div> <!-- /#searchheader -->
275
                    </div> <!-- /#searchheader -->
272
276
Lines 284-289 Link Here
284
                        [% ELSE %]
288
                        [% ELSE %]
285
                            <p>You did not specify any search criteria.</p>
289
                            <p>You did not specify any search criteria.</p>
286
                        [% END %]
290
                        [% END %]
291
                            <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="modal" aria-haspopup="true" aria-expanded="false" data-target="#searchDebug">
292
                                Search debug
293
                            </button>
287
                    </div>
294
                    </div>
288
                [% END # /IF total %]
295
                [% END # /IF total %]
289
296
Lines 664-669 Link Here
664
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
671
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
665
     </div> <!-- /.row -->
672
     </div> <!-- /.row -->
666
673
674
    <div class="modal fade" id="searchDebug" tabindex="-1" role="dialog" aria-labelledby="Search debug">
675
      <div class="modal-dialog" role="document">
676
        <div class="modal-content">
677
          <div class="modal-header">
678
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
679
            <h4 class="modal-title" id="myModalLabel">ES query</h4>
680
          </div>
681
          <div class="modal-body">
682
            <pre>[% json_query %]</pre>
683
          </div>
684
          <div class="modal-footer">
685
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
686
          </div>
687
        </div>
688
      </div>
689
    </div>
690
667
[% MACRO jsinclude BLOCK %]
691
[% MACRO jsinclude BLOCK %]
668
    [% INCLUDE 'strings.inc' %]
692
    [% INCLUDE 'strings.inc' %]
669
    [% Asset.js("js/browser.js") | $raw %]
693
    [% Asset.js("js/browser.js") | $raw %]
670
- 

Return to bug 24555