Bugzilla – Attachment 56254 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: frontend template and JS for browse interface
Bug-14567-frontend-template-and-JS-for-browse-inte.patch (text/plain), 3.71 KB, created by
Nick Clemens (kidclamp)
on 2016-10-12 11:50:36 UTC
(
hide
)
Description:
Bug 14567: frontend template and JS for browse interface
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-10-12 11:50:36 UTC
Size:
3.71 KB
patch
obsolete
>From dc510377e28d5c819916b0f3a9d05d9435dded31 Mon Sep 17 00:00:00 2001 >From: Jen Zajac <jen@catalyst.net.nz> >Date: Fri, 14 Aug 2015 19:36:15 +1200 >Subject: [PATCH] Bug 14567: frontend template and JS for browse interface > >--- > koha-tmpl/opac-tmpl/bootstrap/less/opac.less | 101 +++++++++++++++++++++++++++ > opac/opac-browse.pl | 12 +++- > 2 files changed, 112 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/less/opac.less b/koha-tmpl/opac-tmpl/bootstrap/less/opac.less >index 0bd32b4..5c3bd09 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/less/opac.less >+++ b/koha-tmpl/opac-tmpl/bootstrap/less/opac.less >@@ -304,6 +304,107 @@ td { > } > } > >+/*opac browse search*/ >+#browse-search { >+ >+ form { >+ label { >+ display: inline-block; >+ margin-right:5px; >+ } >+ >+ [type=submit] { >+ margin-top: 10px; >+ } >+ } >+ >+ #browse-resultswrapper { >+ margin-top: 4em; >+ >+ @media (min-width: 768px) and (max-width: 984px) { >+ margin-top: 2em; >+ } >+ >+ @media (max-width: 767px) { >+ margin-top: 1em; >+ } >+ } >+ #browse-searchresults, #browse-selectionsearch { >+ border: 1px solid #E3E3E3; >+ .border-radius-all(4px); >+ padding: 0; >+ overflow-y: auto; >+ max-height: 31em; >+ margin-bottom: 2em; >+ } >+ #browse-searchresults { >+ max-height: 31em; >+ list-style: none; >+ padding: 10px; >+ >+ a { >+ display: block; >+ margin-bottom: 5px; >+ >+ &.selected { >+ background-color:#EEE; >+ } >+ } >+ >+ li:last-child a { >+ margin-bottom: 0; >+ } >+ >+ @media (max-width: 767px) { >+ max-height: 13em; >+ } >+ } >+ #browse-selection { >+ margin-top: -40px; >+ padding-top: 0; >+ >+ @media (max-width: 767px) { >+ margin-top: 0; >+ } >+ } >+ #browse-selectionsearch ol { >+ list-style: none; >+ margin: 0; >+ >+ li { >+ padding: 1em; >+ >+ &:nth-child(odd) { >+ background-color: #F4F4F4; >+ } >+ } >+ } >+ #browse-selectionsearch p.subjects { >+ font-size: 0.9em; >+ margin-bottom: 0; >+ } >+ #browse-selectionsearch h4 { >+ margin: 0; >+ } >+ .error, .no-results { >+ background-color: #EEE; >+ border: 1px solid #E8E8E8; >+ text-align: left; >+ padding: 0.5em; >+ .border-radius-all(3px); >+ } >+ .loading { >+ text-align: center; >+ >+ img { >+ margin:0.5em 0; >+ position: relative; >+ left: -5px; >+ } >+ } >+} >+/*end browse search*/ >+ > /* Override Bootstrap alert */ > .alert { > background: #fffbe5; /* Old browsers */ >diff --git a/opac/opac-browse.pl b/opac/opac-browse.pl >index b5a7ef7..eb242f1 100755 >--- a/opac/opac-browse.pl >+++ b/opac/opac-browse.pl >@@ -24,6 +24,7 @@ use CGI qw( -utf8 :standard ); > > use C4::Auth; > use C4::Context; >+use C4::Output; > > use Koha::ElasticSearch; > use Koha::SearchEngine::Elasticsearch::Browse; >@@ -41,8 +42,17 @@ binmode STDOUT, ':utf8'; > my $api = $query->param('api'); > > if ( !$api ) { >+ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { >+ template_name => "opac-browse.tt", >+ query => $query, >+ type => "opac", >+ authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ), >+ } >+ ); >+ $template->param(); >+ output_html_with_http_headers $query, $cookie, $template->output; > >- # No parameters, so we just render the template. > > } > elsif ( $api eq 'GetSuggestions' ) { >-- >2.1.4
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