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

(-)a/catalogue/search.pl (+4 lines)
Lines 493-498 my $searcher = Koha::SearchEngine::Search->new( Link Here
493
  = $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits,
493
  = $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits,
494
    \@sort_by, $scan, $lang, { weighted_fields => !$cgi->param('advsearch'), whole_record => $whole_record });
494
    \@sort_by, $scan, $lang, { weighted_fields => !$cgi->param('advsearch'), whole_record => $whole_record });
495
495
496
use JSON;
497
my $json_query = JSON->new->pretty->encode($query);
498
$template->param( json_query => $json_query );
499
496
## parse the query_cgi string and put it into a form suitable for <input>s
500
## parse the query_cgi string and put it into a form suitable for <input>s
497
my @query_inputs;
501
my @query_inputs;
498
my $scan_index_to_use;
502
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 670-675 Link Here
670
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
677
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
671
     </div> <!-- /.row -->
678
     </div> <!-- /.row -->
672
679
680
    <div class="modal fade" id="searchDebug" tabindex="-1" role="dialog" aria-labelledby="Search debug">
681
      <div class="modal-dialog" role="document">
682
        <div class="modal-content">
683
          <div class="modal-header">
684
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
685
            <h4 class="modal-title" id="myModalLabel">ES query</h4>
686
          </div>
687
          <div class="modal-body">
688
            <pre>[% json_query %]</pre>
689
          </div>
690
          <div class="modal-footer">
691
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
692
          </div>
693
        </div>
694
      </div>
695
    </div>
696
673
[% MACRO jsinclude BLOCK %]
697
[% MACRO jsinclude BLOCK %]
674
    [% INCLUDE 'strings.inc' %]
698
    [% INCLUDE 'strings.inc' %]
675
    [% Asset.js("js/browser.js") | $raw %]
699
    [% Asset.js("js/browser.js") | $raw %]
676
- 

Return to bug 24555