Bugzilla – Attachment 85402 Details for
Bug 14567
Add an elasticsearch driven browse interface to the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14567: Rebase adjustments and QA fixes
Bug-14567-Rebase-adjustments-and-QA-fixes.patch (text/plain), 4.14 KB, created by
Nick Clemens (kidclamp)
on 2019-02-20 18:22:26 UTC
(
hide
)
Description:
Bug 14567: Rebase adjustments and QA fixes
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-02-20 18:22:26 UTC
Size:
4.14 KB
patch
obsolete
>From 7b3af86a8a162877508727f1cd228045e6d027cd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 12 Dec 2018 14:26:47 +0000 >Subject: [PATCH] Bug 14567: Rebase adjustments and QA fixes > >--- > Koha/SearchEngine/Elasticsearch/Browse.pm | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt | 10 ++++++---- > opac/opac-browse.pl | 11 +++++------ > 3 files changed, 12 insertions(+), 11 deletions(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/Browse.pm b/Koha/SearchEngine/Elasticsearch/Browse.pm >index 9eb15366c0..cfea57fe1f 100644 >--- a/Koha/SearchEngine/Elasticsearch/Browse.pm >+++ b/Koha/SearchEngine/Elasticsearch/Browse.pm >@@ -179,7 +179,7 @@ __END__ > > =over 4 > >-=item Robin Sheat C<< <robin@catalyst.net.nz> >> >+=item Robin Sheat << <robin@catalyst.net.nz> >> > > =back > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt >index eba2c10d9a..8cd0ba65bf 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-browse.tt >@@ -1,6 +1,8 @@ > [% USE Koha %] >+[% USE Asset %] >+[% USE raw %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Browse our catalog</title> >+<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Browse our catalog</title> > [% INCLUDE 'doc-head-close.inc' %] > [% BLOCK cssinclude %][% END %] > [% INCLUDE 'bodytag.inc' bodyid='opac-browser' %] >@@ -60,7 +62,7 @@ > > <div id="browse-resultswrapper" class="hidden"> > <ul id="browse-searchresults" class="span3" start="-1" aria-live="polite"> >- <li class="loading hidden"><img src="[% interface %]/[% theme %]/images/loading.gif" alt=""> Loading</li> >+ <li class="loading hidden"><img src="[% interface | html %]/[% theme |html %]/images/loading.gif" alt=""> Loading</li> > > <li class="no-results hidden">Sorry, there are no results, try a different search term.</li> > </ul> >@@ -69,7 +71,7 @@ > > <div id="browse-selectionsearch" class="span9 hidden"> > <div class="loading hidden"> >- <img src="[% interface %]/[% theme %]/images/loading.gif" alt=""> Loading >+ <img src="[% interface | html %]/[% theme | html %]/images/loading.gif" alt=""> Loading > </div> > > <div class="no-results hidden">No results</div> >@@ -84,6 +86,6 @@ > </div><!-- / .main --> > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] >-<script type="text/javascript" src="[% interface %]/[% theme %]/js/browse.js"> >+[% Asset.js("/js/browse.js") | $raw %] > </script> > [% END %] >diff --git a/opac/opac-browse.pl b/opac/opac-browse.pl >index 6aa1a001c1..29524f10e8 100755 >--- a/opac/opac-browse.pl >+++ b/opac/opac-browse.pl >@@ -84,24 +84,23 @@ elsif ( $api eq 'GetResults' ) { > > my $query = { query => { term => { $field.".raw" => $term } } } ; > my $results = $searcher->search( $query, undef, 500 ); >- my @output = _filter_for_output( $results->{hits} ); >- print header( >+ my @output = _filter_for_output( $results->{hits}->{hits} ); >+ print CGI::header( > -type => 'application/json', > -charset => 'utf-8' > ); > print to_json( \@output ); > } > >-# This is a temporary, MARC21-only thing that will grab titles, and authors > # This should probably be done with some templatey gizmo > # in the future. > sub _filter_for_output { > my ($records) = @_; > my @output; > foreach my $rec (@$records) { >- my $biblionumber = $rec->{es_id}; >- my $biblio = Koha::Biblios->find({ biblionumber=>$biblionumber }); >-warn $biblio->title; >+ my $biblionumber = $rec->{_id}; >+ my $biblio = Koha::Biblios->find( $biblionumber ); >+ next unless $biblio; > push @output, > { > id => $biblionumber, >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14567
:
41096
|
41804
|
41805
|
41806
|
56253
|
56254
|
56255
|
56256
|
56262
|
56263
|
56264
|
56270
|
56271
|
56272
|
56273
|
57141
|
61660
|
64477
|
64478
|
64779
|
69614
|
83127
|
83128
|
85401
|
85402
|
85403
|
85887
|
85888
|
86453
|
98509
|
99060
|
99292
|
99298